diff --git a/build/devnet/BTCShifter.json b/build/devnet/BTCShifter.json new file mode 100644 index 00000000..4dc8f5d5 --- /dev/null +++ b/build/devnet/BTCShifter.json @@ -0,0 +1,17316 @@ +{ + "contractName": "BTCShifter", + "abi": [ + { + "constant": false, + "inputs": [], + "name": "claimTokenOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_nHash", + "type": "bytes32" + }, + { + "name": "_pHash", + "type": "bytes32" + }, + { + "name": "_sig", + "type": "bytes" + } + ], + "name": "shiftIn", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingNextShifter", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "feeRecipient", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "nextShifter", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "name": "status", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_nHash", + "type": "bytes32" + }, + { + "name": "_pHash", + "type": "bytes32" + }, + { + "name": "_sig", + "type": "bytes" + } + ], + "name": "forwardShiftIn", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "bytes" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "shiftOut", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "mintAuthority", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_wrapper", + "type": "address" + }, + { + "name": "authorized", + "type": "bool" + } + ], + "name": "authorizeWrapper", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "nextShiftID", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "shifterUpgradeTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "authorizedWrapper", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_nHash", + "type": "bytes32" + }, + { + "name": "_pHash", + "type": "bytes32" + } + ], + "name": "sigHash", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "fee", + "outputs": [ + { + "name": "", + "type": "uint16" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nextShifter", + "type": "address" + } + ], + "name": "upgradeShifter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nextFeeRecipient", + "type": "address" + } + ], + "name": "updateFeeRecipient", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_nHash", + "type": "bytes32" + }, + { + "name": "_pHash", + "type": "bytes32" + }, + { + "name": "_sig", + "type": "bytes" + } + ], + "name": "verifySig", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "bytes" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "forwardShiftOut", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "token", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_previousShifter", + "type": "address" + }, + { + "name": "_token", + "type": "address" + }, + { + "name": "_feeRecipient", + "type": "address" + }, + { + "name": "_mintAuthority", + "type": "address" + }, + { + "name": "_fee", + "type": "uint16" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": true, + "name": "_shiftID", + "type": "uint256" + } + ], + "name": "LogShiftIn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_to", + "type": "bytes" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": true, + "name": "_shiftID", + "type": "uint256" + } + ], + "name": "LogShiftOut", + "type": "event" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"claimTokenOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_nHash\",\"type\":\"bytes32\"},{\"name\":\"_pHash\",\"type\":\"bytes32\"},{\"name\":\"_sig\",\"type\":\"bytes\"}],\"name\":\"shiftIn\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingNextShifter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeRecipient\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextShifter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"status\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_nHash\",\"type\":\"bytes32\"},{\"name\":\"_pHash\",\"type\":\"bytes32\"},{\"name\":\"_sig\",\"type\":\"bytes\"}],\"name\":\"forwardShiftIn\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"bytes\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"shiftOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"mintAuthority\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_wrapper\",\"type\":\"address\"},{\"name\":\"authorized\",\"type\":\"bool\"}],\"name\":\"authorizeWrapper\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextShiftID\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"shifterUpgradeTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"authorizedWrapper\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_nHash\",\"type\":\"bytes32\"},{\"name\":\"_pHash\",\"type\":\"bytes32\"}],\"name\":\"sigHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_nextShifter\",\"type\":\"address\"}],\"name\":\"upgradeShifter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_nextFeeRecipient\",\"type\":\"address\"}],\"name\":\"updateFeeRecipient\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_nHash\",\"type\":\"bytes32\"},{\"name\":\"_pHash\",\"type\":\"bytes32\"},{\"name\":\"_sig\",\"type\":\"bytes\"}],\"name\":\"verifySig\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"bytes\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"forwardShiftOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_previousShifter\",\"type\":\"address\"},{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_feeRecipient\",\"type\":\"address\"},{\"name\":\"_mintAuthority\",\"type\":\"address\"},{\"name\":\"_fee\",\"type\":\"uint16\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_shiftID\",\"type\":\"uint256\"}],\"name\":\"LogShiftIn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_shiftID\",\"type\":\"uint256\"}],\"name\":\"LogShiftOut\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"updateFeeRecipient(address)\":{\"params\":{\"_nextFeeRecipient\":\"The address to start paying fees to.\"}},\"upgradeShifter(address)\":{\"params\":{\"_nextShifter\":\"The address to transfer the ownership to, or 0x0.\"}}}},\"userdoc\":{\"methods\":{\"claimTokenOwnership()\":{\"notice\":\"Claims ownership of the token passed in to the constructor. `transferStoreOwnership` must have previously been called. Anyone can call this function.\"},\"forwardShiftIn(address,uint256,bytes32,bytes32,bytes)\":{\"notice\":\"Callable by the previous Shifter if it has been upgraded.\"},\"forwardShiftOut(address,bytes,uint256)\":{\"notice\":\"Callable by the previous Shifter if it has been upgraded.\"},\"shiftIn(uint256,bytes32,bytes32,bytes)\":{\"notice\":\"shiftOut burns tokens after taking a fee for the `_feeRecipient`.\"},\"shiftOut(bytes,uint256)\":{\"notice\":\"shiftOut burns tokens after taking a fee for the `_feeRecipient`.\"},\"sigHash(address,uint256,bytes32,bytes32)\":{\"notice\":\"sigHash hashes the parameters so that they can be signed.\"},\"updateFeeRecipient(address)\":{\"notice\":\"Allow the mint authority to update the fee recipient.\"},\"upgradeShifter(address)\":{\"notice\":\"Allows the mint authority to initiate an ownership transfer of the token.\"},\"verifySig(address,uint256,bytes32,bytes32,bytes)\":{\"notice\":\"verifySig checks the the provided signature matches the provided parameters.\"}}}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol\":\"BTCShifter\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol\":{\"keccak256\":\"0x709d74b45c3da97750300a49f14891cecf0aa4508b21eb9bb7bdde941b0d2825\",\"urls\":[\"bzzr://6d127237549773fb77ab60aa2f09b82b1476ce623014d3fad7bd3f7518f067d7\"]},\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol\":{\"keccak256\":\"0x725d45e07fa2a6cb678e53617bd8c03947edf40bd985ffc83b040ab44c8b182f\",\"urls\":[\"bzzr://21ad1f2cc919e3b67cf76c8e451de35b7ef2490b6e717951a336825bb6a7a5f9\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", + "bytecode": "0x6080604052600060085534801561001557600080fd5b5060405160a080611674833981018060405260a081101561003557600080fd5b50805160208083015160408085015160608601516080909601516001600160a01b039586166000908152600390955291909320805460ff19166001179055600480549285166001600160a01b03199384161790556005805495851695831695909517909455600680549390921661ffff9094167401000000000000000000000000000000000000000002600160a01b61ffff02199093169290921790911691909117905561158c806100e86000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063ab595e0c116100ad578063ef4b41b911610071578063ef4b41b914610497578063f160d369146104bd578063f1669014146104e3578063fbc8d09e146105a8578063fc0c546a1461065e5761012c565b8063ab595e0c1461040a578063b07da53214610412578063b7f241311461041a578063dd34129914610440578063ddca3f43146104785761012c565b806352ad0d5e116100f457806352ad0d5e1461023857806371d92229146102695780638723c3771461032e5780639340b21e146103d45780639ce018c5146103dc5761012c565b806310731a65146101315780631ac945b81461013b5780631f0e95fd1461020457806346904840146102285780634ebc490c14610230575b600080fd5b610139610666565b005b6101f26004803603608081101561015157600080fd5b81359160208101359160408201359190810190608081016060820135600160201b81111561017e57600080fd5b82018360208201111561019057600080fd5b803590602001918460018302840111600160201b831117156101b157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106c6945050505050565b60408051918252519081900360200190f35b61020c6106e0565b604080516001600160a01b039092168252519081900360200190f35b61020c6106ef565b61020c6106fe565b6102556004803603602081101561024e57600080fd5b503561070d565b604080519115158252519081900360200190f35b6101f2600480360360a081101561027f57600080fd5b6001600160a01b038235169160208101359160408201359160608101359181019060a081016080820135600160201b8111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460018302840111600160201b831117156102ed57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610722945050505050565b6101f26004803603604081101561034457600080fd5b810190602081018135600160201b81111561035e57600080fd5b82018360208201111561037057600080fd5b803590602001918460018302840111600160201b8311171561039157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061078c915050565b61020c6107a0565b610139600480360360408110156103f257600080fd5b506001600160a01b03813516906020013515156107af565b6101f261083c565b6101f2610842565b6102556004803603602081101561043057600080fd5b50356001600160a01b0316610848565b6101f26004803603608081101561045657600080fd5b506001600160a01b03813516906020810135906040810135906060013561085d565b61048061095e565b6040805161ffff9092168252519081900360200190f35b610139600480360360208110156104ad57600080fd5b50356001600160a01b031661096f565b610139600480360360208110156104d357600080fd5b50356001600160a01b0316610bd0565b610255600480360360a08110156104f957600080fd5b6001600160a01b038235169160208101359160408201359160608101359181019060a081016080820135600160201b81111561053457600080fd5b82018360208201111561054657600080fd5b803590602001918460018302840111600160201b8311171561056757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c54945050505050565b6101f2600480360360608110156105be57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156105e857600080fd5b8201836020820111156105fa57600080fd5b803590602001918460018302840111600160201b8311171561061b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610e28915050565b61020c610e84565b6004805460408051600160e31b6309ce3c1902815290516001600160a01b0390921692634e71e0c892828201926000929082900301818387803b1580156106ac57600080fd5b505af11580156106c0573d6000803e3d6000fd5b50505050565b60006106d53386868686610e93565b90505b949350505050565b6001546001600160a01b031681565b6006546001600160a01b031681565b6000546001600160a01b031681565b60076020526000908152604090205460ff1681565b3360009081526003602052604081205460ff1661077357604051600160e51b62461bcd0281526004018080602001828103825260288152602001806114ea6028913960400191505060405180910390fd5b6107808686868686610e93565b90505b95945050505050565b60006107993384846111e0565b9392505050565b6005546001600160a01b031681565b6005546001600160a01b031633146108115760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b60085481565b60025481565b60036020526000908152604090205460ff1681565b600080546001600160a01b0316156109075760005460408051600160e01b63dd3412990281526001600160a01b0388811660048301526024820188905260448201879052606482018690529151919092169163dd341299916084808301926020929190829003018186803b1580156108d457600080fd5b505afa1580156108e8573d6000803e3d6000fd5b505050506040513d60208110156108fe57600080fd5b505190506106d8565b50600454604080516001600160a01b0392831660208083019190915296909216828201526060820194909452608081019290925260a0808301919091528251808303909101815260c0909101909152805191012090565b600654600160a01b900461ffff1681565b6005546001600160a01b031633146109d15760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b6001546001600160a01b0382811691161480156109f057506002544210155b15610ba857600154600080546001600160a01b0319166001600160a01b039283161790558116610adb576004805460408051600160e01b638da5cb5b028152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b158015610a6257600080fd5b505afa158015610a76573d6000803e3d6000fd5b505050506040513d6020811015610a8c57600080fd5b50516001600160a01b031614610ad657604051600160e51b62461bcd0281526004018080602001828103825260278152602001806115126027913960400191505060405180910390fd5b610ba3565b600480546000805460408051600160e01b63f2fde38b0281526001600160a01b03928316958101959095525192169263f2fde38b926024808301939282900301818387803b158015610b2c57600080fd5b505af1158015610b40573d6000803e3d6000fd5b50506000805460408051600160e01b6310731a6502815290516001600160a01b0390921694506310731a659350600480820193929182900301818387803b158015610b8a57600080fd5b505af1158015610b9e573d6000803e3d6000fd5b505050505b610bcd565b620151804201600255600180546001600160a01b0319166001600160a01b0383161790555b50565b6005546001600160a01b03163314610c325760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b031615610d85576000809054906101000a90046001600160a01b03166001600160a01b031663f166901487878787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d04578181015183820152602001610cec565b50505050905090810190601f168015610d315780820380516001836020036101000a031916815260200191505b50965050505050505060206040518083038186803b158015610d5257600080fd5b505afa158015610d66573d6000803e3d6000fd5b505050506040513d6020811015610d7c57600080fd5b50519050610783565b60208201516040830151606084015160001a6001610da58a8a8a8a61085d565b82858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610dff573d6000803e3d6000fd5b5050604051601f1901516005546001600160a01b039182169116149a9950505050505050505050565b3360009081526003602052604081205460ff16610e7957604051600160e51b62461bcd0281526004018080602001828103825260288152602001806115396028913960400191505060405180910390fd5b6106d88484846111e0565b6004546001600160a01b031681565b600080546001600160a01b031615610fa7576000809054906101000a90046001600160a01b03166001600160a01b03166371d9222987878787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610f43578181015183820152602001610f2b565b50505050905090810190601f168015610f705780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b158015610f9357600080fd5b505af1158015610d66573d6000803e3d6000fd5b60008481526007602052604090205460ff161561100e5760408051600160e51b62461bcd02815260206004820152601860248201527f6e6f6e6365206861736820616c7265616479207370656e740000000000000000604482015290519081900360640190fd5b61101b8686868686610c54565b61106f5760408051600160e51b62461bcd02815260206004820152601160248201527f696e76616c6964207369676e6174757265000000000000000000000000000000604482015290519081900360640190fd5b60065460009061271090600160a01b900461ffff168702600087815260076020526040808220805460ff19166001179055600480548251600160e01b6340c10f190281526001600160a01b038e81169382019390935295909404808c0360248701529151919550909216926340c10f19926044808301939282900301818387803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b50506004805460065460408051600160e01b6340c10f190281526001600160a01b03928316948101949094526024840187905251911693506340c10f199250604480830192600092919082900301818387803b15801561116f57600080fd5b505af1158015611183573d6000803e3d6000fd5b50505050600854876001600160a01b03167fd79c73d5d7701ff70ab30939dd980af7276ff21617d890ff2ce150f3b5ea3d94886040518082815260200191505060405180910390a360088054600101905590940395945050505050565b600080546001600160a01b0316156112ef5760008054604051600160e11b637de4684f0281526001600160a01b038781166004830190815260448301879052606060248401908152885160648501528851929094169463fbc8d09e948a948a948a94936084909201916020870191908190849084905b8381101561126e578181015183820152602001611256565b50505050905090810190601f16801561129b5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156112bc57600080fd5b505af11580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b50519050610799565b82516113455760408051600160e51b62461bcd02815260206004820152601360248201527f746f206164647265737320697320656d70747900000000000000000000000000604482015290519081900360640190fd5b60065460009061271090600160a01b900461ffff1684026004805460408051600160e21b632770a7eb0281526001600160a01b038b8116948201949094526024810189905290519490930494501691639dc29fac9160448082019260009290919082900301818387803b1580156113bb57600080fd5b505af11580156113cf573d6000803e3d6000fd5b50506004805460065460408051600160e01b6340c10f190281526001600160a01b03928316948101949094526024840187905251911693506340c10f199250604480830192600092919082900301818387803b15801561142e57600080fd5b505af1158015611442573d6000803e3d6000fd5b50505050600854846040518082805190602001908083835b602083106114795780518252601f19909201916020918201910161145a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220888b03835293519395507f1005efb915fb4efa25ffd0757ae0c14b27112a87bbfd7547daf01830cd49930994509083900301919050a3600880546001019055909103939250505056fe6e6f7420617574686f72697a656420746f206d696e74206f6e20626568616c66206f6620757365726d757374206265206f776e6572206f6620746f6b656e20746f20726573657420757067726164656e6f7420617574686f72697a656420746f206275726e206f6e20626568616c66206f662075736572a165627a7a7230582019d1a407f5374315bdcaffedce1b2841d303e2454d75c5dae86af252d8aa88d90029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063ab595e0c116100ad578063ef4b41b911610071578063ef4b41b914610497578063f160d369146104bd578063f1669014146104e3578063fbc8d09e146105a8578063fc0c546a1461065e5761012c565b8063ab595e0c1461040a578063b07da53214610412578063b7f241311461041a578063dd34129914610440578063ddca3f43146104785761012c565b806352ad0d5e116100f457806352ad0d5e1461023857806371d92229146102695780638723c3771461032e5780639340b21e146103d45780639ce018c5146103dc5761012c565b806310731a65146101315780631ac945b81461013b5780631f0e95fd1461020457806346904840146102285780634ebc490c14610230575b600080fd5b610139610666565b005b6101f26004803603608081101561015157600080fd5b81359160208101359160408201359190810190608081016060820135600160201b81111561017e57600080fd5b82018360208201111561019057600080fd5b803590602001918460018302840111600160201b831117156101b157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106c6945050505050565b60408051918252519081900360200190f35b61020c6106e0565b604080516001600160a01b039092168252519081900360200190f35b61020c6106ef565b61020c6106fe565b6102556004803603602081101561024e57600080fd5b503561070d565b604080519115158252519081900360200190f35b6101f2600480360360a081101561027f57600080fd5b6001600160a01b038235169160208101359160408201359160608101359181019060a081016080820135600160201b8111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460018302840111600160201b831117156102ed57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610722945050505050565b6101f26004803603604081101561034457600080fd5b810190602081018135600160201b81111561035e57600080fd5b82018360208201111561037057600080fd5b803590602001918460018302840111600160201b8311171561039157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061078c915050565b61020c6107a0565b610139600480360360408110156103f257600080fd5b506001600160a01b03813516906020013515156107af565b6101f261083c565b6101f2610842565b6102556004803603602081101561043057600080fd5b50356001600160a01b0316610848565b6101f26004803603608081101561045657600080fd5b506001600160a01b03813516906020810135906040810135906060013561085d565b61048061095e565b6040805161ffff9092168252519081900360200190f35b610139600480360360208110156104ad57600080fd5b50356001600160a01b031661096f565b610139600480360360208110156104d357600080fd5b50356001600160a01b0316610bd0565b610255600480360360a08110156104f957600080fd5b6001600160a01b038235169160208101359160408201359160608101359181019060a081016080820135600160201b81111561053457600080fd5b82018360208201111561054657600080fd5b803590602001918460018302840111600160201b8311171561056757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c54945050505050565b6101f2600480360360608110156105be57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156105e857600080fd5b8201836020820111156105fa57600080fd5b803590602001918460018302840111600160201b8311171561061b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610e28915050565b61020c610e84565b6004805460408051600160e31b6309ce3c1902815290516001600160a01b0390921692634e71e0c892828201926000929082900301818387803b1580156106ac57600080fd5b505af11580156106c0573d6000803e3d6000fd5b50505050565b60006106d53386868686610e93565b90505b949350505050565b6001546001600160a01b031681565b6006546001600160a01b031681565b6000546001600160a01b031681565b60076020526000908152604090205460ff1681565b3360009081526003602052604081205460ff1661077357604051600160e51b62461bcd0281526004018080602001828103825260288152602001806114ea6028913960400191505060405180910390fd5b6107808686868686610e93565b90505b95945050505050565b60006107993384846111e0565b9392505050565b6005546001600160a01b031681565b6005546001600160a01b031633146108115760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b60085481565b60025481565b60036020526000908152604090205460ff1681565b600080546001600160a01b0316156109075760005460408051600160e01b63dd3412990281526001600160a01b0388811660048301526024820188905260448201879052606482018690529151919092169163dd341299916084808301926020929190829003018186803b1580156108d457600080fd5b505afa1580156108e8573d6000803e3d6000fd5b505050506040513d60208110156108fe57600080fd5b505190506106d8565b50600454604080516001600160a01b0392831660208083019190915296909216828201526060820194909452608081019290925260a0808301919091528251808303909101815260c0909101909152805191012090565b600654600160a01b900461ffff1681565b6005546001600160a01b031633146109d15760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b6001546001600160a01b0382811691161480156109f057506002544210155b15610ba857600154600080546001600160a01b0319166001600160a01b039283161790558116610adb576004805460408051600160e01b638da5cb5b028152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b158015610a6257600080fd5b505afa158015610a76573d6000803e3d6000fd5b505050506040513d6020811015610a8c57600080fd5b50516001600160a01b031614610ad657604051600160e51b62461bcd0281526004018080602001828103825260278152602001806115126027913960400191505060405180910390fd5b610ba3565b600480546000805460408051600160e01b63f2fde38b0281526001600160a01b03928316958101959095525192169263f2fde38b926024808301939282900301818387803b158015610b2c57600080fd5b505af1158015610b40573d6000803e3d6000fd5b50506000805460408051600160e01b6310731a6502815290516001600160a01b0390921694506310731a659350600480820193929182900301818387803b158015610b8a57600080fd5b505af1158015610b9e573d6000803e3d6000fd5b505050505b610bcd565b620151804201600255600180546001600160a01b0319166001600160a01b0383161790555b50565b6005546001600160a01b03163314610c325760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b031615610d85576000809054906101000a90046001600160a01b03166001600160a01b031663f166901487878787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d04578181015183820152602001610cec565b50505050905090810190601f168015610d315780820380516001836020036101000a031916815260200191505b50965050505050505060206040518083038186803b158015610d5257600080fd5b505afa158015610d66573d6000803e3d6000fd5b505050506040513d6020811015610d7c57600080fd5b50519050610783565b60208201516040830151606084015160001a6001610da58a8a8a8a61085d565b82858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610dff573d6000803e3d6000fd5b5050604051601f1901516005546001600160a01b039182169116149a9950505050505050505050565b3360009081526003602052604081205460ff16610e7957604051600160e51b62461bcd0281526004018080602001828103825260288152602001806115396028913960400191505060405180910390fd5b6106d88484846111e0565b6004546001600160a01b031681565b600080546001600160a01b031615610fa7576000809054906101000a90046001600160a01b03166001600160a01b03166371d9222987878787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610f43578181015183820152602001610f2b565b50505050905090810190601f168015610f705780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b158015610f9357600080fd5b505af1158015610d66573d6000803e3d6000fd5b60008481526007602052604090205460ff161561100e5760408051600160e51b62461bcd02815260206004820152601860248201527f6e6f6e6365206861736820616c7265616479207370656e740000000000000000604482015290519081900360640190fd5b61101b8686868686610c54565b61106f5760408051600160e51b62461bcd02815260206004820152601160248201527f696e76616c6964207369676e6174757265000000000000000000000000000000604482015290519081900360640190fd5b60065460009061271090600160a01b900461ffff168702600087815260076020526040808220805460ff19166001179055600480548251600160e01b6340c10f190281526001600160a01b038e81169382019390935295909404808c0360248701529151919550909216926340c10f19926044808301939282900301818387803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b50506004805460065460408051600160e01b6340c10f190281526001600160a01b03928316948101949094526024840187905251911693506340c10f199250604480830192600092919082900301818387803b15801561116f57600080fd5b505af1158015611183573d6000803e3d6000fd5b50505050600854876001600160a01b03167fd79c73d5d7701ff70ab30939dd980af7276ff21617d890ff2ce150f3b5ea3d94886040518082815260200191505060405180910390a360088054600101905590940395945050505050565b600080546001600160a01b0316156112ef5760008054604051600160e11b637de4684f0281526001600160a01b038781166004830190815260448301879052606060248401908152885160648501528851929094169463fbc8d09e948a948a948a94936084909201916020870191908190849084905b8381101561126e578181015183820152602001611256565b50505050905090810190601f16801561129b5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156112bc57600080fd5b505af11580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b50519050610799565b82516113455760408051600160e51b62461bcd02815260206004820152601360248201527f746f206164647265737320697320656d70747900000000000000000000000000604482015290519081900360640190fd5b60065460009061271090600160a01b900461ffff1684026004805460408051600160e21b632770a7eb0281526001600160a01b038b8116948201949094526024810189905290519490930494501691639dc29fac9160448082019260009290919082900301818387803b1580156113bb57600080fd5b505af11580156113cf573d6000803e3d6000fd5b50506004805460065460408051600160e01b6340c10f190281526001600160a01b03928316948101949094526024840187905251911693506340c10f199250604480830192600092919082900301818387803b15801561142e57600080fd5b505af1158015611442573d6000803e3d6000fd5b50505050600854846040518082805190602001908083835b602083106114795780518252601f19909201916020918201910161145a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220888b03835293519395507f1005efb915fb4efa25ffd0757ae0c14b27112a87bbfd7547daf01830cd49930994509083900301919050a3600880546001019055909103939250505056fe6e6f7420617574686f72697a656420746f206d696e74206f6e20626568616c66206f6620757365726d757374206265206f776e6572206f6620746f6b656e20746f20726573657420757067726164656e6f7420617574686f72697a656420746f206275726e206f6e20626568616c66206f662075736572a165627a7a7230582019d1a407f5374315bdcaffedce1b2841d303e2454d75c5dae86af252d8aa88d90029", + "sourceMap": "7687:251:7:-;;;1326:1;1297:30;;7724:212;8:9:-1;5:2;;;30:1;27;20:12;5:2;7724:212:7;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;7724:212:7;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1825:35:7;;;;;;;:17;:35;;;;;;;:42;;-1:-1:-1;;1825:42:7;1863:4;1825:42;;;1877:5;:14;;;;;-1:-1:-1;;;;;;1877:14:7;;;;;;1901:13;:30;;;;;;;;;;;;;;;1941:3;:10;;1961:28;;;;1941:10;;;;;;-1:-1:-1;;;;;;1941:10:7;;;;;;;1961:28;;;;;;;;;7687:251;;;;;;", + "deployedSourceMap": "7687:251:7:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7687:251:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2200:77;;;:::i;:::-;;4009:185;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;4009:185:7;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4009:185:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4009:185:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4009:185:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4009:185:7;;-1:-1:-1;4009:185:7;;-1:-1:-1;;;;;4009:185:7:i;:::-;;;;;;;;;;;;;;;;513:33;;;:::i;:::-;;;;-1:-1:-1;;;;;513:33:7;;;;;;;;;;;;;;1104:27;;;:::i;481:26::-;;;:::i;1253:37::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1253:37:7;;:::i;:::-;;;;;;;;;;;;;;;;;;4274:290;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;4274:290:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4274:290:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4274:290:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4274:290:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4274:290:7;;-1:-1:-1;4274:290:7;;-1:-1:-1;;;;;4274:290:7:i;5475:137::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5475:137:7;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;5475:137:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5475:137:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;5475:137:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;5475:137:7;;-1:-1:-1;;5475:137:7;;;-1:-1:-1;5475:137:7;;-1:-1:-1;;5475:137:7:i;966:28::-;;;:::i;2283:143::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2283:143:7;;;;;;;;;;:::i;1297:30::-;;;:::i;552:33::-;;;:::i;730:48::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;730:48:7;-1:-1:-1;;;;;730:48:7;;:::i;7336:310::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;7336:310:7;;;;;;;;;;;;;;;;;;:::i;1179:17::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2891:1030;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2891:1030:7;-1:-1:-1;;;;;2891:1030:7;;:::i;2572:129::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2572:129:7;-1:-1:-1;;;;;2572:129:7;;:::i;6627:629::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;6627:629:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6627:629:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6627:629:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;6627:629:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;6627:629:7;;-1:-1:-1;6627:629:7;;-1:-1:-1;;;;;6627:629:7:i;5692:246::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;5692:246:7;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;5692:246:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5692:246:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;5692:246:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;5692:246:7;;-1:-1:-1;;5692:246:7;;;-1:-1:-1;5692:246:7;;-1:-1:-1;;5692:246:7:i;857:25::-;;;:::i;2200:77::-;2248:5;;;:22;;;-1:-1:-1;;;;;2248:22:7;;;;-1:-1:-1;;;;;2248:5:7;;;;:20;;:22;;;;:5;;:22;;;;;;:5;;:22;;;5:2:-1;;;;30:1;27;20:12;5:2;2248:22:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2248:22:7;;;;2200:77::o;4009:185::-;4110:7;4136:51;4145:10;4157:7;4166:6;4174;4182:4;4136:8;:51::i;:::-;4129:58;;4009:185;;;;;;;:::o;513:33::-;;;-1:-1:-1;;;;;513:33:7;;:::o;1104:27::-;;;-1:-1:-1;;;;;1104:27:7;;:::o;481:26::-;;;-1:-1:-1;;;;;481:26:7;;:::o;1253:37::-;;;;;;;;;;;;;;;:::o;4274:290::-;4440:10;4395:7;4422:29;;;:17;:29;;;;;;;;4414:82;;;;-1:-1:-1;;;;;4414:82:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4513:44;4522:3;4527:7;4536:6;4544;4552:4;4513:8;:44::i;:::-;4506:51;;4274:290;;;;;;;;:::o;5475:137::-;5544:7;5570:35;5580:10;5592:3;5597:7;5570:9;:35::i;:::-;5563:42;5475:137;-1:-1:-1;;;5475:137:7:o;966:28::-;;;-1:-1:-1;;;;;966:28:7;;:::o;2283:143::-;1625:13;;-1:-1:-1;;;;;1625:13:7;1611:10;:27;1603:62;;;;;-1:-1:-1;;;;;1603:62:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2379:27:7;;;;;;;;:17;:27;;;;;:40;;-1:-1:-1;;2379:40:7;;;;;;;;;;2283:143::o;1297:30::-;;;;:::o;552:33::-;;;;:::o;730:48::-;;;;;;;;;;;;;;;:::o;7336:310::-;7436:7;7459:11;;-1:-1:-1;;;;;7459:11:7;:27;7455:101;;7504:11;;7496:58;;;-1:-1:-1;;;;;7496:58:7;;-1:-1:-1;;;;;7496:58:7;;;;;;;;;;;;;;;;;;;;;;;;;;;7504:11;;;;;7496:28;;:58;;;;;;;;;;;;;;7504:11;7496:58;;;5:2:-1;;;;30:1;27;20:12;5:2;7496:58:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7496:58:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7496:58:7;;-1:-1:-1;7489:65:7;;7455:101;-1:-1:-1;7601:5:7;;7582:56;;;-1:-1:-1;;;;;7601:5:7;;;7582:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;7582:56:7;;;;;;;7572:67;;;;;;7336:310::o;1179:17::-;;;-1:-1:-1;;;1179:17:7;;;;;:::o;2891:1030::-;1625:13;;-1:-1:-1;;;;;1625:13:7;1611:10;:27;1603:62;;;;;-1:-1:-1;;;;;1603:62:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;3057:18;;-1:-1:-1;;;;;3041:34:7;;;3057:18;;3041:34;:75;;;;;3098:18;;3079:15;:37;;3041:75;3037:878;;;3307:18;;;3293:32;;-1:-1:-1;;;;;;3293:32:7;-1:-1:-1;;;;;3307:18:7;;;3293:32;;;3344:28;;3340:293;;3400:5;;;:13;;;-1:-1:-1;;;;;3400:13:7;;;;3425:4;;-1:-1:-1;;;;;3400:5:7;;;;:11;;:13;;;;;;;;;;;;;:5;:13;;;5:2:-1;;;;30:1;27;20:12;5:2;3400:13:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3400:13:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3400:13:7;-1:-1:-1;;;;;3400:30:7;;3392:82;;;;-1:-1:-1;;;;;3392:82:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3340:293;;;3513:5;;;;3545:11;;3513:45;;;-1:-1:-1;;;;;3513:45:7;;-1:-1:-1;;;;;3545:11:7;;;3513:45;;;;;;;;:5;;;:23;;:45;;;;;:5;:45;;;;;:5;;:45;;;5:2:-1;;;;30:1;27;20:12;5:2;3513:45:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;3584:11:7;;;3576:42;;;-1:-1:-1;;;;;3576:42:7;;;;-1:-1:-1;;;;;3584:11:7;;;;-1:-1:-1;3576:40:7;;-1:-1:-1;3576:42:7;;;;;3584:11;3576:42;;;;;;3584:11;;3576:42;;;5:2:-1;;;;30:1;27;20:12;5:2;3576:42:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3576:42:7;;;;3340:293;3037:878;;;630:19;3820:15;:37;3799:18;:58;3871:18;:33;;-1:-1:-1;;;;;;3871:33:7;-1:-1:-1;;;;;3871:33:7;;;;;3037:878;2891:1030;:::o;2572:129::-;1625:13;;-1:-1:-1;;;;;1625:13:7;1611:10;:27;1603:62;;;;;-1:-1:-1;;;;;1603:62:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;2662:12;:32;;-1:-1:-1;;;;;;2662:32:7;-1:-1:-1;;;;;2662:32:7;;;;;;;;;;2572:129::o;6627:629::-;6748:4;6768:11;;-1:-1:-1;;;;;6768:11:7;:27;6764:109;;6813:11;;;;;;;;;-1:-1:-1;;;;;6813:11:7;-1:-1:-1;;;;;6805:30:7;;6836:3;6841:7;6850:6;6858;6866:4;6805:66;;;;;;;;;;;;;-1:-1:-1;;;;;6805:66:7;-1:-1:-1;;;;;6805:66:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;6805:66:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6805:66:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6805:66:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6805:66:7;;-1:-1:-1;6798:73:7;;6764:109;7053:4;7043:15;;7037:22;7093:4;7083:15;;7077:22;7141:4;7131:15;;7125:22;6883:9;7117:31;7192:57;7202:37;7210:3;7215:7;7224:6;7232;7202:7;:37::i;:::-;7241:1;7244;7247;7192:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;7192:57:7;;-1:-1:-1;;7192:57:7;;7175:13;;-1:-1:-1;;;;;7175:74:7;;;:13;;:74;;6627:629;-1:-1:-1;;;;;;;;;;6627:629:7:o;5692:246::-;5828:10;5783:7;5810:29;;;:17;:29;;;;;;;;5802:82;;;;-1:-1:-1;;;;;5802:82:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5901:30;5911:5;5918:3;5923:7;5901:9;:30::i;857:25::-;;;-1:-1:-1;;;;;857:25:7;;:::o;4684:703::-;4801:7;4824:11;;-1:-1:-1;;;;;4824:11:7;:27;4820:114;;4869:11;;;;;;;;;-1:-1:-1;;;;;4869:11:7;-1:-1:-1;;;;;4861:35:7;;4897:3;4902:7;4911:6;4919;4927:4;4861:71;;;;;;;;;;;;;-1:-1:-1;;;;;4861:71:7;-1:-1:-1;;;;;4861:71:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4861:71:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4861:71:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;4820:114:7;4952:14;;;;:6;:14;;;;;;;;:23;4944:60;;;;;-1:-1:-1;;;;;4944:60:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;5022:45;5032:3;5037:7;5046:6;5054;5062:4;5022:9;:45::i;:::-;5014:75;;;;;-1:-1:-1;;;;;5014:75:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;5132:3;;5099:19;;5137:5;;-1:-1:-1;;;5132:3:7;;;;5122:13;;5152:14;;;;:6;:14;;;;;;:21;;-1:-1:-1;;5152:21:7;5169:4;5152:21;;;5183:5;;;:36;;-1:-1:-1;;;;;5183:36:7;;-1:-1:-1;;;;;5183:36:7;;;;;;;;;;5121:21;;;;5199:19;;;5183:36;;;;;;5121:21;;-1:-1:-1;5183:5:7;;;;:10;;:36;;;;;5152:14;5183:36;;;;;5152:14;5183:5;:36;;;5:2:-1;;;;30:1;27;20:12;5:2;5183:36:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;5229:5:7;;;5240:12;;5229:37;;;-1:-1:-1;;;;;5229:37:7;;-1:-1:-1;;;;;5240:12:7;;;5229:37;;;;;;;;;;;;;;:5;;;-1:-1:-1;5229:10:7;;-1:-1:-1;5229:37:7;;;;;:5;;:37;;;;;;;:5;;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;5229:37:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5229:37:7;;;;5306:11;;5292:3;-1:-1:-1;;;;;5281:37:7;;5297:7;5281:37;;;;;;;;;;;;;;;;;;5328:11;:16;;5343:1;5328:16;;;5361:19;;;;4684:703;-1:-1:-1;;;;;4684:703:7:o;5944:576::-;6031:7;6054:11;;-1:-1:-1;;;;;6054:11:7;:27;6050:100;;6099:11;;;6091:57;;-1:-1:-1;;;;;6091:57:7;;-1:-1:-1;;;;;6091:57:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6099:11;;;;;6091:36;;6128:5;;6135:3;;6140:7;;6091:57;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;6091:57:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6091:57:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6091:57:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6091:57:7;;-1:-1:-1;6084:64:7;;6050:100;6167:10;;6159:47;;;;;-1:-1:-1;;;;;6159:47:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;6250:3;;6217:19;;6255:5;;-1:-1:-1;;;6250:3:7;;;;6240:13;;6312:5;;;:26;;;-1:-1:-1;;;;;6312:26:7;;-1:-1:-1;;;;;6312:26:7;;;;;;;;;;;;;;;;;;6239:21;;;;;-1:-1:-1;6312:5:7;;:10;;:26;;;;;:5;;:26;;;;;;;;:5;;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;6312:26:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;6348:5:7;;;6359:12;;6348:37;;;-1:-1:-1;;;;;6348:37:7;;-1:-1:-1;;;;;6359:12:7;;;6348:37;;;;;;;;;;;;;;:5;;;-1:-1:-1;6348:10:7;;-1:-1:-1;6348:37:7;;;;;:5;;:37;;;;;;;:5;;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;6348:37:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6348:37:7;;;;6439:11;;6413:3;6401:50;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;6401:50:7;;;;;;;;;;;;6418:19;;;6401:50;;;;;;-1:-1:-1;6401:50:7;;-1:-1:-1;6401:50:7;;;;;;;-1:-1:-1;6401:50:7;6461:11;:16;;6476:1;6461:16;;;6494:19;;;;5944:576;-1:-1:-1;;;5944:576:7:o", + "source": "pragma solidity ^0.5.8;\n\nimport \"./ERC20Shifted.sol\";\n\ncontract Shifter {\n /// @notice Shifter can be upgraded by setting a `nextShifter`. The\n /// forwarding address is only set after a delay has passed.\n /// This upgradability pattern is not as sophisticated as a DelegateProxy,\n /// but is less error prone. It's downsides are higher gas fees when using\n /// the old address, and every function needing to forward the call,\n /// including storage getters.\n address public nextShifter;\n address public pendingNextShifter;\n uint256 public shifterUpgradeTime;\n uint256 constant shifterUpgradeDelay = 0.5 days + 0.5 days;\n\n /// @notice A set of contracts that can call burn on behalf of a user\n mapping (address=>bool) public authorizedWrapper;\n\n /// @notice Each Shifter token is tied to a specific shifted token.\n ERC20Shifted public token;\n\n /// @notice The mintAuthority is an address that can sign mint requests.\n address public mintAuthority;\n\n /// @notice When tokens a burnt, a portion of the tokens are forwarded to\n /// a fee recipient.\n address public feeRecipient;\n\n /// @notice The burning fee in bips.\n uint16 public fee;\n\n /// @notice Each nHash can only be seen once.\n mapping (bytes32=>bool) public status;\n\n uint256 public nextShiftID = 0;\n\n event LogShiftIn(address indexed _to, uint256 _amount, uint256 indexed _shiftID);\n event LogShiftOut(bytes indexed _to, uint256 _amount, uint256 indexed _shiftID);\n\n /// @notice Only allow the Darknode Payment contract.\n modifier onlyMintAuthority() {\n require(msg.sender == mintAuthority, \"must be mint authority\");\n _;\n }\n\n constructor(address _previousShifter, ERC20Shifted _token, address _feeRecipient, address _mintAuthority, uint16 _fee) public {\n authorizedWrapper[_previousShifter] = true;\n token = _token;\n mintAuthority = _mintAuthority;\n fee = _fee;\n feeRecipient = _feeRecipient;\n }\n\n /// @notice Claims ownership of the token passed in to the constructor.\n /// `transferStoreOwnership` must have previously been called.\n /// Anyone can call this function.\n function claimTokenOwnership() public {\n token.claimOwnership();\n }\n\n function authorizeWrapper(address _wrapper, bool authorized) public onlyMintAuthority {\n authorizedWrapper[_wrapper] = authorized;\n }\n\n /// @notice Allow the mint authority to update the fee recipient.\n /// @param _nextFeeRecipient The address to start paying fees to.\n function updateFeeRecipient(address _nextFeeRecipient) public onlyMintAuthority {\n feeRecipient = _nextFeeRecipient;\n }\n\n /// @notice Allows the mint authority to initiate an ownership transfer of\n /// the token.\n /// @param _nextShifter The address to transfer the ownership to, or 0x0.\n function upgradeShifter(address _nextShifter) public onlyMintAuthority {\n /* solium-disable-next-line security/no-block-members */\n if (_nextShifter == pendingNextShifter && block.timestamp >= shifterUpgradeTime) {\n // If the delay has passed and the next shifter isn't been changed,\n // transfer the token to the next shifter and start pointing to it.\n\n nextShifter = pendingNextShifter;\n\n if (_nextShifter == address(0x0)) {\n require(token.owner() == address(this), \"must be owner of token to reset upgrade\");\n } else {\n token.transferOwnership(address(nextShifter));\n Shifter(nextShifter).claimTokenOwnership();\n }\n } else {\n // Start a timer so allow the shifter to be upgraded.\n\n /* solium-disable-next-line security/no-block-members */\n shifterUpgradeTime = block.timestamp + shifterUpgradeDelay;\n pendingNextShifter = _nextShifter;\n }\n }\n\n /// @notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.\n function shiftIn(uint256 _amount, bytes32 _nHash, bytes32 _pHash, bytes memory _sig) public returns (uint256) {\n return _shiftIn(msg.sender, _amount, _nHash, _pHash, _sig);\n }\n\n /// @notice Callable by the previous Shifter if it has been upgraded.\n function forwardShiftIn(address _to, uint256 _amount, bytes32 _nHash, bytes32 _pHash, bytes memory _sig) public returns (uint256) {\n require(authorizedWrapper[msg.sender], \"not authorized to mint on behalf of user\");\n return _shiftIn(_to, _amount, _nHash, _pHash, _sig);\n }\n\n /// @notice shiftIn mints new tokens after verifying the signature and\n /// transfers the tokens to `_to`.\n function _shiftIn(address _to, uint256 _amount, bytes32 _nHash, bytes32 _pHash, bytes memory _sig) internal returns (uint256) {\n if (nextShifter != address(0x0)) {return Shifter(nextShifter).forwardShiftIn(_to, _amount, _nHash, _pHash, _sig);}\n\n require(status[_nHash] == false, \"nonce hash already spent\");\n require(verifySig(_to, _amount, _nHash, _pHash, _sig), \"invalid signature\");\n uint256 absoluteFee = (_amount * fee)/10000;\n status[_nHash] = true;\n token.mint(_to, _amount-absoluteFee);\n token.mint(feeRecipient, absoluteFee);\n emit LogShiftIn(_to, _amount, nextShiftID);\n nextShiftID += 1;\n return _amount-absoluteFee;\n }\n\n /// @notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.\n function shiftOut(bytes memory _to, uint256 _amount) public returns (uint256) {\n return _shiftOut(msg.sender, _to, _amount);\n }\n\n /// @notice Callable by the previous Shifter if it has been upgraded.\n function forwardShiftOut(address _from, bytes memory _to, uint256 _amount) public returns (uint256) {\n require(authorizedWrapper[msg.sender], \"not authorized to burn on behalf of user\");\n return _shiftOut(_from, _to, _amount);\n }\n\n function _shiftOut(address _from, bytes memory _to, uint256 _amount) internal returns (uint256) {\n if (nextShifter != address(0x0)) {return Shifter(nextShifter).forwardShiftOut(_from, _to, _amount);}\n require(_to.length != 0, \"to address is empty\");\n\n uint256 absoluteFee = (_amount * fee)/10000;\n\n // Burn full amount and mint fee\n token.burn(_from, _amount);\n token.mint(feeRecipient, absoluteFee);\n\n emit LogShiftOut(_to, _amount-absoluteFee, nextShiftID);\n nextShiftID += 1;\n return _amount-absoluteFee;\n }\n\n /// @notice verifySig checks the the provided signature matches the provided\n /// parameters.\n function verifySig(address _to, uint256 _amount, bytes32 _nHash, bytes32 _pHash, bytes memory _sig) public view returns (bool) {\n if (nextShifter != address(0x0)) {return Shifter(nextShifter).verifySig(_to, _amount, _nHash, _pHash, _sig);}\n\n bytes32 r;\n bytes32 s;\n uint8 v;\n /* solium-disable-next-line */ /* solhint-disable-next-line */\n assembly {\n r := mload(add(_sig, 0x20))\n s := mload(add(_sig, 0x40))\n v := byte(0, mload(add(_sig, 0x60)))\n }\n\n return mintAuthority == ecrecover(sigHash(_to, _amount, _nHash, _pHash), v, r, s);\n }\n\n /// @notice sigHash hashes the parameters so that they can be signed.\n function sigHash(address _to, uint256 _amount, bytes32 _nHash, bytes32 _pHash) public view returns (bytes32) {\n if (nextShifter != address(0x0)) {return Shifter(nextShifter).sigHash(_to, _amount, _nHash, _pHash);}\n return keccak256(abi.encode(address(token), _to, _amount, _nHash, _pHash));\n }\n}\n\n/* solium-disable no-empty-blocks */\ncontract BTCShifter is Shifter {\n constructor(address _previousShifter, ERC20Shifted _token, address _feeRecipient, address _mintAuthority, uint16 _fee)\n Shifter(_previousShifter, _token, _feeRecipient, _mintAuthority, _fee) public {\n }\n}\n\ncontract ZECShifter is Shifter {\n constructor(address _previousShifter, ERC20Shifted _token, address _feeRecipient, address _mintAuthority, uint16 _fee)\n Shifter(_previousShifter, _token, _feeRecipient, _mintAuthority, _fee) public {\n }\n}", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol", + "exportedSymbols": { + "BTCShifter": [ + 3465 + ], + "Shifter": [ + 3441 + ], + "ZECShifter": [ + 3489 + ] + }, + "id": 3490, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2867, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "file": "./ERC20Shifted.sol", + "id": 2868, + "nodeType": "ImportDirective", + "scope": 3490, + "sourceUnit": 2866, + "src": "25:28:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3441, + "linearizedBaseContracts": [ + 3441 + ], + "name": "Shifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2870, + "name": "nextShifter", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "481:26:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2869, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "481:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2872, + "name": "pendingNextShifter", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "513:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2871, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "513:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2874, + "name": "shifterUpgradeTime", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "552:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2873, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "552:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 2879, + "name": "shifterUpgradeDelay", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "591:58:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2875, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "591:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "302e35", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "630:8:7", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_43200_by_1", + "typeString": "int_const 43200" + }, + "value": "0.5" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "302e35", + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "641:8:7", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_43200_by_1", + "typeString": "int_const 43200" + }, + "value": "0.5" + }, + "src": "630:19:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2883, + "name": "authorizedWrapper", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "730:48:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 2882, + "keyType": { + "id": 2880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "739:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "730:23:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 2881, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "748:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2885, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "857:25:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 2884, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "857:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2887, + "name": "mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "966:28:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2886, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2889, + "name": "feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1104:27:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1104:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2891, + "name": "fee", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1179:17:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2890, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1179:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2895, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1253:37:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 2894, + "keyType": { + "id": 2892, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1262:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1253:23:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 2893, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1271:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2898, + "name": "nextShiftID", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1297:30:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1297:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 2897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1326:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 2906, + "name": "LogShiftIn", + "nodeType": "EventDefinition", + "parameters": { + "id": 2905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2900, + "indexed": true, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1351:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2899, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1351:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2902, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1372:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2901, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1372:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2904, + "indexed": true, + "name": "_shiftID", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1389:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2903, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1389:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1350:64:7" + }, + "src": "1334:81:7" + }, + { + "anonymous": false, + "documentation": null, + "id": 2914, + "name": "LogShiftOut", + "nodeType": "EventDefinition", + "parameters": { + "id": 2913, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2908, + "indexed": true, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1438:17:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2907, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1438:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2910, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1457:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2909, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1457:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2912, + "indexed": true, + "name": "_shiftID", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1474:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2911, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1474:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1437:62:7" + }, + "src": "1420:80:7" + }, + { + "body": { + "id": 2925, + "nodeType": "Block", + "src": "1593:90:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "1611:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1611:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2919, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "1625:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1611:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206d696e7420617574686f72697479", + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1640:24:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_08f5b9e01a8f2dc96554e860d9dabb9526a5f2869857ae4bb74eefaa701ebf43", + "typeString": "literal_string \"must be mint authority\"" + }, + "value": "must be mint authority" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_08f5b9e01a8f2dc96554e860d9dabb9526a5f2869857ae4bb74eefaa701ebf43", + "typeString": "literal_string \"must be mint authority\"" + } + ], + "id": 2916, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "1603:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1603:62:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2923, + "nodeType": "ExpressionStatement", + "src": "1603:62:7" + }, + { + "id": 2924, + "nodeType": "PlaceholderStatement", + "src": "1675:1:7" + } + ] + }, + "documentation": "@notice Only allow the Darknode Payment contract.", + "id": 2926, + "name": "onlyMintAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 2915, + "nodeType": "ParameterList", + "parameters": [], + "src": "1590:2:7" + }, + "src": "1564:119:7", + "visibility": "internal" + }, + { + "body": { + "id": 2961, + "nodeType": "Block", + "src": "1815:181:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2939, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "1825:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2941, + "indexExpression": { + "argumentTypes": null, + "id": 2940, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2928, + "src": "1843:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1825:35:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1863:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1825:42:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "1825:42:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2945, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "1877:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2946, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2930, + "src": "1885:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "src": "1877:14:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2948, + "nodeType": "ExpressionStatement", + "src": "1877:14:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2949, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "1901:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2950, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2934, + "src": "1917:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1901:30:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2952, + "nodeType": "ExpressionStatement", + "src": "1901:30:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2953, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "1941:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2954, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "1947:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "1941:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 2956, + "nodeType": "ExpressionStatement", + "src": "1941:10:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2957, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "1961:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2958, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2932, + "src": "1976:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1961:28:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2960, + "nodeType": "ExpressionStatement", + "src": "1961:28:7" + } + ] + }, + "documentation": null, + "id": 2962, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2928, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1701:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1701:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2930, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1727:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 2929, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "1727:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2932, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1748:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2931, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1748:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2934, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1771:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2933, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1771:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2936, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1795:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2935, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1795:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1700:107:7" + }, + "returnParameters": { + "id": 2938, + "nodeType": "ParameterList", + "parameters": [], + "src": "1815:0:7" + }, + "scope": 3441, + "src": "1689:307:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2970, + "nodeType": "Block", + "src": "2238:39:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2965, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "2248:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "2248:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2248:22:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2969, + "nodeType": "ExpressionStatement", + "src": "2248:22:7" + } + ] + }, + "documentation": "@notice Claims ownership of the token passed in to the constructor.\n `transferStoreOwnership` must have previously been called.\n Anyone can call this function.", + "id": 2971, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimTokenOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2963, + "nodeType": "ParameterList", + "parameters": [], + "src": "2228:2:7" + }, + "returnParameters": { + "id": 2964, + "nodeType": "ParameterList", + "parameters": [], + "src": "2238:0:7" + }, + "scope": 3441, + "src": "2200:77:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2986, + "nodeType": "Block", + "src": "2369:57:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2980, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "2379:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2982, + "indexExpression": { + "argumentTypes": null, + "id": 2981, + "name": "_wrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2973, + "src": "2397:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2379:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2983, + "name": "authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2975, + "src": "2409:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2379:40:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2985, + "nodeType": "ExpressionStatement", + "src": "2379:40:7" + } + ] + }, + "documentation": null, + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2978, + "modifierName": { + "argumentTypes": null, + "id": 2977, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2351:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2351:17:7" + } + ], + "name": "authorizeWrapper", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2973, + "name": "_wrapper", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2309:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2972, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2309:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2975, + "name": "authorized", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2327:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2974, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2327:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2308:35:7" + }, + "returnParameters": { + "id": 2979, + "nodeType": "ParameterList", + "parameters": [], + "src": "2369:0:7" + }, + "scope": 3441, + "src": "2283:143:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2998, + "nodeType": "Block", + "src": "2652:49:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2994, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "2662:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2995, + "name": "_nextFeeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2989, + "src": "2677:17:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2662:32:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2997, + "nodeType": "ExpressionStatement", + "src": "2662:32:7" + } + ] + }, + "documentation": "@notice Allow the mint authority to update the fee recipient.\n @param _nextFeeRecipient The address to start paying fees to.", + "id": 2999, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2992, + "modifierName": { + "argumentTypes": null, + "id": 2991, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2634:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2634:17:7" + } + ], + "name": "updateFeeRecipient", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2989, + "name": "_nextFeeRecipient", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "2600:25:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2988, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2600:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2599:27:7" + }, + "returnParameters": { + "id": 2993, + "nodeType": "ParameterList", + "parameters": [], + "src": "2652:0:7" + }, + "scope": 3441, + "src": "2572:129:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3065, + "nodeType": "Block", + "src": "2962:959:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3006, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3041:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3007, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3057:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3041:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3009, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3079:5:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3079:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3011, + "name": "shifterUpgradeTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2874, + "src": "3098:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3079:37:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3041:75:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3063, + "nodeType": "Block", + "src": "3649:266:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3052, + "name": "shifterUpgradeTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2874, + "src": "3799:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3053, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3820:5:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3820:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 3055, + "name": "shifterUpgradeDelay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2879, + "src": "3838:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3820:37:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3799:58:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3058, + "nodeType": "ExpressionStatement", + "src": "3799:58:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3059, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3871:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3060, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3892:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3871:33:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3062, + "nodeType": "ExpressionStatement", + "src": "3871:33:7" + } + ] + }, + "id": 3064, + "nodeType": "IfStatement", + "src": "3037:878:7", + "trueBody": { + "id": 3051, + "nodeType": "Block", + "src": "3118:525:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3014, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3293:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3015, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3307:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3293:32:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3017, + "nodeType": "ExpressionStatement", + "src": "3293:32:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3018, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3344:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3020, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3368:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3360:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3360:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3344:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3049, + "nodeType": "Block", + "src": "3495:138:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3039, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3545:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3537:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3537:20:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3035, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "3513:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3661, + "src": "3513:23:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3513:45:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3042, + "nodeType": "ExpressionStatement", + "src": "3513:45:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3044, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3584:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3043, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "3576:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3576:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimTokenOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 2971, + "src": "3576:40:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3576:42:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3048, + "nodeType": "ExpressionStatement", + "src": "3576:42:7" + } + ] + }, + "id": 3050, + "nodeType": "IfStatement", + "src": "3340:293:7", + "trueBody": { + "id": 3034, + "nodeType": "Block", + "src": "3374:115:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3024, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "3400:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 3597, + "src": "3400:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3400:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3028, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7264, + "src": "3425:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + ], + "id": 3027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3417:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3417:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3400:30:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206f776e6572206f6620746f6b656e20746f2072657365742075706772616465", + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3432:41:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_299cb3bd138e36f9f827591c27e77de5560b906cd865ed5195ddc1f0aae46f15", + "typeString": "literal_string \"must be owner of token to reset upgrade\"" + }, + "value": "must be owner of token to reset upgrade" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_299cb3bd138e36f9f827591c27e77de5560b906cd865ed5195ddc1f0aae46f15", + "typeString": "literal_string \"must be owner of token to reset upgrade\"" + } + ], + "id": 3023, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3392:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3033, + "nodeType": "ExpressionStatement", + "src": "3392:82:7" + } + ] + } + } + ] + } + } + ] + }, + "documentation": "@notice Allows the mint authority to initiate an ownership transfer of\n the token.\n @param _nextShifter The address to transfer the ownership to, or 0x0.", + "id": 3066, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3004, + "modifierName": { + "argumentTypes": null, + "id": 3003, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2944:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2944:17:7" + } + ], + "name": "upgradeShifter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3001, + "name": "_nextShifter", + "nodeType": "VariableDeclaration", + "scope": 3066, + "src": "2915:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3000, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2915:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2914:22:7" + }, + "returnParameters": { + "id": 3005, + "nodeType": "ParameterList", + "parameters": [], + "src": "2962:0:7" + }, + "scope": 3441, + "src": "2891:1030:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3088, + "nodeType": "Block", + "src": "4119:75:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3080, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4145:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4145:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3082, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3068, + "src": "4157:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3083, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "4166:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3084, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3072, + "src": "4174:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3085, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "4182:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3079, + "name": "_shiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "4136:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) returns (uint256)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:51:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3078, + "id": 3087, + "nodeType": "Return", + "src": "4129:58:7" + } + ] + }, + "documentation": "@notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.", + "id": 3089, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "shiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3068, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4026:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3067, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4026:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3070, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4043:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3069, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4043:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3072, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4059:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3071, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4059:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3074, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4075:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3073, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4075:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4025:68:7" + }, + "returnParameters": { + "id": 3078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3077, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4110:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4110:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4109:9:7" + }, + "scope": 3441, + "src": "4009:185:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3120, + "nodeType": "Block", + "src": "4404:160:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3105, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "4422:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3108, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3106, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4440:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4440:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4422:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a656420746f206d696e74206f6e20626568616c66206f662075736572", + "id": 3109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4453:42:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06dd9cdc4f8ac8c225724ebd1b1aca99ad890829beb5c8aa163f4396c357daf9", + "typeString": "literal_string \"not authorized to mint on behalf of user\"" + }, + "value": "not authorized to mint on behalf of user" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06dd9cdc4f8ac8c225724ebd1b1aca99ad890829beb5c8aa163f4396c357daf9", + "typeString": "literal_string \"not authorized to mint on behalf of user\"" + } + ], + "id": 3104, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4414:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4414:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3111, + "nodeType": "ExpressionStatement", + "src": "4414:82:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3113, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3091, + "src": "4522:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3114, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3093, + "src": "4527:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3115, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3095, + "src": "4536:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3116, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3097, + "src": "4544:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3117, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3099, + "src": "4552:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3112, + "name": "_shiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "4513:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) returns (uint256)" + } + }, + "id": 3118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4513:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3103, + "id": 3119, + "nodeType": "Return", + "src": "4506:51:7" + } + ] + }, + "documentation": "@notice Callable by the previous Shifter if it has been upgraded.", + "id": 3121, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forwardShiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3100, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3091, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4298:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4298:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3093, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4311:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3092, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4311:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3095, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4328:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3094, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4328:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3097, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4344:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3096, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4344:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3099, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4360:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3098, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4360:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4297:81:7" + }, + "returnParameters": { + "id": 3103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3102, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4395:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4395:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4394:9:7" + }, + "scope": 3441, + "src": "4274:290:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3219, + "nodeType": "Block", + "src": "4810:577:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3136, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "4824:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4847:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4839:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4839:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4824:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3153, + "nodeType": "IfStatement", + "src": "4820:114:7", + "trueBody": { + "id": 3152, + "nodeType": "Block", + "src": "4853:81:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "4897:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3146, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "4902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3147, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "4911:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3148, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "4919:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3149, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3131, + "src": "4927:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3142, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "4869:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3141, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "4861:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4861:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "forwardShiftIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 3121, + "src": "4861:35:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) external returns (uint256)" + } + }, + "id": 3150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4861:71:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3135, + "id": 3151, + "nodeType": "Return", + "src": "4854:78:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3155, + "name": "status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2895, + "src": "4952:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 3157, + "indexExpression": { + "argumentTypes": null, + "id": 3156, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "4959:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4952:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 3158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4970:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "4952:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f6e6365206861736820616c7265616479207370656e74", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4977:26:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a3c38debfb7e0d2e1305193d750b2651fd0e6742e3fe145b7017bb3d0ded8b1c", + "typeString": "literal_string \"nonce hash already spent\"" + }, + "value": "nonce hash already spent" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a3c38debfb7e0d2e1305193d750b2651fd0e6742e3fe145b7017bb3d0ded8b1c", + "typeString": "literal_string \"nonce hash already spent\"" + } + ], + "id": 3154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4944:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4944:60:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3162, + "nodeType": "ExpressionStatement", + "src": "4944:60:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3165, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5032:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3166, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5037:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3167, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "5046:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3168, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "5054:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3169, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3131, + "src": "5062:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3164, + "name": "verifySig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3396, + "src": "5022:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) view returns (bool)" + } + }, + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5022:45:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c6964207369676e6174757265", + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5069:19:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12a179e1a73f41ef8e1ba2f259a99bc53b6ace3abb110ac2ea058e42c6104e1a", + "typeString": "literal_string \"invalid signature\"" + }, + "value": "invalid signature" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12a179e1a73f41ef8e1ba2f259a99bc53b6ace3abb110ac2ea058e42c6104e1a", + "typeString": "literal_string \"invalid signature\"" + } + ], + "id": 3163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5014:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5014:75:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3173, + "nodeType": "ExpressionStatement", + "src": "5014:75:7" + }, + { + "assignments": [ + 3175 + ], + "declarations": [ + { + "constant": false, + "id": 3175, + "name": "absoluteFee", + "nodeType": "VariableDeclaration", + "scope": 3219, + "src": "5099:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5099:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3182, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3176, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5122:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 3177, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "5132:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "5122:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3179, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5121:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 3180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5137:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "src": "5121:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5099:43:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3183, + "name": "status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2895, + "src": "5152:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 3185, + "indexExpression": { + "argumentTypes": null, + "id": 3184, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "5159:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5152:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5169:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5152:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3188, + "nodeType": "ExpressionStatement", + "src": "5152:21:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3192, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5194:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3193, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5199:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3194, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5207:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5199:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3189, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "5183:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "5183:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5183:36:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3197, + "nodeType": "ExpressionStatement", + "src": "5183:36:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3201, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "5240:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3202, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5254:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3198, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "5229:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "5229:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5229:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3204, + "nodeType": "ExpressionStatement", + "src": "5229:37:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3206, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5292:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3207, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5297:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3208, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "5306:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3205, + "name": "LogShiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "5281:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5281:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3210, + "nodeType": "EmitStatement", + "src": "5276:42:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3211, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "5328:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 3212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5343:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5328:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3214, + "nodeType": "ExpressionStatement", + "src": "5328:16:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3215, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5361:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3216, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5369:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5361:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3135, + "id": 3218, + "nodeType": "Return", + "src": "5354:26:7" + } + ] + }, + "documentation": "@notice shiftIn mints new tokens after verifying the signature and\n transfers the tokens to `_to`.", + "id": 3220, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_shiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3123, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4702:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4702:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3125, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4715:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3127, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4732:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3126, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4732:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3129, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4748:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3128, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4748:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3131, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4764:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3130, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4764:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4701:81:7" + }, + "returnParameters": { + "id": 3135, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3134, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4801:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4801:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4800:9:7" + }, + "scope": 3441, + "src": "4684:703:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3236, + "nodeType": "Block", + "src": "5553:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3230, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5580:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5580:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3232, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "5592:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3233, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3224, + "src": "5597:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3229, + "name": "_shiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3338, + "src": "5570:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) returns (uint256)" + } + }, + "id": 3234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5570:35:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3228, + "id": 3235, + "nodeType": "Return", + "src": "5563:42:7" + } + ] + }, + "documentation": "@notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.", + "id": 3237, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "shiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3222, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5493:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3221, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5493:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3224, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5511:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5511:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5492:35:7" + }, + "returnParameters": { + "id": 3228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3227, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5544:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3226, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5544:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5543:9:7" + }, + "scope": 3441, + "src": "5475:137:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3262, + "nodeType": "Block", + "src": "5792:146:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3249, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "5810:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3252, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3250, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5828:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5828:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5810:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a656420746f206275726e206f6e20626568616c66206f662075736572", + "id": 3253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5841:42:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4f7aa97ad077f6bfffb0e536a46ef12a6c51d9f1184830d3b8860b484f78d9ff", + "typeString": "literal_string \"not authorized to burn on behalf of user\"" + }, + "value": "not authorized to burn on behalf of user" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4f7aa97ad077f6bfffb0e536a46ef12a6c51d9f1184830d3b8860b484f78d9ff", + "typeString": "literal_string \"not authorized to burn on behalf of user\"" + } + ], + "id": 3248, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5802:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3255, + "nodeType": "ExpressionStatement", + "src": "5802:82:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3257, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3239, + "src": "5911:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3258, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3241, + "src": "5918:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3259, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3243, + "src": "5923:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3256, + "name": "_shiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3338, + "src": "5901:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) returns (uint256)" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5901:30:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3247, + "id": 3261, + "nodeType": "Return", + "src": "5894:37:7" + } + ] + }, + "documentation": "@notice Callable by the previous Shifter if it has been upgraded.", + "id": 3263, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forwardShiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3239, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5717:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5717:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3241, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5732:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3240, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5732:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3243, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5750:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5750:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5716:50:7" + }, + "returnParameters": { + "id": 3247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3246, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5783:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5783:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5782:9:7" + }, + "scope": 3441, + "src": "5692:246:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3337, + "nodeType": "Block", + "src": "6040:480:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3274, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6054:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6077:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6069:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6069:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6054:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3289, + "nodeType": "IfStatement", + "src": "6050:100:7", + "trueBody": { + "id": 3288, + "nodeType": "Block", + "src": "6083:67:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3283, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3265, + "src": "6128:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3284, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6135:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3285, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6140:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3280, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6099:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3279, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "6091:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6091:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "forwardShiftOut", + "nodeType": "MemberAccess", + "referencedDeclaration": 3263, + "src": "6091:36:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) external returns (uint256)" + } + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6091:57:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3273, + "id": 3287, + "nodeType": "Return", + "src": "6084:64:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3291, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6167:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6167:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6181:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6167:15:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f206164647265737320697320656d707479", + "id": 3295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6184:21:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3387226d3456c87662abc983f9678c21ff0a40cda11ae06c03a4afde3892adc1", + "typeString": "literal_string \"to address is empty\"" + }, + "value": "to address is empty" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3387226d3456c87662abc983f9678c21ff0a40cda11ae06c03a4afde3892adc1", + "typeString": "literal_string \"to address is empty\"" + } + ], + "id": 3290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "6159:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6159:47:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3297, + "nodeType": "ExpressionStatement", + "src": "6159:47:7" + }, + { + "assignments": [ + 3299 + ], + "declarations": [ + { + "constant": false, + "id": 3299, + "name": "absoluteFee", + "nodeType": "VariableDeclaration", + "scope": 3337, + "src": "6217:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6217:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3306, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3300, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6240:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 3301, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "6250:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "6240:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3303, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6239:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6255:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "src": "6239:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6217:43:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3310, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3265, + "src": "6323:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3311, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6330:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3307, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "6312:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2837, + "src": "6312:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6312:26:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3313, + "nodeType": "ExpressionStatement", + "src": "6312:26:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3317, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "6359:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3318, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6373:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3314, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "6348:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "6348:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6348:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3320, + "nodeType": "ExpressionStatement", + "src": "6348:37:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3322, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6413:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3323, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6418:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3324, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6426:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6418:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3326, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "6439:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3321, + "name": "LogShiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2914, + "src": "6401:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes memory,uint256,uint256)" + } + }, + "id": 3327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6401:50:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3328, + "nodeType": "EmitStatement", + "src": "6396:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3329, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "6461:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6476:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6461:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3332, + "nodeType": "ExpressionStatement", + "src": "6461:16:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3333, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6494:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3334, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6502:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6494:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3273, + "id": 3336, + "nodeType": "Return", + "src": "6487:26:7" + } + ] + }, + "documentation": null, + "id": 3338, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_shiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3265, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5963:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3264, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5963:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3267, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5978:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3266, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5978:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3269, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5996:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5996:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5962:50:7" + }, + "returnParameters": { + "id": 3273, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3272, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "6031:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3271, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6031:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6030:9:7" + }, + "scope": 3441, + "src": "5944:576:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3395, + "nodeType": "Block", + "src": "6754:502:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3353, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6768:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6791:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6783:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6783:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6768:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3370, + "nodeType": "IfStatement", + "src": "6764:109:7", + "trueBody": { + "id": 3369, + "nodeType": "Block", + "src": "6797:76:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3362, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "6836:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3363, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3342, + "src": "6841:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3364, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3344, + "src": "6850:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3365, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "6858:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3366, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3348, + "src": "6866:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3359, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6813:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3358, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "6805:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6805:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "verifySig", + "nodeType": "MemberAccess", + "referencedDeclaration": 3396, + "src": "6805:30:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) view external returns (bool)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6805:66:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3352, + "id": 3368, + "nodeType": "Return", + "src": "6798:73:7" + } + ] + } + }, + { + "assignments": [ + 3372 + ], + "declarations": [ + { + "constant": false, + "id": 3372, + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6883:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3371, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6883:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6883:9:7" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6902:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3374, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3376, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6902:9:7" + }, + { + "assignments": [ + 3378 + ], + "declarations": [ + { + "constant": false, + "id": 3378, + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6921:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3377, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6921:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3379, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6921:7:7" + }, + { + "externalReferences": [ + { + "r": { + "declaration": 3372, + "isOffset": false, + "isSlot": false, + "src": "7032:1:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7047:4:7", + "valueSize": 1 + } + }, + { + "v": { + "declaration": 3378, + "isOffset": false, + "isSlot": false, + "src": "7112:1:7", + "valueSize": 1 + } + }, + { + "s": { + "declaration": 3375, + "isOffset": false, + "isSlot": false, + "src": "7072:1:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7087:4:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7135:4:7", + "valueSize": 1 + } + } + ], + "id": 3380, + "nodeType": "InlineAssembly", + "operations": "{\n r := mload(add(_sig, 0x20))\n s := mload(add(_sig, 0x40))\n v := byte(0, mload(add(_sig, 0x60)))\n}", + "src": "7009:149:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3381, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "7175:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3384, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "7210:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3385, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3342, + "src": "7215:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3386, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3344, + "src": "7224:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3387, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "7232:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3383, + "name": "sigHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3440, + "src": "7202:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,bytes32,bytes32) view returns (bytes32)" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7202:37:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3389, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3378, + "src": "7241:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 3390, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "7244:1:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3391, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "7247:1:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3382, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7194, + "src": "7192:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 3392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7192:57:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7175:74:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3352, + "id": 3394, + "nodeType": "Return", + "src": "7168:81:7" + } + ] + }, + "documentation": "@notice verifySig checks the the provided signature matches the provided\n parameters.", + "id": 3396, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verifySig", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3349, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3340, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6646:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3339, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6646:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3342, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6659:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6659:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3344, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6676:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3343, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3346, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6692:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3345, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6692:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3348, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6708:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3347, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6708:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6645:81:7" + }, + "returnParameters": { + "id": 3352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3351, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6748:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3350, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6748:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6747:6:7" + }, + "scope": 3441, + "src": "6627:629:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3439, + "nodeType": "Block", + "src": "7445:201:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3409, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "7459:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7482:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7474:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7474:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7459:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3425, + "nodeType": "IfStatement", + "src": "7455:101:7", + "trueBody": { + "id": 3424, + "nodeType": "Block", + "src": "7488:68:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3418, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "7525:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3419, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3400, + "src": "7530:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3420, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3402, + "src": "7539:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3421, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3404, + "src": "7547:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3415, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "7504:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3414, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "7496:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sigHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 3440, + "src": "7496:28:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,bytes32,bytes32) view external returns (bytes32)" + } + }, + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:58:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3408, + "id": 3423, + "nodeType": "Return", + "src": "7489:65:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3430, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "7601:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + ], + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7593:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7593:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3432, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "7609:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3433, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3400, + "src": "7614:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3434, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3402, + "src": "7623:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3435, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3404, + "src": "7631:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3427, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7189, + "src": "7582:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7582:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7582:56:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3426, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7196, + "src": "7572:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 3437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7572:67:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3408, + "id": 3438, + "nodeType": "Return", + "src": "7565:74:7" + } + ] + }, + "documentation": "@notice sigHash hashes the parameters so that they can be signed.", + "id": 3440, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sigHash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3398, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7353:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3397, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7353:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3400, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7366:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7366:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3402, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7383:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3401, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3404, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7399:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3403, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7399:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7352:62:7" + }, + "returnParameters": { + "id": 3408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3407, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7436:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3406, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7436:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7435:9:7" + }, + "scope": 3441, + "src": "7336:310:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "55:7593:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3442, + "name": "Shifter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3441, + "src": "7710:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3443, + "nodeType": "InheritanceSpecifier", + "src": "7710:7:7" + } + ], + "contractDependencies": [ + 3441 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3465, + "linearizedBaseContracts": [ + 3465, + 3441 + ], + "name": "BTCShifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 3463, + "nodeType": "Block", + "src": "7929:7:7", + "statements": [] + }, + "documentation": null, + "id": 3464, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 3456, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "7859:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3457, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3447, + "src": "7877:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + { + "argumentTypes": null, + "id": 3458, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "7885:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3459, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3451, + "src": "7900:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3460, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3453, + "src": "7916:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 3461, + "modifierName": { + "argumentTypes": null, + "id": 3455, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "7851:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7851:70:7" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3445, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7736:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3444, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7736:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3447, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7762:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 3446, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "7762:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3449, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7783:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7783:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3451, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7806:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3450, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7806:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3453, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7830:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3452, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "7830:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7735:107:7" + }, + "returnParameters": { + "id": 3462, + "nodeType": "ParameterList", + "parameters": [], + "src": "7929:0:7" + }, + "scope": 3465, + "src": "7724:212:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "7687:251:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3466, + "name": "Shifter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3441, + "src": "7963:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3467, + "nodeType": "InheritanceSpecifier", + "src": "7963:7:7" + } + ], + "contractDependencies": [ + 3441 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3489, + "linearizedBaseContracts": [ + 3489, + 3441 + ], + "name": "ZECShifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 3487, + "nodeType": "Block", + "src": "8182:7:7", + "statements": [] + }, + "documentation": null, + "id": 3488, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 3480, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "8112:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3481, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "8130:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + { + "argumentTypes": null, + "id": 3482, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3473, + "src": "8138:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3483, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3475, + "src": "8153:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3484, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3477, + "src": "8169:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 3485, + "modifierName": { + "argumentTypes": null, + "id": 3479, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "8104:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8104:70:7" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3469, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "7989:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7989:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3471, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8015:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 3470, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "8015:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3473, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8036:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8036:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3475, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8059:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3474, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8059:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3477, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8083:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3476, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "8083:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7988:107:7" + }, + "returnParameters": { + "id": 3486, + "nodeType": "ParameterList", + "parameters": [], + "src": "8182:0:7" + }, + "scope": 3489, + "src": "7977:212:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "7940:251:7" + } + ], + "src": "0:8191:7" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol", + "exportedSymbols": { + "BTCShifter": [ + 3465 + ], + "Shifter": [ + 3441 + ], + "ZECShifter": [ + 3489 + ] + }, + "id": 3490, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2867, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "file": "./ERC20Shifted.sol", + "id": 2868, + "nodeType": "ImportDirective", + "scope": 3490, + "sourceUnit": 2866, + "src": "25:28:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3441, + "linearizedBaseContracts": [ + 3441 + ], + "name": "Shifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2870, + "name": "nextShifter", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "481:26:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2869, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "481:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2872, + "name": "pendingNextShifter", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "513:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2871, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "513:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2874, + "name": "shifterUpgradeTime", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "552:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2873, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "552:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 2879, + "name": "shifterUpgradeDelay", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "591:58:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2875, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "591:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "302e35", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "630:8:7", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_43200_by_1", + "typeString": "int_const 43200" + }, + "value": "0.5" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "302e35", + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "641:8:7", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_43200_by_1", + "typeString": "int_const 43200" + }, + "value": "0.5" + }, + "src": "630:19:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2883, + "name": "authorizedWrapper", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "730:48:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 2882, + "keyType": { + "id": 2880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "739:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "730:23:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 2881, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "748:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2885, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "857:25:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 2884, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "857:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2887, + "name": "mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "966:28:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2886, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2889, + "name": "feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1104:27:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1104:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2891, + "name": "fee", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1179:17:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2890, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1179:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2895, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1253:37:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 2894, + "keyType": { + "id": 2892, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1262:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1253:23:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 2893, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1271:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2898, + "name": "nextShiftID", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1297:30:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1297:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 2897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1326:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 2906, + "name": "LogShiftIn", + "nodeType": "EventDefinition", + "parameters": { + "id": 2905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2900, + "indexed": true, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1351:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2899, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1351:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2902, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1372:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2901, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1372:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2904, + "indexed": true, + "name": "_shiftID", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1389:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2903, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1389:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1350:64:7" + }, + "src": "1334:81:7" + }, + { + "anonymous": false, + "documentation": null, + "id": 2914, + "name": "LogShiftOut", + "nodeType": "EventDefinition", + "parameters": { + "id": 2913, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2908, + "indexed": true, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1438:17:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2907, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1438:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2910, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1457:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2909, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1457:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2912, + "indexed": true, + "name": "_shiftID", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1474:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2911, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1474:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1437:62:7" + }, + "src": "1420:80:7" + }, + { + "body": { + "id": 2925, + "nodeType": "Block", + "src": "1593:90:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "1611:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1611:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2919, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "1625:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1611:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206d696e7420617574686f72697479", + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1640:24:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_08f5b9e01a8f2dc96554e860d9dabb9526a5f2869857ae4bb74eefaa701ebf43", + "typeString": "literal_string \"must be mint authority\"" + }, + "value": "must be mint authority" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_08f5b9e01a8f2dc96554e860d9dabb9526a5f2869857ae4bb74eefaa701ebf43", + "typeString": "literal_string \"must be mint authority\"" + } + ], + "id": 2916, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "1603:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1603:62:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2923, + "nodeType": "ExpressionStatement", + "src": "1603:62:7" + }, + { + "id": 2924, + "nodeType": "PlaceholderStatement", + "src": "1675:1:7" + } + ] + }, + "documentation": "@notice Only allow the Darknode Payment contract.", + "id": 2926, + "name": "onlyMintAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 2915, + "nodeType": "ParameterList", + "parameters": [], + "src": "1590:2:7" + }, + "src": "1564:119:7", + "visibility": "internal" + }, + { + "body": { + "id": 2961, + "nodeType": "Block", + "src": "1815:181:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2939, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "1825:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2941, + "indexExpression": { + "argumentTypes": null, + "id": 2940, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2928, + "src": "1843:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1825:35:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1863:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1825:42:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "1825:42:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2945, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "1877:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2946, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2930, + "src": "1885:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "src": "1877:14:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2948, + "nodeType": "ExpressionStatement", + "src": "1877:14:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2949, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "1901:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2950, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2934, + "src": "1917:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1901:30:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2952, + "nodeType": "ExpressionStatement", + "src": "1901:30:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2953, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "1941:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2954, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "1947:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "1941:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 2956, + "nodeType": "ExpressionStatement", + "src": "1941:10:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2957, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "1961:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2958, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2932, + "src": "1976:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1961:28:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2960, + "nodeType": "ExpressionStatement", + "src": "1961:28:7" + } + ] + }, + "documentation": null, + "id": 2962, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2928, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1701:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1701:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2930, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1727:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 2929, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "1727:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2932, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1748:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2931, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1748:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2934, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1771:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2933, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1771:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2936, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1795:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2935, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1795:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1700:107:7" + }, + "returnParameters": { + "id": 2938, + "nodeType": "ParameterList", + "parameters": [], + "src": "1815:0:7" + }, + "scope": 3441, + "src": "1689:307:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2970, + "nodeType": "Block", + "src": "2238:39:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2965, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "2248:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "2248:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2248:22:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2969, + "nodeType": "ExpressionStatement", + "src": "2248:22:7" + } + ] + }, + "documentation": "@notice Claims ownership of the token passed in to the constructor.\n `transferStoreOwnership` must have previously been called.\n Anyone can call this function.", + "id": 2971, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimTokenOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2963, + "nodeType": "ParameterList", + "parameters": [], + "src": "2228:2:7" + }, + "returnParameters": { + "id": 2964, + "nodeType": "ParameterList", + "parameters": [], + "src": "2238:0:7" + }, + "scope": 3441, + "src": "2200:77:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2986, + "nodeType": "Block", + "src": "2369:57:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2980, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "2379:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2982, + "indexExpression": { + "argumentTypes": null, + "id": 2981, + "name": "_wrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2973, + "src": "2397:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2379:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2983, + "name": "authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2975, + "src": "2409:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2379:40:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2985, + "nodeType": "ExpressionStatement", + "src": "2379:40:7" + } + ] + }, + "documentation": null, + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2978, + "modifierName": { + "argumentTypes": null, + "id": 2977, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2351:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2351:17:7" + } + ], + "name": "authorizeWrapper", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2973, + "name": "_wrapper", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2309:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2972, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2309:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2975, + "name": "authorized", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2327:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2974, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2327:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2308:35:7" + }, + "returnParameters": { + "id": 2979, + "nodeType": "ParameterList", + "parameters": [], + "src": "2369:0:7" + }, + "scope": 3441, + "src": "2283:143:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2998, + "nodeType": "Block", + "src": "2652:49:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2994, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "2662:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2995, + "name": "_nextFeeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2989, + "src": "2677:17:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2662:32:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2997, + "nodeType": "ExpressionStatement", + "src": "2662:32:7" + } + ] + }, + "documentation": "@notice Allow the mint authority to update the fee recipient.\n @param _nextFeeRecipient The address to start paying fees to.", + "id": 2999, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2992, + "modifierName": { + "argumentTypes": null, + "id": 2991, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2634:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2634:17:7" + } + ], + "name": "updateFeeRecipient", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2989, + "name": "_nextFeeRecipient", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "2600:25:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2988, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2600:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2599:27:7" + }, + "returnParameters": { + "id": 2993, + "nodeType": "ParameterList", + "parameters": [], + "src": "2652:0:7" + }, + "scope": 3441, + "src": "2572:129:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3065, + "nodeType": "Block", + "src": "2962:959:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3006, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3041:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3007, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3057:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3041:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3009, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3079:5:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3079:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3011, + "name": "shifterUpgradeTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2874, + "src": "3098:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3079:37:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3041:75:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3063, + "nodeType": "Block", + "src": "3649:266:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3052, + "name": "shifterUpgradeTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2874, + "src": "3799:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3053, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3820:5:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3820:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 3055, + "name": "shifterUpgradeDelay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2879, + "src": "3838:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3820:37:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3799:58:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3058, + "nodeType": "ExpressionStatement", + "src": "3799:58:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3059, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3871:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3060, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3892:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3871:33:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3062, + "nodeType": "ExpressionStatement", + "src": "3871:33:7" + } + ] + }, + "id": 3064, + "nodeType": "IfStatement", + "src": "3037:878:7", + "trueBody": { + "id": 3051, + "nodeType": "Block", + "src": "3118:525:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3014, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3293:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3015, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3307:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3293:32:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3017, + "nodeType": "ExpressionStatement", + "src": "3293:32:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3018, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3344:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3020, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3368:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3360:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3360:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3344:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3049, + "nodeType": "Block", + "src": "3495:138:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3039, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3545:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3537:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3537:20:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3035, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "3513:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3661, + "src": "3513:23:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3513:45:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3042, + "nodeType": "ExpressionStatement", + "src": "3513:45:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3044, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3584:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3043, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "3576:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3576:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimTokenOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 2971, + "src": "3576:40:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3576:42:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3048, + "nodeType": "ExpressionStatement", + "src": "3576:42:7" + } + ] + }, + "id": 3050, + "nodeType": "IfStatement", + "src": "3340:293:7", + "trueBody": { + "id": 3034, + "nodeType": "Block", + "src": "3374:115:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3024, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "3400:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 3597, + "src": "3400:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3400:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3028, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7264, + "src": "3425:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + ], + "id": 3027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3417:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3417:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3400:30:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206f776e6572206f6620746f6b656e20746f2072657365742075706772616465", + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3432:41:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_299cb3bd138e36f9f827591c27e77de5560b906cd865ed5195ddc1f0aae46f15", + "typeString": "literal_string \"must be owner of token to reset upgrade\"" + }, + "value": "must be owner of token to reset upgrade" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_299cb3bd138e36f9f827591c27e77de5560b906cd865ed5195ddc1f0aae46f15", + "typeString": "literal_string \"must be owner of token to reset upgrade\"" + } + ], + "id": 3023, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3392:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3033, + "nodeType": "ExpressionStatement", + "src": "3392:82:7" + } + ] + } + } + ] + } + } + ] + }, + "documentation": "@notice Allows the mint authority to initiate an ownership transfer of\n the token.\n @param _nextShifter The address to transfer the ownership to, or 0x0.", + "id": 3066, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3004, + "modifierName": { + "argumentTypes": null, + "id": 3003, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2944:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2944:17:7" + } + ], + "name": "upgradeShifter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3001, + "name": "_nextShifter", + "nodeType": "VariableDeclaration", + "scope": 3066, + "src": "2915:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3000, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2915:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2914:22:7" + }, + "returnParameters": { + "id": 3005, + "nodeType": "ParameterList", + "parameters": [], + "src": "2962:0:7" + }, + "scope": 3441, + "src": "2891:1030:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3088, + "nodeType": "Block", + "src": "4119:75:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3080, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4145:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4145:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3082, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3068, + "src": "4157:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3083, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "4166:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3084, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3072, + "src": "4174:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3085, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "4182:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3079, + "name": "_shiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "4136:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) returns (uint256)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:51:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3078, + "id": 3087, + "nodeType": "Return", + "src": "4129:58:7" + } + ] + }, + "documentation": "@notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.", + "id": 3089, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "shiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3068, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4026:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3067, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4026:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3070, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4043:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3069, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4043:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3072, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4059:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3071, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4059:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3074, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4075:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3073, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4075:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4025:68:7" + }, + "returnParameters": { + "id": 3078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3077, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4110:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4110:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4109:9:7" + }, + "scope": 3441, + "src": "4009:185:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3120, + "nodeType": "Block", + "src": "4404:160:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3105, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "4422:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3108, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3106, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4440:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4440:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4422:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a656420746f206d696e74206f6e20626568616c66206f662075736572", + "id": 3109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4453:42:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06dd9cdc4f8ac8c225724ebd1b1aca99ad890829beb5c8aa163f4396c357daf9", + "typeString": "literal_string \"not authorized to mint on behalf of user\"" + }, + "value": "not authorized to mint on behalf of user" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06dd9cdc4f8ac8c225724ebd1b1aca99ad890829beb5c8aa163f4396c357daf9", + "typeString": "literal_string \"not authorized to mint on behalf of user\"" + } + ], + "id": 3104, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4414:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4414:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3111, + "nodeType": "ExpressionStatement", + "src": "4414:82:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3113, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3091, + "src": "4522:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3114, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3093, + "src": "4527:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3115, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3095, + "src": "4536:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3116, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3097, + "src": "4544:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3117, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3099, + "src": "4552:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3112, + "name": "_shiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "4513:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) returns (uint256)" + } + }, + "id": 3118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4513:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3103, + "id": 3119, + "nodeType": "Return", + "src": "4506:51:7" + } + ] + }, + "documentation": "@notice Callable by the previous Shifter if it has been upgraded.", + "id": 3121, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forwardShiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3100, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3091, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4298:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4298:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3093, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4311:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3092, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4311:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3095, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4328:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3094, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4328:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3097, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4344:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3096, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4344:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3099, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4360:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3098, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4360:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4297:81:7" + }, + "returnParameters": { + "id": 3103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3102, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4395:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4395:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4394:9:7" + }, + "scope": 3441, + "src": "4274:290:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3219, + "nodeType": "Block", + "src": "4810:577:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3136, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "4824:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4847:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4839:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4839:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4824:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3153, + "nodeType": "IfStatement", + "src": "4820:114:7", + "trueBody": { + "id": 3152, + "nodeType": "Block", + "src": "4853:81:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "4897:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3146, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "4902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3147, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "4911:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3148, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "4919:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3149, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3131, + "src": "4927:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3142, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "4869:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3141, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "4861:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4861:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "forwardShiftIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 3121, + "src": "4861:35:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) external returns (uint256)" + } + }, + "id": 3150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4861:71:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3135, + "id": 3151, + "nodeType": "Return", + "src": "4854:78:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3155, + "name": "status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2895, + "src": "4952:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 3157, + "indexExpression": { + "argumentTypes": null, + "id": 3156, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "4959:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4952:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 3158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4970:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "4952:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f6e6365206861736820616c7265616479207370656e74", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4977:26:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a3c38debfb7e0d2e1305193d750b2651fd0e6742e3fe145b7017bb3d0ded8b1c", + "typeString": "literal_string \"nonce hash already spent\"" + }, + "value": "nonce hash already spent" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a3c38debfb7e0d2e1305193d750b2651fd0e6742e3fe145b7017bb3d0ded8b1c", + "typeString": "literal_string \"nonce hash already spent\"" + } + ], + "id": 3154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4944:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4944:60:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3162, + "nodeType": "ExpressionStatement", + "src": "4944:60:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3165, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5032:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3166, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5037:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3167, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "5046:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3168, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "5054:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3169, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3131, + "src": "5062:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3164, + "name": "verifySig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3396, + "src": "5022:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) view returns (bool)" + } + }, + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5022:45:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c6964207369676e6174757265", + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5069:19:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12a179e1a73f41ef8e1ba2f259a99bc53b6ace3abb110ac2ea058e42c6104e1a", + "typeString": "literal_string \"invalid signature\"" + }, + "value": "invalid signature" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12a179e1a73f41ef8e1ba2f259a99bc53b6ace3abb110ac2ea058e42c6104e1a", + "typeString": "literal_string \"invalid signature\"" + } + ], + "id": 3163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5014:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5014:75:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3173, + "nodeType": "ExpressionStatement", + "src": "5014:75:7" + }, + { + "assignments": [ + 3175 + ], + "declarations": [ + { + "constant": false, + "id": 3175, + "name": "absoluteFee", + "nodeType": "VariableDeclaration", + "scope": 3219, + "src": "5099:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5099:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3182, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3176, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5122:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 3177, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "5132:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "5122:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3179, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5121:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 3180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5137:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "src": "5121:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5099:43:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3183, + "name": "status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2895, + "src": "5152:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 3185, + "indexExpression": { + "argumentTypes": null, + "id": 3184, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "5159:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5152:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5169:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5152:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3188, + "nodeType": "ExpressionStatement", + "src": "5152:21:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3192, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5194:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3193, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5199:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3194, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5207:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5199:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3189, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "5183:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "5183:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5183:36:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3197, + "nodeType": "ExpressionStatement", + "src": "5183:36:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3201, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "5240:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3202, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5254:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3198, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "5229:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "5229:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5229:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3204, + "nodeType": "ExpressionStatement", + "src": "5229:37:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3206, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5292:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3207, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5297:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3208, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "5306:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3205, + "name": "LogShiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "5281:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5281:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3210, + "nodeType": "EmitStatement", + "src": "5276:42:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3211, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "5328:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 3212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5343:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5328:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3214, + "nodeType": "ExpressionStatement", + "src": "5328:16:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3215, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5361:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3216, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5369:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5361:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3135, + "id": 3218, + "nodeType": "Return", + "src": "5354:26:7" + } + ] + }, + "documentation": "@notice shiftIn mints new tokens after verifying the signature and\n transfers the tokens to `_to`.", + "id": 3220, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_shiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3123, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4702:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4702:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3125, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4715:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3127, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4732:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3126, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4732:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3129, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4748:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3128, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4748:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3131, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4764:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3130, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4764:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4701:81:7" + }, + "returnParameters": { + "id": 3135, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3134, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4801:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4801:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4800:9:7" + }, + "scope": 3441, + "src": "4684:703:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3236, + "nodeType": "Block", + "src": "5553:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3230, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5580:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5580:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3232, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "5592:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3233, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3224, + "src": "5597:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3229, + "name": "_shiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3338, + "src": "5570:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) returns (uint256)" + } + }, + "id": 3234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5570:35:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3228, + "id": 3235, + "nodeType": "Return", + "src": "5563:42:7" + } + ] + }, + "documentation": "@notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.", + "id": 3237, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "shiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3222, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5493:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3221, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5493:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3224, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5511:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5511:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5492:35:7" + }, + "returnParameters": { + "id": 3228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3227, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5544:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3226, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5544:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5543:9:7" + }, + "scope": 3441, + "src": "5475:137:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3262, + "nodeType": "Block", + "src": "5792:146:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3249, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "5810:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3252, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3250, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5828:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5828:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5810:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a656420746f206275726e206f6e20626568616c66206f662075736572", + "id": 3253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5841:42:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4f7aa97ad077f6bfffb0e536a46ef12a6c51d9f1184830d3b8860b484f78d9ff", + "typeString": "literal_string \"not authorized to burn on behalf of user\"" + }, + "value": "not authorized to burn on behalf of user" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4f7aa97ad077f6bfffb0e536a46ef12a6c51d9f1184830d3b8860b484f78d9ff", + "typeString": "literal_string \"not authorized to burn on behalf of user\"" + } + ], + "id": 3248, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5802:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3255, + "nodeType": "ExpressionStatement", + "src": "5802:82:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3257, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3239, + "src": "5911:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3258, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3241, + "src": "5918:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3259, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3243, + "src": "5923:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3256, + "name": "_shiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3338, + "src": "5901:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) returns (uint256)" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5901:30:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3247, + "id": 3261, + "nodeType": "Return", + "src": "5894:37:7" + } + ] + }, + "documentation": "@notice Callable by the previous Shifter if it has been upgraded.", + "id": 3263, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forwardShiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3239, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5717:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5717:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3241, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5732:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3240, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5732:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3243, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5750:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5750:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5716:50:7" + }, + "returnParameters": { + "id": 3247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3246, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5783:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5783:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5782:9:7" + }, + "scope": 3441, + "src": "5692:246:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3337, + "nodeType": "Block", + "src": "6040:480:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3274, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6054:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6077:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6069:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6069:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6054:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3289, + "nodeType": "IfStatement", + "src": "6050:100:7", + "trueBody": { + "id": 3288, + "nodeType": "Block", + "src": "6083:67:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3283, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3265, + "src": "6128:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3284, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6135:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3285, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6140:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3280, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6099:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3279, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "6091:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6091:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "forwardShiftOut", + "nodeType": "MemberAccess", + "referencedDeclaration": 3263, + "src": "6091:36:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) external returns (uint256)" + } + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6091:57:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3273, + "id": 3287, + "nodeType": "Return", + "src": "6084:64:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3291, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6167:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6167:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6181:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6167:15:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f206164647265737320697320656d707479", + "id": 3295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6184:21:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3387226d3456c87662abc983f9678c21ff0a40cda11ae06c03a4afde3892adc1", + "typeString": "literal_string \"to address is empty\"" + }, + "value": "to address is empty" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3387226d3456c87662abc983f9678c21ff0a40cda11ae06c03a4afde3892adc1", + "typeString": "literal_string \"to address is empty\"" + } + ], + "id": 3290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "6159:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6159:47:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3297, + "nodeType": "ExpressionStatement", + "src": "6159:47:7" + }, + { + "assignments": [ + 3299 + ], + "declarations": [ + { + "constant": false, + "id": 3299, + "name": "absoluteFee", + "nodeType": "VariableDeclaration", + "scope": 3337, + "src": "6217:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6217:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3306, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3300, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6240:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 3301, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "6250:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "6240:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3303, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6239:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6255:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "src": "6239:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6217:43:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3310, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3265, + "src": "6323:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3311, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6330:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3307, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "6312:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2837, + "src": "6312:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6312:26:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3313, + "nodeType": "ExpressionStatement", + "src": "6312:26:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3317, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "6359:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3318, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6373:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3314, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "6348:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "6348:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6348:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3320, + "nodeType": "ExpressionStatement", + "src": "6348:37:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3322, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6413:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3323, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6418:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3324, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6426:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6418:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3326, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "6439:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3321, + "name": "LogShiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2914, + "src": "6401:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes memory,uint256,uint256)" + } + }, + "id": 3327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6401:50:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3328, + "nodeType": "EmitStatement", + "src": "6396:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3329, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "6461:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6476:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6461:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3332, + "nodeType": "ExpressionStatement", + "src": "6461:16:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3333, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6494:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3334, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6502:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6494:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3273, + "id": 3336, + "nodeType": "Return", + "src": "6487:26:7" + } + ] + }, + "documentation": null, + "id": 3338, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_shiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3265, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5963:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3264, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5963:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3267, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5978:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3266, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5978:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3269, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5996:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5996:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5962:50:7" + }, + "returnParameters": { + "id": 3273, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3272, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "6031:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3271, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6031:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6030:9:7" + }, + "scope": 3441, + "src": "5944:576:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3395, + "nodeType": "Block", + "src": "6754:502:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3353, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6768:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6791:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6783:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6783:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6768:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3370, + "nodeType": "IfStatement", + "src": "6764:109:7", + "trueBody": { + "id": 3369, + "nodeType": "Block", + "src": "6797:76:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3362, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "6836:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3363, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3342, + "src": "6841:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3364, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3344, + "src": "6850:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3365, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "6858:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3366, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3348, + "src": "6866:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3359, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6813:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3358, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "6805:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6805:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "verifySig", + "nodeType": "MemberAccess", + "referencedDeclaration": 3396, + "src": "6805:30:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) view external returns (bool)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6805:66:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3352, + "id": 3368, + "nodeType": "Return", + "src": "6798:73:7" + } + ] + } + }, + { + "assignments": [ + 3372 + ], + "declarations": [ + { + "constant": false, + "id": 3372, + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6883:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3371, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6883:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6883:9:7" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6902:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3374, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3376, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6902:9:7" + }, + { + "assignments": [ + 3378 + ], + "declarations": [ + { + "constant": false, + "id": 3378, + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6921:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3377, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6921:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3379, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6921:7:7" + }, + { + "externalReferences": [ + { + "r": { + "declaration": 3372, + "isOffset": false, + "isSlot": false, + "src": "7032:1:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7047:4:7", + "valueSize": 1 + } + }, + { + "v": { + "declaration": 3378, + "isOffset": false, + "isSlot": false, + "src": "7112:1:7", + "valueSize": 1 + } + }, + { + "s": { + "declaration": 3375, + "isOffset": false, + "isSlot": false, + "src": "7072:1:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7087:4:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7135:4:7", + "valueSize": 1 + } + } + ], + "id": 3380, + "nodeType": "InlineAssembly", + "operations": "{\n r := mload(add(_sig, 0x20))\n s := mload(add(_sig, 0x40))\n v := byte(0, mload(add(_sig, 0x60)))\n}", + "src": "7009:149:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3381, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "7175:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3384, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "7210:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3385, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3342, + "src": "7215:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3386, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3344, + "src": "7224:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3387, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "7232:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3383, + "name": "sigHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3440, + "src": "7202:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,bytes32,bytes32) view returns (bytes32)" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7202:37:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3389, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3378, + "src": "7241:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 3390, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "7244:1:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3391, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "7247:1:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3382, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7194, + "src": "7192:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 3392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7192:57:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7175:74:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3352, + "id": 3394, + "nodeType": "Return", + "src": "7168:81:7" + } + ] + }, + "documentation": "@notice verifySig checks the the provided signature matches the provided\n parameters.", + "id": 3396, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verifySig", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3349, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3340, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6646:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3339, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6646:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3342, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6659:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6659:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3344, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6676:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3343, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3346, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6692:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3345, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6692:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3348, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6708:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3347, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6708:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6645:81:7" + }, + "returnParameters": { + "id": 3352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3351, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6748:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3350, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6748:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6747:6:7" + }, + "scope": 3441, + "src": "6627:629:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3439, + "nodeType": "Block", + "src": "7445:201:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3409, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "7459:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7482:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7474:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7474:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7459:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3425, + "nodeType": "IfStatement", + "src": "7455:101:7", + "trueBody": { + "id": 3424, + "nodeType": "Block", + "src": "7488:68:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3418, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "7525:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3419, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3400, + "src": "7530:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3420, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3402, + "src": "7539:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3421, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3404, + "src": "7547:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3415, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "7504:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3414, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "7496:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sigHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 3440, + "src": "7496:28:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,bytes32,bytes32) view external returns (bytes32)" + } + }, + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:58:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3408, + "id": 3423, + "nodeType": "Return", + "src": "7489:65:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3430, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "7601:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + ], + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7593:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7593:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3432, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "7609:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3433, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3400, + "src": "7614:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3434, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3402, + "src": "7623:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3435, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3404, + "src": "7631:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3427, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7189, + "src": "7582:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7582:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7582:56:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3426, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7196, + "src": "7572:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 3437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7572:67:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3408, + "id": 3438, + "nodeType": "Return", + "src": "7565:74:7" + } + ] + }, + "documentation": "@notice sigHash hashes the parameters so that they can be signed.", + "id": 3440, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sigHash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3398, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7353:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3397, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7353:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3400, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7366:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7366:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3402, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7383:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3401, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3404, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7399:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3403, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7399:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7352:62:7" + }, + "returnParameters": { + "id": 3408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3407, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7436:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3406, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7436:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7435:9:7" + }, + "scope": 3441, + "src": "7336:310:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "55:7593:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3442, + "name": "Shifter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3441, + "src": "7710:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3443, + "nodeType": "InheritanceSpecifier", + "src": "7710:7:7" + } + ], + "contractDependencies": [ + 3441 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3465, + "linearizedBaseContracts": [ + 3465, + 3441 + ], + "name": "BTCShifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 3463, + "nodeType": "Block", + "src": "7929:7:7", + "statements": [] + }, + "documentation": null, + "id": 3464, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 3456, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "7859:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3457, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3447, + "src": "7877:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + { + "argumentTypes": null, + "id": 3458, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "7885:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3459, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3451, + "src": "7900:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3460, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3453, + "src": "7916:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 3461, + "modifierName": { + "argumentTypes": null, + "id": 3455, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "7851:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7851:70:7" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3445, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7736:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3444, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7736:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3447, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7762:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 3446, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "7762:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3449, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7783:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7783:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3451, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7806:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3450, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7806:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3453, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7830:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3452, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "7830:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7735:107:7" + }, + "returnParameters": { + "id": 3462, + "nodeType": "ParameterList", + "parameters": [], + "src": "7929:0:7" + }, + "scope": 3465, + "src": "7724:212:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "7687:251:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3466, + "name": "Shifter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3441, + "src": "7963:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3467, + "nodeType": "InheritanceSpecifier", + "src": "7963:7:7" + } + ], + "contractDependencies": [ + 3441 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3489, + "linearizedBaseContracts": [ + 3489, + 3441 + ], + "name": "ZECShifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 3487, + "nodeType": "Block", + "src": "8182:7:7", + "statements": [] + }, + "documentation": null, + "id": 3488, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 3480, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "8112:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3481, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "8130:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + { + "argumentTypes": null, + "id": 3482, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3473, + "src": "8138:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3483, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3475, + "src": "8153:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3484, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3477, + "src": "8169:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 3485, + "modifierName": { + "argumentTypes": null, + "id": 3479, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "8104:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8104:70:7" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3469, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "7989:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7989:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3471, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8015:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 3470, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "8015:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3473, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8036:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8036:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3475, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8059:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3474, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8059:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3477, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8083:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3476, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "8083:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7988:107:7" + }, + "returnParameters": { + "id": 3486, + "nodeType": "ParameterList", + "parameters": [], + "src": "8182:0:7" + }, + "scope": 3489, + "src": "7977:212:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "7940:251:7" + } + ], + "src": "0:8191:7" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0xd79c73d5d7701ff70ab30939dd980af7276ff21617d890ff2ce150f3b5ea3d94": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": true, + "name": "_shiftID", + "type": "uint256" + } + ], + "name": "LogShiftIn", + "type": "event", + "signature": "0xd79c73d5d7701ff70ab30939dd980af7276ff21617d890ff2ce150f3b5ea3d94" + }, + "0x1005efb915fb4efa25ffd0757ae0c14b27112a87bbfd7547daf01830cd499309": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_to", + "type": "bytes" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": true, + "name": "_shiftID", + "type": "uint256" + } + ], + "name": "LogShiftOut", + "type": "event", + "signature": "0x1005efb915fb4efa25ffd0757ae0c14b27112a87bbfd7547daf01830cd499309" + } + }, + "links": {}, + "address": "0xbe830ca535BeFf2C7d82B7494e0B9592A3815730", + "transactionHash": "0x2efb362e70f1d7392bc8c040f250cb896ad6767a63effe94595dc94d9f0a1cf7" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:21:48.592Z", + "devdoc": { + "methods": { + "updateFeeRecipient(address)": { + "params": { + "_nextFeeRecipient": "The address to start paying fees to." + } + }, + "upgradeShifter(address)": { + "params": { + "_nextShifter": "The address to transfer the ownership to, or 0x0." + } + } + } + }, + "userdoc": { + "methods": { + "claimTokenOwnership()": { + "notice": "Claims ownership of the token passed in to the constructor. `transferStoreOwnership` must have previously been called. Anyone can call this function." + }, + "forwardShiftIn(address,uint256,bytes32,bytes32,bytes)": { + "notice": "Callable by the previous Shifter if it has been upgraded." + }, + "forwardShiftOut(address,bytes,uint256)": { + "notice": "Callable by the previous Shifter if it has been upgraded." + }, + "shiftIn(uint256,bytes32,bytes32,bytes)": { + "notice": "shiftOut burns tokens after taking a fee for the `_feeRecipient`." + }, + "shiftOut(bytes,uint256)": { + "notice": "shiftOut burns tokens after taking a fee for the `_feeRecipient`." + }, + "sigHash(address,uint256,bytes32,bytes32)": { + "notice": "sigHash hashes the parameters so that they can be signed." + }, + "updateFeeRecipient(address)": { + "notice": "Allow the mint authority to update the fee recipient." + }, + "upgradeShifter(address)": { + "notice": "Allows the mint authority to initiate an ownership transfer of the token." + }, + "verifySig(address,uint256,bytes32,bytes32,bytes)": { + "notice": "verifySig checks the the provided signature matches the provided parameters." + } + } + } +} \ No newline at end of file diff --git a/build/devnet/DarknodePayment.json b/build/devnet/DarknodePayment.json new file mode 100644 index 00000000..c556375b --- /dev/null +++ b/build/devnet/DarknodePayment.json @@ -0,0 +1,25495 @@ +{ + "contractName": "DarknodePayment", + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "previousCycleRewardShare", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "cycleStartTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "pendingTokens", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "cycleDuration", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "shareCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "uint256" + } + ], + "name": "rewardClaimed", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "unclaimedRewards", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "store", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "registeredTokens", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "darknodeRegistry", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "currentCycle", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blacklister", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "registeredTokenIndex", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "cycleTimeout", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "previousCycle", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ETHEREUM", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_VERSION", + "type": "string" + }, + { + "name": "_darknodeRegistry", + "type": "address" + }, + { + "name": "_darknodePaymentStore", + "type": "address" + }, + { + "name": "_cycleDurationSeconds", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknode", + "type": "address" + }, + { + "indexed": false, + "name": "_time", + "type": "uint256" + } + ], + "name": "LogDarknodeBlacklisted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknode", + "type": "address" + }, + { + "indexed": false, + "name": "_time", + "type": "uint256" + } + ], + "name": "LogDarknodeWhitelisted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknode", + "type": "address" + }, + { + "indexed": false, + "name": "_cycle", + "type": "uint256" + } + ], + "name": "LogDarknodeClaim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_payer", + "type": "address" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "_token", + "type": "address" + } + ], + "name": "LogPaymentReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_payee", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + }, + { + "indexed": false, + "name": "_token", + "type": "address" + } + ], + "name": "LogDarknodeWithdrew", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_newCycle", + "type": "uint256" + }, + { + "indexed": false, + "name": "_lastCycle", + "type": "uint256" + }, + { + "indexed": false, + "name": "_cycleTimeout", + "type": "uint256" + } + ], + "name": "LogNewCycle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_newDuration", + "type": "uint256" + }, + { + "indexed": false, + "name": "_oldDuration", + "type": "uint256" + } + ], + "name": "LogCycleDurationChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_newBlacklister", + "type": "address" + }, + { + "indexed": false, + "name": "_oldBlacklister", + "type": "address" + } + ], + "name": "LogBlacklisterChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_token", + "type": "address" + } + ], + "name": "LogTokenRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_token", + "type": "address" + } + ], + "name": "LogTokenDeregistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknode", + "type": "address" + }, + { + "name": "_token", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknode", + "type": "address" + }, + { + "name": "_tokens", + "type": "address[]" + } + ], + "name": "withdrawMultiple", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "currentCycleRewardPool", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + }, + { + "name": "_token", + "type": "address" + } + ], + "name": "darknodeBalances", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "changeCycle", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_token", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknode", + "type": "address" + } + ], + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknode", + "type": "address" + } + ], + "name": "blacklist", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "registerToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "deregisterToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_addr", + "type": "address" + } + ], + "name": "updateBlacklister", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_durationSeconds", + "type": "uint256" + } + ], + "name": "updateCycleDuration", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferStoreOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "claimStoreOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"previousCycleRewardShare\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"registerToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"cycleStartTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pendingTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"cycleDuration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimStoreOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"},{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"darknodeBalances\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_durationSeconds\",\"type\":\"uint256\"}],\"name\":\"updateCycleDuration\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"shareCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewardClaimed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"unclaimedRewards\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"store\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"registeredTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodeRegistry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"updateBlacklister\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"changeCycle\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"deregisterToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentCycle\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blacklister\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"registeredTokenIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"cycleTimeout\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferStoreOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"previousCycle\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"currentCycleRewardPool\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"},{\"name\":\"_tokens\",\"type\":\"address[]\"}],\"name\":\"withdrawMultiple\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ETHEREUM\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"},{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"}],\"name\":\"blacklist\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_VERSION\",\"type\":\"string\"},{\"name\":\"_darknodeRegistry\",\"type\":\"address\"},{\"name\":\"_darknodePaymentStore\",\"type\":\"address\"},{\"name\":\"_cycleDurationSeconds\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_darknode\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_time\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeBlacklisted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_darknode\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_time\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeWhitelisted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_darknode\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_cycle\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeClaim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_payer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"LogPaymentReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_payee\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"LogDarknodeWithdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_newCycle\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_lastCycle\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_cycleTimeout\",\"type\":\"uint256\"}],\"name\":\"LogNewCycle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_newDuration\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_oldDuration\",\"type\":\"uint256\"}],\"name\":\"LogCycleDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_newBlacklister\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_oldBlacklister\",\"type\":\"address\"}],\"name\":\"LogBlacklisterChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"LogTokenRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"LogTokenDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"blacklist(address)\":{\"params\":{\"_darknode\":\"The address of the darknode to blacklist\"}},\"claim(address)\":{\"params\":{\"_darknode\":\"The address of the darknode to claim\"}},\"constructor\":{\"params\":{\"_VERSION\":\"A string defining the contract version.\",\"_cycleDurationSeconds\":\"The minimum time before a new cycle can occur in seconds\",\"_darknodePaymentStore\":\"The address of the DarknodePaymentStore contract\",\"_darknodeRegistry\":\"The address of the DarknodeRegistry contract\"}},\"deposit(uint256,address)\":{\"params\":{\"_token\":\"The token address\",\"_value\":\"The amount of token deposit in the token's smallest unit.\"}},\"deregisterToken(address)\":{\"params\":{\"_token\":\"The address of the token to be deregistered.\"}},\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"registerToken(address)\":{\"params\":{\"_token\":\"The address of the token to be registered.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"transferStoreOwnership(address)\":{\"params\":{\"_newOwner\":\"The address to transfer the ownership to.\"}},\"updateBlacklister(address)\":{\"params\":{\"_addr\":\"The new Blacklister contract address.\"}},\"updateCycleDuration(uint256)\":{\"params\":{\"_durationSeconds\":\"The amount of time (in seconds) that should have passed before a new cycle can be called.\"}},\"withdraw(address,address)\":{\"params\":{\"_darknode\":\"The address of the darknode\",\"_token\":\"Which token to transfer\"}}}},\"userdoc\":{\"methods\":{\"blacklist(address)\":{\"notice\":\"Blacklists a darknode from participating in rewards. \"},\"changeCycle()\":{\"notice\":\"Changes the current cycle.\"},\"claim(address)\":{\"notice\":\"Claims the rewards allocated to the darknode last cycle and increments the darknode balances. Whitelists the darknode if it hasn't already been whitelisted. If a darknode does not call claim() then the rewards for the previous cycle is lost. \"},\"claimStoreOwnership()\":{\"notice\":\"Claims ownership of the store passed in to the constructor. `transferStoreOwnership` must have previously been called when transferring from another DarknodePaymentStore.\"},\"constructor\":\"The contract constructor. Starts the current cycle using the time of deploy. \",\"currentCycleRewardPool(address)\":{\"notice\":\"The current balance of the contract available as reward for the current cycle\"},\"deposit(uint256,address)\":{\"notice\":\"Deposits token into the contract to be paid to the Darknodes \"},\"deregisterToken(address)\":{\"notice\":\"Removes a token from the list of supported tokens. Deregistration is pending until next cycle. \"},\"registerToken(address)\":{\"notice\":\"Adds tokens to be payable. Registration is pending until next cycle. \"},\"transferStoreOwnership(address)\":{\"notice\":\"Allows the contract owner to initiate an ownership transfer of the DarknodePaymentStore. \"},\"updateBlacklister(address)\":{\"notice\":\"Updates the Blacklister contract address. \"},\"updateCycleDuration(uint256)\":{\"notice\":\"Updates cycle duration \"},\"withdraw(address,address)\":{\"notice\":\"Transfers the funds allocated to the darknode to the darknode owner. \"}},\"notice\":\"DarknodePayment is responsible for paying off darknodes for their computation.\"}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePayment.sol\":\"DarknodePayment\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePayment.sol\":{\"keccak256\":\"0xafe22e5944b4246d1a98c94d206d374d55482d3f6bb7b9b0a138bb64634afb59\",\"urls\":[\"bzzr://6252639031e7fb3360e40bc9bf5f59843d8345e778238c073c6e3a864688867c\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePaymentStore.sol\":{\"keccak256\":\"0x5fa14e396e45b93df54c1641ce8d0d83fa8ac3ec6679bb969b4088360e2f97d5\",\"urls\":[\"bzzr://de076428cc66269df2aa797cee62012ff56c963eeb1dfee77314731f9ea98200\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol\":{\"keccak256\":\"0xe2c22dc48cac917fa2890d5a6b6ed0e86ecf273c0d2762bdf490347012145480\",\"urls\":[\"bzzr://5cf4705abd3d66528c43d1e47f9d56e3e0e35403196762e50d15905bbb539527\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol\":{\"keccak256\":\"0x423b0630cad633c8385e457c0762a8d4b2a5028ee2e89af3f112d5f2d3a04022\",\"urls\":[\"bzzr://de7a014c67223932f191f05238df1a37fa3d325dad943787b3506f072af8e444\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol\":{\"keccak256\":\"0x815e7571a0fd9b61f8f8bf693e7891ab78bbf36b20781012ac64c12f56ef36c5\",\"urls\":[\"bzzr://8e02714dc3b3bf491d533506859802a0756b444ba1b06b6ff64184a723f8697b\"]},\"/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol\":{\"keccak256\":\"0x574c593875a7afc210e709573a4d46d6ad6ea60d348ade04692149aae68a85da\",\"urls\":[\"bzzr://6216d6c45babda33bf82905fd7384368d9529b6e572f435c2a217bd7634467e9\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/CompatibleERC20Functions.sol\":{\"keccak256\":\"0xb9e38917912b1ff2e0a1d6996636170c0af89fb412d4168a5dfa6c9a55b2f71a\",\"urls\":[\"bzzr://238d0af72f2ac122a434f414df1707630b5a07fee0e042fdf94b97f202f34ac0\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/LinkedList.sol\":{\"keccak256\":\"0x318273ca74f037e14739675b74e3538fa6d08ff412869f1931aacd351d35bdcc\",\"urls\":[\"bzzr://2174bf7bb80a3ed2d366ac0041168e2478c5b0a65b9a8aeaf99a0058e3021f53\"]},\"openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb\",\"urls\":[\"bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad\"]},\"openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0xf6826c684d51ca28db5293ce11a54c5cca1c757b6cd32b87613833c65086f995\",\"urls\":[\"bzzr://01b2756ab5b41b1d7ccadfeac53fbdce9c889263f1e011329c300c5fa3fda65f\"]},\"openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x609f8cb524cd6b502624c79c099ec2fc6f23eef57b5c38e28efd82490875f37e\",\"urls\":[\"bzzr://46ee461a64298ef418bd100df1301355f4dc9ffeb06fe7a39aaf98d45c0bf988\"]},\"openzeppelin-solidity/contracts/math/Math.sol\":{\"keccak256\":\"0x4b5aa451e4e8801478708f94b118a7821c0500d676255eaf89fc78c14856ce4e\",\"urls\":[\"bzzr://200d5728b32858918810d8d7a8db1406ee9b157ad5026f050e6d864a696b9080\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xf79fb10e8235770eb4aea7249034076a3cc9f9119ad944fc48705bae9c9d20dc\",\"urls\":[\"bzzr://d12a11272051eb6586de8f7e0a82c04a98c9984ce8b2a6cf1ee439f65aba29a9\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa5ebf3344a36eb60e723e0764d85251c496e15e4b2d737b56415502b559a1765\",\"urls\":[\"bzzr://68812cb0a1d373d12c6986f5a9314c9bae7891a07a0e301d2317fcf409102f54\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0xc4973487824e5855e78e27d685b387566df52ea4b0854ba60b8703b533de47d4\",\"urls\":[\"bzzr://299d2f2c37a1b0cc8b15927fc516cc7f8a8f48e246512b3b3880bd3e4f0220d4\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]},\"openzeppelin-solidity/contracts/utils/Address.sol\":{\"keccak256\":\"0xf3358e5819ca73357abd6c90bdfffd0474af54364897f6b3e3234c4b71fbe9a1\",\"urls\":[\"bzzr://f7f6da60a184233fd666ac44e6fb2bd51ca6ebdc4867a310d368049aa4e62786\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002b4838038062002b48833981018060405260808110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b50506020820151604080840151606090940151600080546001600160a01b03191633178082559251949750929550926001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38351620000f6906001906020870190620001e6565b50600280546001600160a01b038086166001600160a01b0319928316179092556003805492851692821692909217909155600e82905560048054909116331790554360055542600d8190556200015c9082620022076200016a602090811b91909117901c565b600f55506200028b92505050565b600082820183811015620001df57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200022957805160ff191683800117855562000259565b8280016001018555821562000259579182015b82811115620002595782518255916020019190600101906200023c565b50620002679291506200026b565b5090565b6200028891905b8082111562000267576000815560010162000272565b90565b6128ad806200029b6000396000f3fe6080604052600436106102045760003560e01c80639a0ba2ea11610118578063c2250a99116100a0578063f75adff81161006f578063f75adff814610713578063f7cdf47c146107a0578063f940e385146107b5578063f9f92be4146107f0578063ffa1ad741461082357610204565b8063c2250a9914610665578063e311481514610698578063e80b2b3d146106ad578063f2fde38b146106e057610204565b8063bab2af1d116100e7578063bab2af1d146105c0578063bab2f552146105f3578063bd10243014610608578063bfdce1991461061d578063c0470bb31461065057610204565b80639a0ba2ea146105395780639e45e0d014610563578063ad38bf2214610578578063b3a2af69146105ab57610204565b806370324b771161019b57806383b781881161016a57806383b781881461047a5780638da5cb5b146104c75780638f32d59b146104dc578063949813b8146104f1578063975057e71461052457610204565b806370324b77146103eb578063715018a61461042657806374c9ea821461043b5780637f03864b1461046557610204565b8063352fc85f116101d7578063352fc85f1461034f5780635bec4cb4146103955780636e553f65146103aa5780636fd689e8146103d657610204565b806305cf47441461028d57806309824a80146102d25780631e83409a14610307578063335e536c1461033a575b6003546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561023d573d6000803e3d6000fd5b506040805134815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6020820152815133927fea0e59b45b3d900359e312f5e429275ec827a5e4e2430e1610a1c678cd6cd2e2928290030190a2005b34801561029957600080fd5b506102c0600480360360208110156102b057600080fd5b50356001600160a01b03166108ad565b60408051918252519081900360200190f35b3480156102de57600080fd5b50610305600480360360208110156102f557600080fd5b50356001600160a01b03166108bf565b005b34801561031357600080fd5b506103056004803603602081101561032a57600080fd5b50356001600160a01b0316610a4d565b34801561034657600080fd5b506102c0610dd3565b34801561035b57600080fd5b506103796004803603602081101561037257600080fd5b5035610dd9565b604080516001600160a01b039092168252519081900360200190f35b3480156103a157600080fd5b506102c0610e00565b610305600480360360408110156103c057600080fd5b50803590602001356001600160a01b0316610e06565b3480156103e257600080fd5b50610305610f87565b3480156103f757600080fd5b506102c06004803603604081101561040e57600080fd5b506001600160a01b038135811691602001351661103b565b34801561043257600080fd5b506103056110ca565b34801561044757600080fd5b506103056004803603602081101561045e57600080fd5b503561115e565b34801561047157600080fd5b506102c06111ef565b34801561048657600080fd5b506104b36004803603604081101561049d57600080fd5b506001600160a01b0381351690602001356111f5565b604080519115158252519081900360200190f35b3480156104d357600080fd5b50610379611215565b3480156104e857600080fd5b506104b3611225565b3480156104fd57600080fd5b506102c06004803603602081101561051457600080fd5b50356001600160a01b0316611236565b34801561053057600080fd5b50610379611248565b34801561054557600080fd5b506103796004803603602081101561055c57600080fd5b5035611257565b34801561056f57600080fd5b50610379611264565b34801561058457600080fd5b506103056004803603602081101561059b57600080fd5b50356001600160a01b0316611273565b3480156105b757600080fd5b506102c0611385565b3480156105cc57600080fd5b50610305600480360360208110156105e357600080fd5b50356001600160a01b0316611570565b3480156105ff57600080fd5b506102c0611633565b34801561061457600080fd5b50610379611639565b34801561062957600080fd5b506102c06004803603602081101561064057600080fd5b50356001600160a01b0316611648565b34801561065c57600080fd5b506102c061165a565b34801561067157600080fd5b506103056004803603602081101561068857600080fd5b50356001600160a01b0316611660565b3480156106a457600080fd5b506102c0611716565b3480156106b957600080fd5b506102c0600480360360208110156106d057600080fd5b50356001600160a01b031661171c565b3480156106ec57600080fd5b506103056004803603602081101561070357600080fd5b50356001600160a01b03166117be565b34801561071f57600080fd5b506103056004803603604081101561073657600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561076157600080fd5b82018360208201111561077357600080fd5b8035906020019184602083028401116401000000008311171561079557600080fd5b509092509050611811565b3480156107ac57600080fd5b50610379611849565b3480156107c157600080fd5b50610305600480360360408110156107d857600080fd5b506001600160a01b0381358116916020013516611861565b3480156107fc57600080fd5b506103056004803603602081101561081357600080fd5b50356001600160a01b0316611aee565b34801561082f57600080fd5b50610838611ccf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561087257818101518382015260200161085a565b50505050905090810190601f16801561089f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600c6020526000908152604090205481565b6108c7611225565b6109095760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600a6020526040902054156109775760408051600160e51b62461bcd02815260206004820152601860248201527f746f6b656e20616c726561647920726567697374657265640000000000000000604482015290519081900360640190fd5b60085460005b818110156109f957826001600160a01b03166008828154811061099c57fe5b6000918252602090912001546001600160a01b031614156109f157604051600160e51b62461bcd0281526004018080602001828103825260228152602001806128406022913960400191505060405180910390fd5b60010161097d565b5050600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0392909216919091179055565b60025460408051600160e01b63c3c5a5470281526001600160a01b03808516600483015291518493929092169163c3c5a54791602480820192602092909190829003018186803b158015610aa057600080fd5b505afa158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b5051610b205760408051600160e51b62461bcd02815260206004820152601a60248201527f6461726b6e6f6465206973206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b60035460408051600160e01b63fe575a870281526001600160a01b03808616600483015291518593929092169163fe575a8791602480820192602092909190829003018186803b158015610b7357600080fd5b505afa158015610b87573d6000803e3d6000fd5b505050506040513d6020811015610b9d57600080fd5b505115610bf45760408051600160e51b62461bcd02815260206004820152601760248201527f6461726b6e6f646520697320626c61636b6c6973746564000000000000000000604482015290519081900360640190fd5b60035460408051600160e01b639a4d6f3b0281526001600160a01b03868116600483015291516000939290921691639a4d6f3b91602480820192602092909190829003018186803b158015610c4857600080fd5b505afa158015610c5c573d6000803e3d6000fd5b505050506040513d6020811015610c7257600080fd5b5051905080610d295760035460408051600160e11b634d8c928d0281526001600160a01b03878116600483015291519190921691639b19251a91602480830192600092919082900301818387803b158015610ccc57600080fd5b505af1158015610ce0573d6000803e3d6000fd5b50506040805142815290516001600160a01b03881693507f7634be097aa1800f447c3ae3ffe9444f1bc44a98bd2c1e986c1883f9f645f2b692509081900360200190a250610dce565b600d548110610d825760408051600160e51b62461bcd02815260206004820152601b60248201527f63616e6e6f7420636c61696d20666f722074686973206379636c650000000000604482015290519081900360640190fd5b610d8b84611d5c565b60065460408051918252516001600160a01b038616917f99c5ad5c5f898b30039b8cc54b8c0e6eb423e49bfc965a5999ebad131984e40d919081900360200190a2505b505050565b600d5481565b60088181548110610de657fe5b6000918252602090912001546001600160a01b0316905081565b600e5481565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610ec557348314610e845760408051600160e51b62461bcd02815260206004820152601860248201527f6d69736d617463686564206465706f7369742076616c75650000000000000000604482015290519081900360640190fd5b5060035460405134916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610ebf573d6000803e3d6000fd5b50610f40565b3415610f1b5760408051600160e51b62461bcd02815260206004820152601960248201527f756e6578706563746564206574686572207472616e7366657200000000000000604482015290519081900360640190fd5b600354610f3d906001600160a01b03848116913391168663ffffffff611f2416565b90505b604080518281526001600160a01b0384166020820152815133927fea0e59b45b3d900359e312f5e429275ec827a5e4e2430e1610a1c678cd6cd2e2928290030190a2505050565b610f8f611225565b610fd15760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b600360009054906101000a90046001600160a01b03166001600160a01b0316634e71e0c86040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561102157600080fd5b505af1158015611035573d6000803e3d6000fd5b50505050565b60035460408051600160e01b6370324b770281526001600160a01b0385811660048301528481166024830152915160009392909216916370324b7791604480820192602092909190829003018186803b15801561109757600080fd5b505afa1580156110ab573d6000803e3d6000fd5b505050506040513d60208110156110c157600080fd5b50519392505050565b6110d2611225565b6111145760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b611166611225565b6111a85760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b600e805490829055604080518381526020810183905281517f59cbd678a801fd313f133a5efc6be7aee2814b07d41c9d9fb72f91197b2f9d4a929181900390910190a15050565b60075481565b601060209081526000928352604080842090915290825290205460ff1681565b6000546001600160a01b03165b90565b6000546001600160a01b0316331490565b600b6020526000908152604090205481565b6003546001600160a01b031681565b60098181548110610de657fe5b6002546001600160a01b031681565b61127b611225565b6112bd5760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b6001600160a01b03811661131b5760408051600160e51b62461bcd02815260206004820152601860248201527f696e76616c696420636f6e747261637420616464726573730000000000000000604482015290519081900360640190fd5b600454604080516001600160a01b038085168252909216602083015280517fef549604431567c0cd1b94ebc91fed6cf5cd907f6ff0b63aa1d475dcf8d4901c9281900390910190a1600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000600f544210156113e15760408051600160e51b62461bcd02815260206004820152601b60248201527f63616e6e6f74206379636c65207965743a20746f6f206561726c790000000000604482015290519081900360640190fd5b60055443141561143b5760408051600160e51b62461bcd02815260206004820152600c60248201527f6e6f206e657720626c6f636b0000000000000000000000000000000000000000604482015290519081900360640190fd5b60095460005b8181101561147b576114736009828154811061145957fe5b6000918252602090912001546001600160a01b031661210f565b600101611441565b506005805460065543905542600d819055600e5461149f919063ffffffff61220716565b600f5560035460408051600160e11b630fe37f4702815290516001600160a01b0390921691631fc6fe8e91600480820192602092909190829003018186803b1580156114ea57600080fd5b505afa1580156114fe573d6000803e3d6000fd5b505050506040513d602081101561151457600080fd5b505160075561152161226b565b600554600654600f5460408051938452602084019290925282820152517f6611b6f4e1fb92277f863eca934cba1c2d6987070d73762b72b942720bfe43a29181900360600190a1505060055490565b611578611225565b6115ba5760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600a60205260409020546116275760408051600160e51b62461bcd02815260206004820152601460248201527f746f6b656e206e6f742072656769737465726564000000000000000000000000604482015290519081900360640190fd5b6116308161233c565b50565b60055481565b6004546001600160a01b031681565b600a6020526000908152604090205481565b600f5481565b611668611225565b6116aa5760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b60035460408051600160e01b63f2fde38b0281526001600160a01b0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b1580156116fb57600080fd5b505af115801561170f573d6000803e3d6000fd5b5050505050565b60065481565b6001600160a01b038082166000818152600b60209081526040808320546003548251600160e01b63a0821be30281526004810196909652915193956117b895919492169263a0821be392602480840193829003018186803b15801561178057600080fd5b505afa158015611794573d6000803e3d6000fd5b505050506040513d60208110156117aa57600080fd5b50519063ffffffff61245716565b92915050565b6117c6611225565b6118085760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b611630816124b7565b60005b81811015611035576118418484848481811061182c57fe5b905060200201356001600160a01b0316611861565b600101611814565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b60025460408051600160e01b631cedf8a30281526001600160a01b03858116600483015291516000939290921691631cedf8a391602480820192602092909190829003018186803b1580156118b557600080fd5b505afa1580156118c9573d6000803e3d6000fd5b505050506040513d60208110156118df57600080fd5b505190506001600160a01b0381166119415760408051600160e51b62461bcd02815260206004820152601660248201527f696e76616c6964206461726b6e6f6465206f776e657200000000000000000000604482015290519081900360640190fd5b60035460408051600160e01b6370324b770281526001600160a01b0386811660048301528581166024830152915160009392909216916370324b7791604480820192602092909190829003018186803b15801561199d57600080fd5b505afa1580156119b1573d6000803e3d6000fd5b505050506040513d60208110156119c757600080fd5b5051905080611a205760408051600160e51b62461bcd02815260206004820152601360248201527f6e6f7468696e6720746f20776974686472617700000000000000000000000000604482015290519081900360640190fd5b60035460408051600160e01b63f9ce78130281526001600160a01b03878116600483015286811660248301526044820185905285811660648301529151919092169163f9ce781391608480830192600092919082900301818387803b158015611a8857600080fd5b505af1158015611a9c573d6000803e3d6000fd5b5050604080518481526001600160a01b038781166020830152825190891694507fe1f157c0881b2e477dca89772b158029611366b8e7dc8be4f6f308fa7a0aa02893509081900390910190a250505050565b6004546001600160a01b03163314611b505760408051600160e51b62461bcd02815260206004820152600f60248201527f6e6f7420426c61636b6c69737465720000000000000000000000000000000000604482015290519081900360640190fd5b60025460408051600160e01b63c3c5a5470281526001600160a01b03808516600483015291518493929092169163c3c5a54791602480820192602092909190829003018186803b158015611ba357600080fd5b505afa158015611bb7573d6000803e3d6000fd5b505050506040513d6020811015611bcd57600080fd5b5051611c235760408051600160e51b62461bcd02815260206004820152601a60248201527f6461726b6e6f6465206973206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b60035460408051600160e21b633e7e4af90281526001600160a01b0385811660048301529151919092169163f9f92be491602480830192600092919082900301818387803b158015611c7457600080fd5b505af1158015611c88573d6000803e3d6000fd5b50506040805142815290516001600160a01b03861693507fd2b847810d644004679c7a8d5f5188fe2b12b6f34dba8501760d99232fa9b7bc92509081900360200190a25050565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015611d545780601f10611d2957610100808354040283529160200191611d54565b820191906000526020600020905b815481529060010190602001808311611d3757829003601f168201915b505050505081565b6001600160a01b0381166000908152601060209081526040808320600654845290915290205460ff1615611dda5760408051600160e51b62461bcd02815260206004820152601660248201527f72657761726420616c726561647920636c61696d656400000000000000000000604482015290519081900360640190fd5b6001600160a01b038116600090815260106020908152604080832060065484529091528120805460ff19166001179055600954905b81811015610dce57600060098281548110611e2657fe5b60009182526020808320909101546001600160a01b0316808352600c90915260409091205490915015611f1b576001600160a01b0381166000908152600c6020908152604080832054600b90925290912054611e879163ffffffff61245716565b6001600160a01b038083166000818152600b6020908152604080832095909555600354600c909152848220548551600160e01b63d23b90a50281528a86166004820152602481019490945260448401529351939092169263d23b90a59260648084019391929182900301818387803b158015611f0257600080fd5b505af1158015611f16573d6000803e3d6000fd5b505050505b50600101611e0f565b600080856001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015611f7d57600080fd5b505afa158015611f91573d6000803e3d6000fd5b505050506040513d6020811015611fa757600080fd5b5051604080516001600160a01b0388811660248301528716604482015260648082018790528251808303909101815260849091019091526020810180516001600160e01b0316600160e01b6323b872dd0217905290915061200990879061255a565b61201161271f565b6120655760408051600160e51b62461bcd02815260206004820152601360248201527f7472616e7366657246726f6d206661696c656400000000000000000000000000604482015290519081900360640190fd5b6000866001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b50519050612104846120ff838563ffffffff61245716565b612753565b979650505050505050565b600754612141576001600160a01b0381166000908152600b60209081526040808320839055600c909152812055611630565b60035460408051600160e01b63a0821be30281526001600160a01b0384811660048301529151919092169163a0821be3916024808301926020929190829003018186803b15801561219157600080fd5b505afa1580156121a5573d6000803e3d6000fd5b505050506040513d60208110156121bb57600080fd5b50516001600160a01b0382166000908152600b602052604090208190556007546121eb919063ffffffff61276916565b6001600160a01b0382166000908152600c602052604090205550565b6000828201838110156122645760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60085460005b8181101561232a5760006008828154811061228857fe5b6000918252602080832090910154600980546001810182557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b0319166001600160a01b03909316928317905554818452600a835260409384902055825181815292519093507fd780ddbc43f0c4efd61c5ca1bc8eeee3368abfb1f97aa7355da9f8bf8431c8ae9281900390910190a150600101612271565b5060006123386008826127dc565b5050565b600980546000919061235590600163ffffffff61245716565b8154811061235f57fe5b60009182526020808320909101546001600160a01b038581168452600a90925260408320549116925061239990600163ffffffff61245716565b905081600982815481106123a957fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790558583168252600a905260408082205492851682529020556009546123f6906001612457565b6124016009826127dc565b506001600160a01b0383166000818152600a6020908152604080832092909255815192835290517fe46f21bb6906b7d69a6c06d5662a2b6c1c59d134cd7b1235babdb1a70a4b436a9281900390910190a1505050565b6000828211156124b15760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b0381166124ff57604051600160e51b62461bcd02815260040180806020018281038252602681526020018061281a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b61256c826001600160a01b03166127d6565b6125c05760408051600160e51b62461bcd02815260206004820152600f60248201527f746f6b656e206e6f7420666f756e640000000000000000000000000000000000604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106125fe5780518252601f1990920191602091820191016125df565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612660576040519150601f19603f3d011682016040523d82523d6000602084013e612665565b606091505b5091509150816126b65760408051600160e51b62461bcd02815260206004820152601160248201526001607a1b701d1bdad95b8818d85b1b0819985a5b195902604482015290519081900360640190fd5b805115611035578080602001905160208110156126d257600080fd5b50516110355760408051600160e51b62461bcd02815260206004820152601160248201526001607a1b701d1bdad95b8818d85b1b0819985a5b195902604482015290519081900360640190fd5b6000803d8015612736576020811461273f5761274b565b6001915061274b565b60206000803e60005191505b501515905090565b60008183106127625781612264565b5090919050565b60008082116127c25760408051600160e51b62461bcd02815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b60008284816127cd57fe5b04949350505050565b3b151590565b815481835581811115610dce57600083815260209020610dce91810190830161122291905b808211156128155760008155600101612801565b509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373746f6b656e20616c72656164792070656e64696e6720726567697374726174696f6e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a165627a7a72305820f7bf11fa155f7e5a83511ad79fb59c4cb1bb25a344ca9e1a81a098d69856f9510029", + "deployedBytecode": "0x6080604052600436106102045760003560e01c80639a0ba2ea11610118578063c2250a99116100a0578063f75adff81161006f578063f75adff814610713578063f7cdf47c146107a0578063f940e385146107b5578063f9f92be4146107f0578063ffa1ad741461082357610204565b8063c2250a9914610665578063e311481514610698578063e80b2b3d146106ad578063f2fde38b146106e057610204565b8063bab2af1d116100e7578063bab2af1d146105c0578063bab2f552146105f3578063bd10243014610608578063bfdce1991461061d578063c0470bb31461065057610204565b80639a0ba2ea146105395780639e45e0d014610563578063ad38bf2214610578578063b3a2af69146105ab57610204565b806370324b771161019b57806383b781881161016a57806383b781881461047a5780638da5cb5b146104c75780638f32d59b146104dc578063949813b8146104f1578063975057e71461052457610204565b806370324b77146103eb578063715018a61461042657806374c9ea821461043b5780637f03864b1461046557610204565b8063352fc85f116101d7578063352fc85f1461034f5780635bec4cb4146103955780636e553f65146103aa5780636fd689e8146103d657610204565b806305cf47441461028d57806309824a80146102d25780631e83409a14610307578063335e536c1461033a575b6003546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561023d573d6000803e3d6000fd5b506040805134815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6020820152815133927fea0e59b45b3d900359e312f5e429275ec827a5e4e2430e1610a1c678cd6cd2e2928290030190a2005b34801561029957600080fd5b506102c0600480360360208110156102b057600080fd5b50356001600160a01b03166108ad565b60408051918252519081900360200190f35b3480156102de57600080fd5b50610305600480360360208110156102f557600080fd5b50356001600160a01b03166108bf565b005b34801561031357600080fd5b506103056004803603602081101561032a57600080fd5b50356001600160a01b0316610a4d565b34801561034657600080fd5b506102c0610dd3565b34801561035b57600080fd5b506103796004803603602081101561037257600080fd5b5035610dd9565b604080516001600160a01b039092168252519081900360200190f35b3480156103a157600080fd5b506102c0610e00565b610305600480360360408110156103c057600080fd5b50803590602001356001600160a01b0316610e06565b3480156103e257600080fd5b50610305610f87565b3480156103f757600080fd5b506102c06004803603604081101561040e57600080fd5b506001600160a01b038135811691602001351661103b565b34801561043257600080fd5b506103056110ca565b34801561044757600080fd5b506103056004803603602081101561045e57600080fd5b503561115e565b34801561047157600080fd5b506102c06111ef565b34801561048657600080fd5b506104b36004803603604081101561049d57600080fd5b506001600160a01b0381351690602001356111f5565b604080519115158252519081900360200190f35b3480156104d357600080fd5b50610379611215565b3480156104e857600080fd5b506104b3611225565b3480156104fd57600080fd5b506102c06004803603602081101561051457600080fd5b50356001600160a01b0316611236565b34801561053057600080fd5b50610379611248565b34801561054557600080fd5b506103796004803603602081101561055c57600080fd5b5035611257565b34801561056f57600080fd5b50610379611264565b34801561058457600080fd5b506103056004803603602081101561059b57600080fd5b50356001600160a01b0316611273565b3480156105b757600080fd5b506102c0611385565b3480156105cc57600080fd5b50610305600480360360208110156105e357600080fd5b50356001600160a01b0316611570565b3480156105ff57600080fd5b506102c0611633565b34801561061457600080fd5b50610379611639565b34801561062957600080fd5b506102c06004803603602081101561064057600080fd5b50356001600160a01b0316611648565b34801561065c57600080fd5b506102c061165a565b34801561067157600080fd5b506103056004803603602081101561068857600080fd5b50356001600160a01b0316611660565b3480156106a457600080fd5b506102c0611716565b3480156106b957600080fd5b506102c0600480360360208110156106d057600080fd5b50356001600160a01b031661171c565b3480156106ec57600080fd5b506103056004803603602081101561070357600080fd5b50356001600160a01b03166117be565b34801561071f57600080fd5b506103056004803603604081101561073657600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561076157600080fd5b82018360208201111561077357600080fd5b8035906020019184602083028401116401000000008311171561079557600080fd5b509092509050611811565b3480156107ac57600080fd5b50610379611849565b3480156107c157600080fd5b50610305600480360360408110156107d857600080fd5b506001600160a01b0381358116916020013516611861565b3480156107fc57600080fd5b506103056004803603602081101561081357600080fd5b50356001600160a01b0316611aee565b34801561082f57600080fd5b50610838611ccf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561087257818101518382015260200161085a565b50505050905090810190601f16801561089f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600c6020526000908152604090205481565b6108c7611225565b6109095760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600a6020526040902054156109775760408051600160e51b62461bcd02815260206004820152601860248201527f746f6b656e20616c726561647920726567697374657265640000000000000000604482015290519081900360640190fd5b60085460005b818110156109f957826001600160a01b03166008828154811061099c57fe5b6000918252602090912001546001600160a01b031614156109f157604051600160e51b62461bcd0281526004018080602001828103825260228152602001806128406022913960400191505060405180910390fd5b60010161097d565b5050600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0392909216919091179055565b60025460408051600160e01b63c3c5a5470281526001600160a01b03808516600483015291518493929092169163c3c5a54791602480820192602092909190829003018186803b158015610aa057600080fd5b505afa158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b5051610b205760408051600160e51b62461bcd02815260206004820152601a60248201527f6461726b6e6f6465206973206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b60035460408051600160e01b63fe575a870281526001600160a01b03808616600483015291518593929092169163fe575a8791602480820192602092909190829003018186803b158015610b7357600080fd5b505afa158015610b87573d6000803e3d6000fd5b505050506040513d6020811015610b9d57600080fd5b505115610bf45760408051600160e51b62461bcd02815260206004820152601760248201527f6461726b6e6f646520697320626c61636b6c6973746564000000000000000000604482015290519081900360640190fd5b60035460408051600160e01b639a4d6f3b0281526001600160a01b03868116600483015291516000939290921691639a4d6f3b91602480820192602092909190829003018186803b158015610c4857600080fd5b505afa158015610c5c573d6000803e3d6000fd5b505050506040513d6020811015610c7257600080fd5b5051905080610d295760035460408051600160e11b634d8c928d0281526001600160a01b03878116600483015291519190921691639b19251a91602480830192600092919082900301818387803b158015610ccc57600080fd5b505af1158015610ce0573d6000803e3d6000fd5b50506040805142815290516001600160a01b03881693507f7634be097aa1800f447c3ae3ffe9444f1bc44a98bd2c1e986c1883f9f645f2b692509081900360200190a250610dce565b600d548110610d825760408051600160e51b62461bcd02815260206004820152601b60248201527f63616e6e6f7420636c61696d20666f722074686973206379636c650000000000604482015290519081900360640190fd5b610d8b84611d5c565b60065460408051918252516001600160a01b038616917f99c5ad5c5f898b30039b8cc54b8c0e6eb423e49bfc965a5999ebad131984e40d919081900360200190a2505b505050565b600d5481565b60088181548110610de657fe5b6000918252602090912001546001600160a01b0316905081565b600e5481565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610ec557348314610e845760408051600160e51b62461bcd02815260206004820152601860248201527f6d69736d617463686564206465706f7369742076616c75650000000000000000604482015290519081900360640190fd5b5060035460405134916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610ebf573d6000803e3d6000fd5b50610f40565b3415610f1b5760408051600160e51b62461bcd02815260206004820152601960248201527f756e6578706563746564206574686572207472616e7366657200000000000000604482015290519081900360640190fd5b600354610f3d906001600160a01b03848116913391168663ffffffff611f2416565b90505b604080518281526001600160a01b0384166020820152815133927fea0e59b45b3d900359e312f5e429275ec827a5e4e2430e1610a1c678cd6cd2e2928290030190a2505050565b610f8f611225565b610fd15760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b600360009054906101000a90046001600160a01b03166001600160a01b0316634e71e0c86040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561102157600080fd5b505af1158015611035573d6000803e3d6000fd5b50505050565b60035460408051600160e01b6370324b770281526001600160a01b0385811660048301528481166024830152915160009392909216916370324b7791604480820192602092909190829003018186803b15801561109757600080fd5b505afa1580156110ab573d6000803e3d6000fd5b505050506040513d60208110156110c157600080fd5b50519392505050565b6110d2611225565b6111145760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b611166611225565b6111a85760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b600e805490829055604080518381526020810183905281517f59cbd678a801fd313f133a5efc6be7aee2814b07d41c9d9fb72f91197b2f9d4a929181900390910190a15050565b60075481565b601060209081526000928352604080842090915290825290205460ff1681565b6000546001600160a01b03165b90565b6000546001600160a01b0316331490565b600b6020526000908152604090205481565b6003546001600160a01b031681565b60098181548110610de657fe5b6002546001600160a01b031681565b61127b611225565b6112bd5760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b6001600160a01b03811661131b5760408051600160e51b62461bcd02815260206004820152601860248201527f696e76616c696420636f6e747261637420616464726573730000000000000000604482015290519081900360640190fd5b600454604080516001600160a01b038085168252909216602083015280517fef549604431567c0cd1b94ebc91fed6cf5cd907f6ff0b63aa1d475dcf8d4901c9281900390910190a1600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000600f544210156113e15760408051600160e51b62461bcd02815260206004820152601b60248201527f63616e6e6f74206379636c65207965743a20746f6f206561726c790000000000604482015290519081900360640190fd5b60055443141561143b5760408051600160e51b62461bcd02815260206004820152600c60248201527f6e6f206e657720626c6f636b0000000000000000000000000000000000000000604482015290519081900360640190fd5b60095460005b8181101561147b576114736009828154811061145957fe5b6000918252602090912001546001600160a01b031661210f565b600101611441565b506005805460065543905542600d819055600e5461149f919063ffffffff61220716565b600f5560035460408051600160e11b630fe37f4702815290516001600160a01b0390921691631fc6fe8e91600480820192602092909190829003018186803b1580156114ea57600080fd5b505afa1580156114fe573d6000803e3d6000fd5b505050506040513d602081101561151457600080fd5b505160075561152161226b565b600554600654600f5460408051938452602084019290925282820152517f6611b6f4e1fb92277f863eca934cba1c2d6987070d73762b72b942720bfe43a29181900360600190a1505060055490565b611578611225565b6115ba5760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600a60205260409020546116275760408051600160e51b62461bcd02815260206004820152601460248201527f746f6b656e206e6f742072656769737465726564000000000000000000000000604482015290519081900360640190fd5b6116308161233c565b50565b60055481565b6004546001600160a01b031681565b600a6020526000908152604090205481565b600f5481565b611668611225565b6116aa5760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b60035460408051600160e01b63f2fde38b0281526001600160a01b0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b1580156116fb57600080fd5b505af115801561170f573d6000803e3d6000fd5b5050505050565b60065481565b6001600160a01b038082166000818152600b60209081526040808320546003548251600160e01b63a0821be30281526004810196909652915193956117b895919492169263a0821be392602480840193829003018186803b15801561178057600080fd5b505afa158015611794573d6000803e3d6000fd5b505050506040513d60208110156117aa57600080fd5b50519063ffffffff61245716565b92915050565b6117c6611225565b6118085760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612862833981519152604482015290519081900360640190fd5b611630816124b7565b60005b81811015611035576118418484848481811061182c57fe5b905060200201356001600160a01b0316611861565b600101611814565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b60025460408051600160e01b631cedf8a30281526001600160a01b03858116600483015291516000939290921691631cedf8a391602480820192602092909190829003018186803b1580156118b557600080fd5b505afa1580156118c9573d6000803e3d6000fd5b505050506040513d60208110156118df57600080fd5b505190506001600160a01b0381166119415760408051600160e51b62461bcd02815260206004820152601660248201527f696e76616c6964206461726b6e6f6465206f776e657200000000000000000000604482015290519081900360640190fd5b60035460408051600160e01b6370324b770281526001600160a01b0386811660048301528581166024830152915160009392909216916370324b7791604480820192602092909190829003018186803b15801561199d57600080fd5b505afa1580156119b1573d6000803e3d6000fd5b505050506040513d60208110156119c757600080fd5b5051905080611a205760408051600160e51b62461bcd02815260206004820152601360248201527f6e6f7468696e6720746f20776974686472617700000000000000000000000000604482015290519081900360640190fd5b60035460408051600160e01b63f9ce78130281526001600160a01b03878116600483015286811660248301526044820185905285811660648301529151919092169163f9ce781391608480830192600092919082900301818387803b158015611a8857600080fd5b505af1158015611a9c573d6000803e3d6000fd5b5050604080518481526001600160a01b038781166020830152825190891694507fe1f157c0881b2e477dca89772b158029611366b8e7dc8be4f6f308fa7a0aa02893509081900390910190a250505050565b6004546001600160a01b03163314611b505760408051600160e51b62461bcd02815260206004820152600f60248201527f6e6f7420426c61636b6c69737465720000000000000000000000000000000000604482015290519081900360640190fd5b60025460408051600160e01b63c3c5a5470281526001600160a01b03808516600483015291518493929092169163c3c5a54791602480820192602092909190829003018186803b158015611ba357600080fd5b505afa158015611bb7573d6000803e3d6000fd5b505050506040513d6020811015611bcd57600080fd5b5051611c235760408051600160e51b62461bcd02815260206004820152601a60248201527f6461726b6e6f6465206973206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b60035460408051600160e21b633e7e4af90281526001600160a01b0385811660048301529151919092169163f9f92be491602480830192600092919082900301818387803b158015611c7457600080fd5b505af1158015611c88573d6000803e3d6000fd5b50506040805142815290516001600160a01b03861693507fd2b847810d644004679c7a8d5f5188fe2b12b6f34dba8501760d99232fa9b7bc92509081900360200190a25050565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015611d545780601f10611d2957610100808354040283529160200191611d54565b820191906000526020600020905b815481529060010190602001808311611d3757829003601f168201915b505050505081565b6001600160a01b0381166000908152601060209081526040808320600654845290915290205460ff1615611dda5760408051600160e51b62461bcd02815260206004820152601660248201527f72657761726420616c726561647920636c61696d656400000000000000000000604482015290519081900360640190fd5b6001600160a01b038116600090815260106020908152604080832060065484529091528120805460ff19166001179055600954905b81811015610dce57600060098281548110611e2657fe5b60009182526020808320909101546001600160a01b0316808352600c90915260409091205490915015611f1b576001600160a01b0381166000908152600c6020908152604080832054600b90925290912054611e879163ffffffff61245716565b6001600160a01b038083166000818152600b6020908152604080832095909555600354600c909152848220548551600160e01b63d23b90a50281528a86166004820152602481019490945260448401529351939092169263d23b90a59260648084019391929182900301818387803b158015611f0257600080fd5b505af1158015611f16573d6000803e3d6000fd5b505050505b50600101611e0f565b600080856001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015611f7d57600080fd5b505afa158015611f91573d6000803e3d6000fd5b505050506040513d6020811015611fa757600080fd5b5051604080516001600160a01b0388811660248301528716604482015260648082018790528251808303909101815260849091019091526020810180516001600160e01b0316600160e01b6323b872dd0217905290915061200990879061255a565b61201161271f565b6120655760408051600160e51b62461bcd02815260206004820152601360248201527f7472616e7366657246726f6d206661696c656400000000000000000000000000604482015290519081900360640190fd5b6000866001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b50519050612104846120ff838563ffffffff61245716565b612753565b979650505050505050565b600754612141576001600160a01b0381166000908152600b60209081526040808320839055600c909152812055611630565b60035460408051600160e01b63a0821be30281526001600160a01b0384811660048301529151919092169163a0821be3916024808301926020929190829003018186803b15801561219157600080fd5b505afa1580156121a5573d6000803e3d6000fd5b505050506040513d60208110156121bb57600080fd5b50516001600160a01b0382166000908152600b602052604090208190556007546121eb919063ffffffff61276916565b6001600160a01b0382166000908152600c602052604090205550565b6000828201838110156122645760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60085460005b8181101561232a5760006008828154811061228857fe5b6000918252602080832090910154600980546001810182557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b0319166001600160a01b03909316928317905554818452600a835260409384902055825181815292519093507fd780ddbc43f0c4efd61c5ca1bc8eeee3368abfb1f97aa7355da9f8bf8431c8ae9281900390910190a150600101612271565b5060006123386008826127dc565b5050565b600980546000919061235590600163ffffffff61245716565b8154811061235f57fe5b60009182526020808320909101546001600160a01b038581168452600a90925260408320549116925061239990600163ffffffff61245716565b905081600982815481106123a957fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790558583168252600a905260408082205492851682529020556009546123f6906001612457565b6124016009826127dc565b506001600160a01b0383166000818152600a6020908152604080832092909255815192835290517fe46f21bb6906b7d69a6c06d5662a2b6c1c59d134cd7b1235babdb1a70a4b436a9281900390910190a1505050565b6000828211156124b15760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b0381166124ff57604051600160e51b62461bcd02815260040180806020018281038252602681526020018061281a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b61256c826001600160a01b03166127d6565b6125c05760408051600160e51b62461bcd02815260206004820152600f60248201527f746f6b656e206e6f7420666f756e640000000000000000000000000000000000604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106125fe5780518252601f1990920191602091820191016125df565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612660576040519150601f19603f3d011682016040523d82523d6000602084013e612665565b606091505b5091509150816126b65760408051600160e51b62461bcd02815260206004820152601160248201526001607a1b701d1bdad95b8818d85b1b0819985a5b195902604482015290519081900360640190fd5b805115611035578080602001905160208110156126d257600080fd5b50516110355760408051600160e51b62461bcd02815260206004820152601160248201526001607a1b701d1bdad95b8818d85b1b0819985a5b195902604482015290519081900360640190fd5b6000803d8015612736576020811461273f5761274b565b6001915061274b565b60206000803e60005191505b501515905090565b60008183106127625781612264565b5090919050565b60008082116127c25760408051600160e51b62461bcd02815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b60008284816127cd57fe5b04949350505050565b3b151590565b815481835581811115610dce57600083815260209020610dce91810190830161122291905b808211156128155760008155600101612801565b509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373746f6b656e20616c72656164792070656e64696e6720726567697374726174696f6e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a165627a7a72305820f7bf11fa155f7e5a83511ad79fb59c4cb1bb25a344ca9e1a81a098d69856f9510029", + "sourceMap": "458:16663:0:-;;;6431:610;8:9:-1;5:2;;;30:1;27;20:12;5:2;6431:610:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;6431:610:0;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;;6431:610:0;;;;;;;;;;;;;;657:6:30;:19;;-1:-1:-1;;;;;;657:19:30;666:10;657:19;;;;691:40;;6431:610:0;;-1:-1:-1;6431:610:0;;-1:-1:-1;6431:610:0;-1:-1:-1;;;;;724:6:30;;;;;657;691:40;;657:6;;691:40;6633:18:0;;;;:7;;:18;;;;;:::i;:::-;-1:-1:-1;6661:16:0;:36;;-1:-1:-1;;;;;6661:36:0;;;-1:-1:-1;;;;;;6661:36:0;;;;;;;6707:5;:29;;;;;;;;;;;;;;;6746:13;:37;;;6837:11;:24;;;;;6851:10;6837:24;;;6922:12;6907;:27;6961:15;6944:14;:32;;;7001:33;;6762:21;7001:18;;;;;;;;;;:33;;:::i;:::-;6986:12;:48;-1:-1:-1;458:16663:0;;-1:-1:-1;;;458:16663:0;834:176:29;892:7;923:5;;;946:6;;;;938:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:29:o;458:16663:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;458:16663:0;;;-1:-1:-1;458:16663:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "458:16663:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8052:5;;8044:34;;-1:-1:-1;;;;;8052:5:0;;;;8068:9;8044:34;;;;;8052:5;8044:34;8052:5;8044:34;8068:9;8052:5;8044:34;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;8093:51:0;;;8124:9;8093:51;;730:42;8093:51;;;;;;8112:10;;8093:51;;;;;;;;458:16663;2183:59;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2183:59:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2183:59:0;-1:-1:-1;;;;;2183:59:0;;:::i;:::-;;;;;;;;;;;;;;;;11871:376;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11871:376:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11871:376:0;-1:-1:-1;;;;;11871:376:0;;:::i;:::-;;10729:630;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10729:630:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10729:630:0;-1:-1:-1;;;;;10729:630:0;;:::i;2306:29::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2306:29:0;;;:::i;1501:30::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1501:30:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1501:30:0;;:::i;:::-;;;;-1:-1:-1;;;;;1501:30:0;;;;;;;;;;;;;;2415:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2415:28:0;;;:::i;9741:606::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9741:606:0;;;;;;-1:-1:-1;;;;;9741:606:0;;:::i;13953:89::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13953:89:0;;;:::i;8437:162::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8437:162:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;8437:162:0;;;;;;;;;;:::i;1599:137:30:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1599:137:30;;;:::i;13171:234:0:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13171:234:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13171:234:0;;:::i;1266:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1266:25:0;;;:::i;2727:65::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2727:65:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2727:65:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;814:77:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;814:77:30;;;:::i;1165:90::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1165:90:30;;;:::i;2012:51:0:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2012:51:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2012:51:0;-1:-1:-1;;;;;2012:51:0;;:::i;967:33::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;967:33:0;;;:::i;1650:::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1650:33:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1650:33:0;;:::i;779:40::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;779:40:0;;;:::i;12762:219::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12762:219:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12762:219:0;-1:-1:-1;;;;;12762:219:0;;:::i;8648:882::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8648:882:0;;;:::i;12455:176::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12455:176:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12455:176:0;-1:-1:-1;;;;;12455:176:0;;:::i;1135:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1135:27:0;;;:::i;1102:26::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1102:26:0;;;:::i;1793:55::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1793:55:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1793:55:0;-1:-1:-1;;;;;1793:55:0;;:::i;2523:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2523:27:0;;;:::i;13607:121::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13607:121:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13607:121:0;-1:-1:-1;;;;;13607:121:0;;:::i;1168:28::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1168:28:0;;;:::i;8267:164::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8267:164:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8267:164:0;-1:-1:-1;;;;;8267:164:0;;:::i;1885:107:30:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1885:107:30;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1885:107:30;-1:-1:-1;;;;;1885:107:30;;:::i;7737:196:0:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7737:196:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;7737:196:0;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;7737:196:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;7737:196:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;7737:196:0;;-1:-1:-1;7737:196:0;-1:-1:-1;7737:196:0;:::i;695:77::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;695:77:0;;;:::i;7255:476::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7255:476:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;7255:476:0;;;;;;;;;;:::i;11508:183::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11508:183:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11508:183:0;-1:-1:-1;;;;;11508:183:0;;:::i;579:21::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;579:21:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;579:21:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2183:59;;;;;;;;;;;;;:::o;11871:376::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;-1:-1:-1;;;;;11947:28:0;;;;;;:20;:28;;;;;;:33;11939:70;;;;;-1:-1:-1;;;;;11939:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;12038:13;:20;12019:16;12068:137;12089:11;12085:1;:15;12068:137;;;12149:6;-1:-1:-1;;;;;12129:26:0;:13;12143:1;12129:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;12129:16:0;:26;;12121:73;;;;-1:-1:-1;;;;;12121:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12102:3;;12068:137;;;-1:-1:-1;;12214:13:0;27:10:-1;;39:1;23:18;;45:23;;-1:-1;12214:26:0;;;;;;;;-1:-1:-1;;;;;;12214:26:0;-1:-1:-1;;;;;12214:26:0;;;;;;;;;;11871:376::o;10729:630::-;5498:16;;:40;;;-1:-1:-1;;;;;5498:40:0;;-1:-1:-1;;;;;5498:40:0;;;;;;;;;10785:9;;5498:16;;;;;:29;;:40;;;;;;;;;;;;;;;:16;:40;;;5:2:-1;;;;30:1;27;20:12;5:2;5498:40:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5498:40:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5498:40:0;5490:79;;;;;-1:-1:-1;;;;;5490:79:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5895:5;;:30;;;-1:-1:-1;;;;;5895:30:0;;-1:-1:-1;;;;;5895:30:0;;;;;;;;;10811:9;;5895:5;;;;;:19;;:30;;;;;;;;;;;;;;;:5;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;5895:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5895:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5895:30:0;5894:31;5886:67;;;;;-1:-1:-1;;;;;5886:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;10858:5;;:34;;;-1:-1:-1;;;;;10858:34:0;;-1:-1:-1;;;;;10858:34:0;;;;;;;;;10832:23;;10858:5;;;;;:23;;:34;;;;;;;;;;;;;;;:5;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;10858:34:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10858:34:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10858:34:0;;-1:-1:-1;10962:20:0;10958:154;;10998:5;;:26;;;-1:-1:-1;;;;;10998:26:0;;-1:-1:-1;;;;;10998:26:0;;;;;;;;;:5;;;;;:15;;:26;;;;;:5;;:26;;;;;;;:5;;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;10998:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;11043:38:0;;;11077:3;11043:38;;;;-1:-1:-1;;;;;11043:38:0;;;-1:-1:-1;11043:38:0;;-1:-1:-1;11043:38:0;;;;;;;;11095:7;;;10958:154;11148:14;;11130:15;:32;11122:72;;;;;-1:-1:-1;;;;;11122:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;11264:31;11285:9;11264:20;:31::i;:::-;11338:13;;11310:42;;;;;;;-1:-1:-1;;;;;11310:42:0;;;;;;;;;;;;;5963:1;;5579;10729:630;;:::o;2306:29::-;;;;:::o;1501:30::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1501:30:0;;-1:-1:-1;1501:30:0;:::o;2415:28::-;;;;:::o;9741:606::-;9817:21;-1:-1:-1;;;;;9852:18:0;;730:42;9852:18;9848:425;;;9904:9;9894:6;:19;9886:56;;;;;-1:-1:-1;;;;;9886:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10003:5:0;;9995:34;;9972:9;;-1:-1:-1;;;;;10003:5:0;;9995:34;;;;;9972:9;;10003:5;9995:34;10003:5;9995:34;9972:9;10003:5;9995:34;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9995:34:0;9848:425;;;10068:9;:14;10060:52;;;;;-1:-1:-1;;;;;10060:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;10247:5;;10188:74;;-1:-1:-1;;;;;10188:38:0;;;;10227:10;;10247:5;10255:6;10188:74;:38;:74;:::i;:::-;10172:90;;9848:425;10287:53;;;;;;-1:-1:-1;;;;;10287:53:0;;;;;;;;10306:10;;10287:53;;;;;;;;9741:606;;;:::o;13953:89::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;14013:5:0;;;;;;;;;-1:-1:-1;;;;;14013:5:0;-1:-1:-1;;;;;14013:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14013:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14013:22:0;;;;13953:89::o;8437:162::-;8549:5;;:43;;;-1:-1:-1;;;;;8549:43:0;;-1:-1:-1;;;;;8549:43:0;;;;;;;;;;;;;;;;8523:7;;8549:5;;;;;:22;;:43;;;;;;;;;;;;;;;:5;:43;;;5:2:-1;;;;30:1;27;20:12;5:2;8549:43:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8549:43:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8549:43:0;;8437:162;-1:-1:-1;;;8437:162:0:o;1599:137:30:-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;1697:1;1681:6;;1660:40;;-1:-1:-1;;;;;1681:6:30;;;;1660:40;;1697:1;;1660:40;1727:1;1710:19;;-1:-1:-1;;;;;;1710:19:30;;;1599:137::o;13171:234:0:-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;13277:13:0;;;13300:32;;;;13347:51;;;;;;;;;;;;;;;;;;;;;;;;;1074:1:30;13171:234:0;:::o;1266:25::-;;;;:::o;2727:65::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;814:77:30:-;852:7;878:6;-1:-1:-1;;;;;878:6:30;814:77;;:::o;1165:90::-;1205:4;1242:6;-1:-1:-1;;;;;1242:6:30;1228:10;:20;;1165:90::o;2012:51:0:-;;;;;;;;;;;;;:::o;967:33::-;;;-1:-1:-1;;;;;967:33:0;;:::o;1650:::-;;;;;;;;;;779:40;;;-1:-1:-1;;;;;779:40:0;;:::o;12762:219::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;-1:-1:-1;;;;;12841:19:0;;12833:56;;;;;-1:-1:-1;;;;;12833:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;12933:11;;12904:41;;;-1:-1:-1;;;;;12904:41:0;;;;;12933:11;;;12904:41;;;;;;;;;;;;;;;;12955:11;:19;;-1:-1:-1;;;;;;12955:19:0;-1:-1:-1;;;;;12955:19:0;;;;;;;;;;12762:219::o;8648:882::-;8689:7;8723:12;;8716:3;:19;;8708:59;;;;;-1:-1:-1;;;;;8708:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;8801:12;;8785;:28;;8777:53;;;;;-1:-1:-1;;;;;8777:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;8908:16;:23;8889:16;8941:101;8962:11;8958:1;:15;8941:101;;;8994:37;9011:16;9028:1;9011:19;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9011:19:0;8994:16;:37::i;:::-;8975:3;;8941:101;;;-1:-1:-1;9097:12:0;;;9081:13;:28;9134:12;9119:27;;9173:15;9156:14;:32;;;9232:13;;9213:33;;9173:15;9213:33;:18;:33;:::i;:::-;9198:12;:48;9318:5;;:31;;;-1:-1:-1;;;;;9318:31:0;;;;-1:-1:-1;;;;;9318:5:0;;;;:29;;:31;;;;;;;;;;;;;;;:5;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;9318:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9318:31:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9318:31:0;9305:10;:44;9406:18;:16;:18::i;:::-;9452:12;;9466:13;;9481:12;;9440:54;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9511:12:0;;8648:882;:::o;12455:176::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;-1:-1:-1;;;;;12533:28:0;;12564:1;12533:28;;;:20;:28;;;;;;12525:65;;;;;-1:-1:-1;;;;;12525:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;12600:24;12617:6;12600:16;:24::i;:::-;12455:176;:::o;1135:27::-;;;;:::o;1102:26::-;;;-1:-1:-1;;;;;1102:26:0;;:::o;1793:55::-;;;;;;;;;;;;;:::o;2523:27::-;;;;:::o;13607:121::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;13687:5:0;;:34;;;-1:-1:-1;;;;;13687:34:0;;-1:-1:-1;;;;;13687:34:0;;;;;;;;;:5;;;;;:23;;:34;;;;;:5;;:34;;;;;;;:5;;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;13687:34:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13687:34:0;;;;13607:121;:::o;1168:28::-;;;;:::o;8267:164::-;-1:-1:-1;;;;;8399:24:0;;;8338:7;8399:24;;;:16;:24;;;;;;;;;8364:5;;:30;;-1:-1:-1;;;;;8364:30:0;;;;;;;;;;;8338:7;;8364:60;;8399:24;;8364:5;;;:22;;:30;;;;;;;;;;:5;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;8364:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8364:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8364:30:0;;:60;:34;:60;:::i;:::-;8357:67;8267:164;-1:-1:-1;;8267:164:0:o;1885:107:30:-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;1957:28;1976:8;1957:18;:28::i;7737:196:0:-;7834:6;7829:98;7846:18;;;7829:98;;;7885:31;7894:9;7905:7;;7913:1;7905:10;;;;;;;;;;;;;-1:-1:-1;;;;;7905:10:0;7885:8;:31::i;:::-;7866:3;;7829:98;;695:77;730:42;695:77;:::o;7255:476::-;7357:16;;:44;;;-1:-1:-1;;;;;7357:44:0;;-1:-1:-1;;;;;7357:44:0;;;;;;;;;7325:29;;7357:16;;;;;:33;;:44;;;;;;;;;;;;;;;:16;:44;;;5:2:-1;;;;30:1;27;20:12;5:2;7357:44:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7357:44:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7357:44:0;;-1:-1:-1;;;;;;7419:29:0;;7411:64;;;;;-1:-1:-1;;;;;7411:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;7503:5;;:41;;;-1:-1:-1;;;;;7503:41:0;;-1:-1:-1;;;;;7503:41:0;;;;;;;;;;;;;;;;7486:14;;7503:5;;;;;:22;;:41;;;;;;;;;;;;;;;:5;:41;;;5:2:-1;;;;30:1;27;20:12;5:2;7503:41:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7503:41:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7503:41:0;;-1:-1:-1;7562:10:0;7554:42;;;;;-1:-1:-1;;;;;7554:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;7607:5;;:56;;;-1:-1:-1;;;;;7607:56:0;;-1:-1:-1;;;;;7607:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:5;;;;;:14;;:56;;;;;:5;;:56;;;;;;;:5;;:56;;;5:2:-1;;;;30:1;27;20:12;5:2;7607:56:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;7678:46:0;;;;;;-1:-1:-1;;;;;7678:46:0;;;;;;;;;;;;;-1:-1:-1;7678:46:0;;-1:-1:-1;7678:46:0;;;;;;;;;7255:476;;;;:::o;11508:183::-;5696:11;;-1:-1:-1;;;;;5696:11:0;5711:10;5696:25;5688:53;;;;;-1:-1:-1;;;;;5688:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5498:16;;:40;;;-1:-1:-1;;;;;5498:40:0;;-1:-1:-1;;;;;5498:40:0;;;;;;;;;11584:9;;5498:16;;;;;:29;;:40;;;;;;;;;;;;;;;:16;:40;;;5:2:-1;;;;30:1;27;20:12;5:2;5498:40:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5498:40:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5498:40:0;5490:79;;;;;-1:-1:-1;;;;;5490:79:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;11605:5;;:26;;;-1:-1:-1;;;;;11605:26:0;;-1:-1:-1;;;;;11605:26:0;;;;;;;;;:5;;;;;:15;;:26;;;;;:5;;:26;;;;;;;:5;;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;11605:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;11646:38:0;;;11680:3;11646:38;;;;-1:-1:-1;;;;;11646:38:0;;;-1:-1:-1;11646:38:0;;-1:-1:-1;11646:38:0;;;;;;;;5751:1;11508:183;:::o;579:21::-;;;;;;;;;;;;;;;-1:-1:-1;;579:21:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14326:712::-;-1:-1:-1;;;;;14402:24:0;;;;;;:13;:24;;;;;;;;14427:13;;14402:39;;;;;;;;;;14401:40;14393:75;;;;;-1:-1:-1;;;;;14393:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14478:24:0;;;;;;:13;:24;;;;;;;;14503:13;;14478:39;;;;;;;:46;;-1:-1:-1;;14478:46:0;14520:4;14478:46;;;14553:16;:23;;14586:446;14607:11;14603:1;:15;14586:446;;;14639:13;14655:16;14672:1;14655:19;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14655:19:0;14767:31;;;:24;:31;;;;;;;;14655:19;;-1:-1:-1;14767:35:0;14763:259;;-1:-1:-1;;;;;14876:31:0;;;;;;:24;:31;;;;;;;;;14848:16;:23;;;;;;;:60;;;:27;:60;:::i;:::-;-1:-1:-1;;;;;14822:23:0;;;;;;;:16;:23;;;;;;;;:86;;;;14926:5;;14975:24;:31;;;;;;;14926:81;;-1:-1:-1;;;;;14926:81:0;;;;;;;;;;;;;;;;;;;;;;:5;;;;;:30;;:81;;;;;14822:23;;14926:81;;;;;;14822:23;14926:5;:81;;;5:2:-1;;;;30:1;27;20:12;5:2;14926:81:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14926:81:0;;;;14763:259;-1:-1:-1;14620:3:0;;14586:446;;1461:465:12;1568:7;1587:22;1612:5;-1:-1:-1;;;;;1612:15:12;;1628:2;1612:19;;;;;;;;;;;;;-1:-1:-1;;;;;1612:19:12;-1:-1:-1;;;;;1612:19:12;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1612:19:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1612:19:12;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1612:19:12;1667:68;;;-1:-1:-1;;;;;1667:68:12;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1667:68:12;;;;;;;1612:19;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;;;179:29;160:49;;1612:19:12;;-1:-1:-1;1641:95:12;;1660:5;;1641:18;:95::i;:::-;1754:21;:19;:21::i;:::-;1746:53;;;;;-1:-1:-1;;;;;1746:53:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;1809:21;1833:5;-1:-1:-1;;;;;1833:15:12;;1849:2;1833:19;;;;;;;;;;;;;-1:-1:-1;;;;;1833:19:12;-1:-1:-1;;;;;1833:19:12;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1833:19:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1833:19:12;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1833:19:12;;-1:-1:-1;1869:50:12;1878:5;1885:33;1833:19;1903:14;1885:33;:17;:33;:::i;:::-;1869:8;:50::i;:::-;1862:57;1461:465;-1:-1:-1;;;;;;;1461:465:12:o;15213:441:0:-;15277:10;;15273:375;;-1:-1:-1;;;;;15308:24:0;;15335:1;15308:24;;;:16;:24;;;;;;;;:28;;;15350:24;:32;;;;;:36;15273:375;;;15518:5;;:30;;;-1:-1:-1;;;;;15518:30:0;;-1:-1:-1;;;;;15518:30:0;;;;;;;;;:5;;;;;:22;;:30;;;;;;;;;;;;;;:5;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;15518:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15518:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;15518:30:0;-1:-1:-1;;;;;15491:24:0;;;;;;:16;15518:30;15491:24;;;;:57;;;15626:10;;15597:40;;15518:30;15597:40;:28;:40;:::i;:::-;-1:-1:-1;;;;;15562:32:0;;;;;;:24;:32;;;;;:75;15213:441;:::o;834:176:29:-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:29:o;16707:411:0:-;16799:13;:20;16780:16;16829:249;16850:11;16846:1;:15;16829:249;;;16882:13;16898;16912:1;16898:16;;;;;;;;;;;;;;;;;;;;16928;27:10:-1;;16898:16:0;23:18:-1;;45:23;;16928:28:0;;;;-1:-1:-1;;;;;;16928:28:0;-1:-1:-1;;;;;16898:16:0;;;16928:28;;;;;17000:23;16970:27;;;:20;:27;;;;;;;:53;17042:25;;;;;;;16898:16;;-1:-1:-1;17042:25:0;;;;;;;;;;-1:-1:-1;16863:3:0;;16829:249;;;-1:-1:-1;17110:1:0;17087:24;:13;17110:1;17087:24;:::i;:::-;;16707:411;:::o;15830:688::-;15910:16;15927:23;;15890:17;;15910:16;15927:30;;15955:1;15927:30;:27;:30;:::i;:::-;15910:48;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15996:28:0;;;;;:20;:28;;;;;;;15910:48;;;-1:-1:-1;15996:35:0;;15910:48;15996:35;:32;:35;:::i;:::-;15968:63;;16153:9;16115:16;16132:17;16115:35;;;;;;;;;;;;;;;;;;;;:47;;-1:-1:-1;;;;;;16115:47:0;-1:-1:-1;;;;;16115:47:0;;;;;;16206:28;;;;;:20;:28;;;;;;;16172:31;;;;;;;:62;16395:16;:23;:30;;-1:-1:-1;16395:27:0;:30::i;:::-;16369:56;:16;:56;;:::i;:::-;-1:-1:-1;;;;;;16435:28:0;;16466:1;16435:28;;;:20;:28;;;;;;;;:32;;;;16483:28;;;;;;;;;;;;;;;;;15830:688;;;:::o;1274:179:29:-;1332:7;1364:1;1359;:6;;1351:49;;;;;-1:-1:-1;;;;;1351:49:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:29;;;1274:179::o;2093:225:30:-;-1:-1:-1;;;;;2166:22:30;;2158:73;;;;-1:-1:-1;;;;;2158:73:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2267:6;;;2246:38;;-1:-1:-1;;;;;2246:38:30;;;;2267:6;;;2246:38;;;2294:6;:17;;-1:-1:-1;;;;;;2294:17:30;-1:-1:-1;;;;;2294:17:30;;;;;;;;;;2093:225::o;3398:930:12:-;3941:27;3949:5;-1:-1:-1;;;;;3941:25:12;;:27::i;:::-;3933:55;;;;;-1:-1:-1;;;;;3933:55:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;4059:12;4073:23;4108:5;-1:-1:-1;;;;;4100:19:12;4120:4;4100:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;4100:25:12;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;4058:67:12;;;;4143:7;4135:37;;;;;-1:-1:-1;;;;;4135:37:12;;;;;;;;;;;;-1:-1:-1;;;;;4135:37:12;;;;;;;;;;;;;;;4187:17;;:21;4183:139;;4270:10;4259:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4259:30:12;4251:60;;;;;-1:-1:-1;;;;;4251:60:12;;;;;;;;;;;;-1:-1:-1;;;;;4251:60:12;;;;;;;;;;;;;;4505:810;4558:4;;4770:14;4855:54;;;;4979:2;4974:220;;;;4763:503;;4855:54;4894:1;4880:15;;4855:54;;4974:220;5080:2;5077:1;5074;5059:24;5178:1;5172:8;5158:22;;4763:503;-1:-1:-1;5293:15:12;;;-1:-1:-1;4505:810:12;:::o;358:104:28:-;416:7;446:1;442;:5;:13;;454:1;442:13;;;-1:-1:-1;450:1:28;;435:20;-1:-1:-1;358:104:28:o;2606:326:29:-;2664:7;2761:1;2757;:5;2749:44;;;;;-1:-1:-1;;;;;2749:44:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;2803:9;2819:1;2815;:5;;;;;;;2606:326;-1:-1:-1;;;;2606:326:29:o;542:413:36:-;902:20;940:8;;;542:413::o;458:16663:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "source": "pragma solidity ^0.5.8;\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\n\nimport \"../libraries/CompatibleERC20Functions.sol\";\nimport \"../DarknodeRegistry/DarknodeRegistry.sol\";\nimport \"./DarknodePaymentStore.sol\";\n\n/// @notice DarknodePayment is responsible for paying off darknodes for their\n/// computation.\ncontract DarknodePayment is Ownable {\n using SafeMath for uint256;\n using CompatibleERC20Functions for ERC20;\n\n string public VERSION; // Passed in as a constructor parameter.\n\n /// @notice The special address for Ether.\n address constant public ETHEREUM = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n DarknodeRegistry public darknodeRegistry; // Passed in as a constructor parameter.\n\n /// @notice DarknodePaymentStore is the storage contract for darknode\n /// payments.\n DarknodePaymentStore public store; // Passed in as a constructor parameter.\n\n /// @notice The address that can call blacklist()\n address public blacklister;\n\n uint256 public currentCycle;\n uint256 public previousCycle;\n\n /// @notice The number of whitelisted darknodes this cycle\n uint256 public shareCount;\n\n /// @notice The list of tokens that will be registered next cycle.\n /// We only update the shareCount at the change of cycle to\n /// prevent the number of shares from changing.\n address[] public pendingTokens;\n\n /// @notice The list of tokens which are already registered and rewards can\n /// be claimed for.\n address[] public registeredTokens;\n\n /// @notice Mapping from token -> index. Index starts from 1. 0 means not in\n /// list.\n mapping(address => uint256) public registeredTokenIndex;\n\n /// @notice Mapping from token -> amount.\n /// The amount of rewards allocated for all darknodes to claim into\n /// their account.\n mapping(address => uint256) public unclaimedRewards;\n\n /// @notice Mapping from token -> amount.\n /// The amount of rewards allocated for each darknode.\n mapping(address => uint256) public previousCycleRewardShare;\n\n /// @notice The time that the current cycle started.\n uint256 public cycleStartTime;\n\n /// @notice The minimum duration that the current cycle must go for.\n uint256 public cycleDuration;\n\n /// @notice The earliest timestamp that changeCycle() can be called.\n uint256 public cycleTimeout;\n\n /// @notice Mapping of darknode -> cycle -> already_claimed\n /// Used to keep track of which darknodes have already claimed their\n /// rewards.\n mapping(address => mapping(uint256 => bool)) public rewardClaimed;\n\n /// @notice Emitted when a darknode is blacklisted from receiving rewards\n /// @param _darknode The address of the darknode which was blacklisted\n /// @param _time The time at which the darknode was blacklisted\n event LogDarknodeBlacklisted(address indexed _darknode, uint256 _time);\n\n /// @notice Emitted when a darknode is whitelisted to receive rewards\n /// @param _darknode The address of the darknode which was whitelisted\n /// @param _time The time at which the darknode was whitelisted\n event LogDarknodeWhitelisted(address indexed _darknode, uint256 _time);\n\n /// @notice Emitted when a darknode claims their share of reward\n /// @param _darknode The darknode which claimed\n /// @param _cycle The cycle that the darknode claimed for\n event LogDarknodeClaim(address indexed _darknode, uint256 _cycle);\n\n /// @notice Emitted when someone pays the DarknodePayment contract\n /// @param _payer The darknode which claimed\n /// @param _amount The cycle that the darknode claimed for\n /// @param _token The address of the token that was transferred\n event LogPaymentReceived(address indexed _payer, uint256 _amount, address _token);\n\n /// @notice Emitted when a darknode calls withdraw\n /// @param _payee The address of the darknode which withdrew\n /// @param _value The amount of DAI withdrawn\n /// @param _token The address of the token that was withdrawn\n event LogDarknodeWithdrew(address indexed _payee, uint256 _value, address _token);\n\n /// @notice Emitted when a new cycle happens\n /// @param _newCycle The new, current cycle\n /// @param _lastCycle The previous cycle\n /// @param _cycleTimeout The earliest a new cycle can be called\n event LogNewCycle(uint256 _newCycle, uint256 _lastCycle, uint256 _cycleTimeout);\n\n /// @notice Emitted when the cycle duration changes\n /// @param _newDuration The new duration\n /// @param _oldDuration The old duration\n event LogCycleDurationChanged(uint256 _newDuration, uint256 _oldDuration);\n\n /// @notice Emitted when the Blacklister contract changes\n /// @param _newBlacklister The new Blacklister\n /// @param _oldBlacklister The old Blacklister\n event LogBlacklisterChanged(address _newBlacklister, address _oldBlacklister);\n\n /// @notice Emitted when a new token is registered\n /// @param _token The token that was registered\n event LogTokenRegistered(address _token);\n\n /// @notice Emitted when a token is deregistered\n /// @param _token The token that was deregistered\n event LogTokenDeregistered(address _token);\n\n /// @notice Only allow registered dark nodes.\n modifier onlyDarknode(address _darknode) {\n require(darknodeRegistry.isRegistered(_darknode), \"darknode is not registered\");\n _;\n }\n\n /// @notice Only allow the Darknode Payment contract.\n modifier onlyBlacklister() {\n require(blacklister == msg.sender, \"not Blacklister\");\n _;\n }\n\n /// @notice Only allow darknodes which haven't been blacklisted\n modifier notBlacklisted(address _darknode) {\n require(!store.isBlacklisted(_darknode), \"darknode is blacklisted\");\n _;\n }\n\n /// @notice The contract constructor. Starts the current cycle using the\n /// time of deploy.\n ///\n /// @param _VERSION A string defining the contract version.\n /// @param _darknodeRegistry The address of the DarknodeRegistry contract\n /// @param _darknodePaymentStore The address of the DarknodePaymentStore\n /// contract\n /// @param _cycleDurationSeconds The minimum time before a new cycle can occur in seconds\n constructor(\n string memory _VERSION,\n DarknodeRegistry _darknodeRegistry,\n DarknodePaymentStore _darknodePaymentStore,\n uint256 _cycleDurationSeconds\n ) public {\n VERSION = _VERSION;\n darknodeRegistry = _darknodeRegistry;\n store = _darknodePaymentStore;\n cycleDuration = _cycleDurationSeconds;\n // Default the blacklister to owner\n blacklister = msg.sender;\n\n // Start the current cycle\n currentCycle = block.number;\n cycleStartTime = block.timestamp;\n cycleTimeout = cycleStartTime.add(cycleDuration);\n }\n\n /// @notice Transfers the funds allocated to the darknode to the darknode\n /// owner.\n ///\n /// @param _darknode The address of the darknode\n /// @param _token Which token to transfer\n function withdraw(address _darknode, address _token) public {\n address payable darknodeOwner = darknodeRegistry.getDarknodeOwner(_darknode);\n require(darknodeOwner != address(0x0), \"invalid darknode owner\");\n\n uint256 amount = store.darknodeBalances(_darknode, _token);\n require(amount > 0, \"nothing to withdraw\");\n\n store.transfer(_darknode, _token, amount, darknodeOwner);\n emit LogDarknodeWithdrew(_darknode, amount, _token);\n }\n\n function withdrawMultiple(address _darknode, address[] calldata _tokens) external {\n for (uint i = 0; i < _tokens.length; i++) {\n withdraw(_darknode, _tokens[i]);\n }\n }\n\n /// @notice Forward all payments to the DarknodePaymentStore.\n function () external payable {\n address(store).transfer(msg.value);\n emit LogPaymentReceived(msg.sender, msg.value, ETHEREUM);\n }\n\n /// @notice The current balance of the contract available as reward for the\n /// current cycle\n function currentCycleRewardPool(address _token) external view returns (uint256) {\n return store.availableBalance(_token).sub(unclaimedRewards[_token]);\n }\n\n function darknodeBalances(address _darknodeID, address _token) external view returns (uint256) {\n return store.darknodeBalances(_darknodeID, _token);\n }\n\n /// @notice Changes the current cycle.\n function changeCycle() external returns (uint256) {\n require(now >= cycleTimeout, \"cannot cycle yet: too early\");\n require(block.number != currentCycle, \"no new block\");\n\n // Snapshot balances for the past cycle\n uint arrayLength = registeredTokens.length;\n for (uint i = 0; i < arrayLength; i++) {\n _snapshotBalance(registeredTokens[i]);\n }\n\n // Start a new cycle\n previousCycle = currentCycle;\n currentCycle = block.number;\n cycleStartTime = block.timestamp;\n cycleTimeout = cycleStartTime.add(cycleDuration);\n\n // Update the share size for next cycle\n shareCount = store.darknodeWhitelistLength();\n // Update the list of registeredTokens\n _updateTokenList();\n\n emit LogNewCycle(currentCycle, previousCycle, cycleTimeout);\n return currentCycle;\n }\n\n /// @notice Deposits token into the contract to be paid to the Darknodes\n ///\n /// @param _value The amount of token deposit in the token's smallest unit.\n /// @param _token The token address\n function deposit(uint256 _value, address _token) external payable {\n uint256 receivedValue;\n if (_token == ETHEREUM) {\n require(_value == msg.value, \"mismatched deposit value\");\n receivedValue = msg.value;\n address(store).transfer(msg.value);\n } else {\n require(msg.value == 0, \"unexpected ether transfer\");\n // Forward the funds to the store\n receivedValue = ERC20(_token).safeTransferFromWithFees(msg.sender, address(store), _value);\n }\n emit LogPaymentReceived(msg.sender, receivedValue, _token);\n }\n\n /// @notice Claims the rewards allocated to the darknode last cycle and\n /// increments the darknode balances. Whitelists the darknode if it\n /// hasn't already been whitelisted. If a darknode does not call\n /// claim() then the rewards for the previous cycle is lost.\n ///\n /// @param _darknode The address of the darknode to claim\n function claim(address _darknode) external onlyDarknode(_darknode) notBlacklisted(_darknode) {\n uint256 whitelistedTime = store.darknodeWhitelist(_darknode);\n\n // The darknode hasn't been whitelisted before\n if (whitelistedTime == 0) {\n store.whitelist(_darknode);\n emit LogDarknodeWhitelisted(_darknode, now);\n return;\n }\n\n require(whitelistedTime < cycleStartTime, \"cannot claim for this cycle\");\n\n // Claim share of rewards allocated for last cycle\n _claimDarknodeReward(_darknode);\n emit LogDarknodeClaim(_darknode, previousCycle);\n }\n\n /// @notice Blacklists a darknode from participating in rewards.\n ///\n /// @param _darknode The address of the darknode to blacklist\n function blacklist(address _darknode) external onlyBlacklister onlyDarknode(_darknode) {\n store.blacklist(_darknode);\n emit LogDarknodeBlacklisted(_darknode, now);\n }\n\n /// @notice Adds tokens to be payable. Registration is pending until next\n /// cycle.\n ///\n /// @param _token The address of the token to be registered.\n function registerToken(address _token) external onlyOwner {\n require(registeredTokenIndex[_token] == 0, \"token already registered\");\n uint arrayLength = pendingTokens.length;\n for (uint i = 0; i < arrayLength; i++) {\n require(pendingTokens[i] != _token, \"token already pending registration\");\n }\n pendingTokens.push(_token);\n }\n\n /// @notice Removes a token from the list of supported tokens.\n /// Deregistration is pending until next cycle.\n ///\n /// @param _token The address of the token to be deregistered.\n function deregisterToken(address _token) external onlyOwner {\n require(registeredTokenIndex[_token] > 0, \"token not registered\");\n _deregisterToken(_token);\n }\n\n /// @notice Updates the Blacklister contract address.\n ///\n /// @param _addr The new Blacklister contract address.\n function updateBlacklister(address _addr) external onlyOwner {\n require(_addr != address(0), \"invalid contract address\");\n emit LogBlacklisterChanged(_addr, blacklister);\n blacklister = _addr;\n }\n\n /// @notice Updates cycle duration\n ///\n /// @param _durationSeconds The amount of time (in seconds) that should have\n /// passed before a new cycle can be called.\n function updateCycleDuration(uint256 _durationSeconds) external onlyOwner {\n uint256 oldDuration = cycleDuration;\n cycleDuration = _durationSeconds;\n emit LogCycleDurationChanged(cycleDuration, oldDuration);\n }\n\n /// @notice Allows the contract owner to initiate an ownership transfer of\n /// the DarknodePaymentStore.\n ///\n /// @param _newOwner The address to transfer the ownership to.\n function transferStoreOwnership(address _newOwner) external onlyOwner {\n store.transferOwnership(_newOwner);\n }\n\n /// @notice Claims ownership of the store passed in to the constructor.\n /// `transferStoreOwnership` must have previously been called when\n /// transferring from another DarknodePaymentStore.\n function claimStoreOwnership() external onlyOwner {\n store.claimOwnership();\n }\n\n /// @notice Claims the darknode reward for all registered tokens into\n /// darknodeBalances in the DarknodePaymentStore.\n /// Rewards can only be claimed once per cycle.\n ///\n /// @param _darknode The address to the darknode to claim rewards for\n function _claimDarknodeReward(address _darknode) private {\n require(!rewardClaimed[_darknode][previousCycle], \"reward already claimed\");\n rewardClaimed[_darknode][previousCycle] = true;\n uint arrayLength = registeredTokens.length;\n for (uint i = 0; i < arrayLength; i++) {\n address token = registeredTokens[i];\n\n // Only increment balance if shares were allocated last cycle\n if (previousCycleRewardShare[token] > 0) {\n unclaimedRewards[token] = unclaimedRewards[token].sub(previousCycleRewardShare[token]);\n store.incrementDarknodeBalance(_darknode, token, previousCycleRewardShare[token]);\n }\n }\n }\n\n /// @notice Snapshots the current balance of the tokens, for all registered\n /// tokens.\n ///\n /// @param _token The address the token to snapshot.\n function _snapshotBalance(address _token) private {\n if (shareCount == 0) {\n unclaimedRewards[_token] = 0;\n previousCycleRewardShare[_token] = 0;\n } else {\n // Lock up the current balance for darknode reward allocation\n unclaimedRewards[_token] = store.availableBalance(_token);\n previousCycleRewardShare[_token] = unclaimedRewards[_token].div(shareCount);\n }\n }\n\n /// @notice Deregisters a token, removing it from the list of\n /// registeredTokens.\n ///\n /// @param _token The address of the token to deregister.\n function _deregisterToken(address _token) private {\n address lastToken = registeredTokens[registeredTokens.length.sub(1)];\n uint256 deletedTokenIndex = registeredTokenIndex[_token].sub(1);\n // Move the last token to _token's position and update it's index\n registeredTokens[deletedTokenIndex] = lastToken;\n registeredTokenIndex[lastToken] = registeredTokenIndex[_token];\n // Decreasing the length will clean up the storage for us\n // So we don't need to manually delete the element\n registeredTokens.length = registeredTokens.length.sub(1);\n registeredTokenIndex[_token] = 0;\n\n emit LogTokenDeregistered(_token);\n }\n\n /// @notice Updates the list of registeredTokens adding tokens that are to be registered.\n /// The list of tokens that are pending registration are emptied afterwards.\n function _updateTokenList() private {\n // Register tokens\n uint arrayLength = pendingTokens.length;\n for (uint i = 0; i < arrayLength; i++) {\n address token = pendingTokens[i];\n registeredTokens.push(token);\n registeredTokenIndex[token] = registeredTokens.length;\n emit LogTokenRegistered(token);\n }\n pendingTokens.length = 0;\n }\n\n}\n", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePayment.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePayment.sol", + "exportedSymbols": { + "DarknodePayment": [ + 948 + ] + }, + "id": 949, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:0" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 6512, + "src": "25:63:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 6401, + "src": "89:59:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 6909, + "src": "149:63:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/CompatibleERC20Functions.sol", + "file": "../libraries/CompatibleERC20Functions.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 4038, + "src": "214:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol", + "file": "../DarknodeRegistry/DarknodeRegistry.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 2380, + "src": "266:50:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePaymentStore.sol", + "file": "./DarknodePaymentStore.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 1277, + "src": "317:36:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6511, + "src": "486:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$6511", + "typeString": "contract Ownable" + } + }, + "id": 9, + "nodeType": "InheritanceSpecifier", + "src": "486:7:0" + } + ], + "contractDependencies": [ + 6511 + ], + "contractKind": "contract", + "documentation": "@notice DarknodePayment is responsible for paying off darknodes for their\n computation.", + "fullyImplemented": true, + "id": 948, + "linearizedBaseContracts": [ + 948, + 6511 + ], + "name": "DarknodePayment", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 12, + "libraryName": { + "contractScope": null, + "id": 10, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6400, + "src": "506:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6400", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "500:27:0", + "typeName": { + "id": 11, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "519:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 15, + "libraryName": { + "contractScope": null, + "id": 13, + "name": "CompatibleERC20Functions", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4037, + "src": "538:24:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CompatibleERC20Functions_$4037", + "typeString": "library CompatibleERC20Functions" + } + }, + "nodeType": "UsingForDirective", + "src": "532:41:0", + "typeName": { + "contractScope": null, + "id": 14, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6908, + "src": "567:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + } + }, + { + "constant": false, + "id": 17, + "name": "VERSION", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "579:21:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 16, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "579:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 20, + "name": "ETHEREUM", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "695:77:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "695:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 19, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "730:42:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 22, + "name": "darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "779:40:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21, + "name": "DarknodeRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2379, + "src": "779:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 24, + "name": "store", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "967:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + }, + "typeName": { + "contractScope": null, + "id": 23, + "name": "DarknodePaymentStore", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1276, + "src": "967:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 26, + "name": "blacklister", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1102:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 25, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1102:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 28, + "name": "currentCycle", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1135:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1135:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 30, + "name": "previousCycle", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1168:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 29, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1168:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 32, + "name": "shareCount", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1266:25:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 31, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1266:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 35, + "name": "pendingTokens", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1501:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 33, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1501:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 34, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1501:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 38, + "name": "registeredTokens", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1650:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1650:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 37, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1650:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 42, + "name": "registeredTokenIndex", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1793:55:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 41, + "keyType": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1801:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1793:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 40, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 46, + "name": "unclaimedRewards", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2012:51:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 45, + "keyType": { + "id": 43, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2020:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2012:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 44, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2031:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 50, + "name": "previousCycleRewardShare", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2183:59:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 49, + "keyType": { + "id": 47, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2191:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2183:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 48, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 52, + "name": "cycleStartTime", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2306:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2306:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 54, + "name": "cycleDuration", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2415:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 53, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2415:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 56, + "name": "cycleTimeout", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2523:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 55, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2523:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 62, + "name": "rewardClaimed", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2727:65:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + }, + "typeName": { + "id": 61, + "keyType": { + "id": 57, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2735:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2727:44:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + }, + "valueType": { + "id": 60, + "keyType": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2754:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2746:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + }, + "valueType": { + "id": 59, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode is blacklisted from receiving rewards\n @param _darknode The address of the darknode which was blacklisted\n @param _time The time at which the darknode was blacklisted", + "id": 68, + "name": "LogDarknodeBlacklisted", + "nodeType": "EventDefinition", + "parameters": { + "id": 67, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64, + "indexed": true, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "3049:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 63, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3049:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "indexed": false, + "name": "_time", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "3076:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3076:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3048:42:0" + }, + "src": "3020:71:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode is whitelisted to receive rewards\n @param _darknode The address of the darknode which was whitelisted\n @param _time The time at which the darknode was whitelisted", + "id": 74, + "name": "LogDarknodeWhitelisted", + "nodeType": "EventDefinition", + "parameters": { + "id": 73, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 70, + "indexed": true, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 74, + "src": "3343:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 69, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3343:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 72, + "indexed": false, + "name": "_time", + "nodeType": "VariableDeclaration", + "scope": 74, + "src": "3370:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 71, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3342:42:0" + }, + "src": "3314:71:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode claims their share of reward\n @param _darknode The darknode which claimed\n @param _cycle The cycle that the darknode claimed for", + "id": 80, + "name": "LogDarknodeClaim", + "nodeType": "EventDefinition", + "parameters": { + "id": 79, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 76, + "indexed": true, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 80, + "src": "3597:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3597:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 78, + "indexed": false, + "name": "_cycle", + "nodeType": "VariableDeclaration", + "scope": 80, + "src": "3624:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 77, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3624:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3596:43:0" + }, + "src": "3574:66:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when someone pays the DarknodePayment contract\n @param _payer The darknode which claimed\n @param _amount The cycle that the darknode claimed for\n @param _token The address of the token that was transferred", + "id": 88, + "name": "LogPaymentReceived", + "nodeType": "EventDefinition", + "parameters": { + "id": 87, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 82, + "indexed": true, + "name": "_payer", + "nodeType": "VariableDeclaration", + "scope": 88, + "src": "3922:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 81, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3922:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 84, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 88, + "src": "3946:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 83, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3946:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 86, + "indexed": false, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 88, + "src": "3963:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 85, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3963:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3921:57:0" + }, + "src": "3897:82:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode calls withdraw\n @param _payee The address of the darknode which withdrew\n @param _value The amount of DAI withdrawn\n @param _token The address of the token that was withdrawn", + "id": 96, + "name": "LogDarknodeWithdrew", + "nodeType": "EventDefinition", + "parameters": { + "id": 95, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 90, + "indexed": true, + "name": "_payee", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "4247:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 89, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4247:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 92, + "indexed": false, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "4271:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 91, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4271:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 94, + "indexed": false, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "4287:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4287:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4246:56:0" + }, + "src": "4221:82:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a new cycle happens\n @param _newCycle The new, current cycle\n @param _lastCycle The previous cycle\n @param _cycleTimeout The earliest a new cycle can be called", + "id": 104, + "name": "LogNewCycle", + "nodeType": "EventDefinition", + "parameters": { + "id": 103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 98, + "indexed": false, + "name": "_newCycle", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "4537:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 97, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4537:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 100, + "indexed": false, + "name": "_lastCycle", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "4556:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 99, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4556:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 102, + "indexed": false, + "name": "_cycleTimeout", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "4576:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4576:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4536:62:0" + }, + "src": "4519:80:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when the cycle duration changes\n @param _newDuration The new duration\n @param _oldDuration The old duration", + "id": 110, + "name": "LogCycleDurationChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "indexed": false, + "name": "_newDuration", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "4781:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4781:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "indexed": false, + "name": "_oldDuration", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "4803:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 107, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4803:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4780:44:0" + }, + "src": "4751:74:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when the Blacklister contract changes\n @param _newBlacklister The new Blacklister\n @param _oldBlacklister The old Blacklister", + "id": 116, + "name": "LogBlacklisterChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 112, + "indexed": false, + "name": "_newBlacklister", + "nodeType": "VariableDeclaration", + "scope": 116, + "src": "5023:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 111, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5023:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 114, + "indexed": false, + "name": "_oldBlacklister", + "nodeType": "VariableDeclaration", + "scope": 116, + "src": "5048:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 113, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5048:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5022:50:0" + }, + "src": "4995:78:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a new token is registered\n @param _token The token that was registered", + "id": 120, + "name": "LogTokenRegistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 118, + "indexed": false, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 120, + "src": "5211:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 117, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5211:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5210:16:0" + }, + "src": "5186:41:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a token is deregistered\n @param _token The token that was deregistered", + "id": 124, + "name": "LogTokenDeregistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 122, + "indexed": false, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 124, + "src": "5367:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 121, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5367:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5366:16:0" + }, + "src": "5340:43:0" + }, + { + "body": { + "id": 137, + "nodeType": "Block", + "src": "5480:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 131, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "5528:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 129, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "5498:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegistered", + "nodeType": "MemberAccess", + "referencedDeclaration": 2167, + "src": "5498:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5498:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f6465206973206e6f742072656769737465726564", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5540:28:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c0f050aeb8de9b1f22ac151ce61ab97f0e469f4b821d98865a331c02d75a5fcd", + "typeString": "literal_string \"darknode is not registered\"" + }, + "value": "darknode is not registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c0f050aeb8de9b1f22ac151ce61ab97f0e469f4b821d98865a331c02d75a5fcd", + "typeString": "literal_string \"darknode is not registered\"" + } + ], + "id": 128, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5490:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5490:79:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 135, + "nodeType": "ExpressionStatement", + "src": "5490:79:0" + }, + { + "id": 136, + "nodeType": "PlaceholderStatement", + "src": "5579:1:0" + } + ] + }, + "documentation": "@notice Only allow registered dark nodes.", + "id": 138, + "name": "onlyDarknode", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 127, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 126, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 138, + "src": "5461:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5461:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5460:19:0" + }, + "src": "5439:148:0", + "visibility": "internal" + }, + { + "body": { + "id": 149, + "nodeType": "Block", + "src": "5678:81:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 141, + "name": "blacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "5696:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 142, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5711:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5711:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5696:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420426c61636b6c6973746572", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5723:17:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42a83d196c4be03f7ac5843bd0fd11960453ebb76ebc0b5dc29ceef0a96b197c", + "typeString": "literal_string \"not Blacklister\"" + }, + "value": "not Blacklister" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_42a83d196c4be03f7ac5843bd0fd11960453ebb76ebc0b5dc29ceef0a96b197c", + "typeString": "literal_string \"not Blacklister\"" + } + ], + "id": 140, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5688:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5688:53:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 147, + "nodeType": "ExpressionStatement", + "src": "5688:53:0" + }, + { + "id": 148, + "nodeType": "PlaceholderStatement", + "src": "5751:1:0" + } + ] + }, + "documentation": "@notice Only allow the Darknode Payment contract.", + "id": 150, + "name": "onlyBlacklister", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [], + "src": "5675:2:0" + }, + "src": "5651:108:0", + "visibility": "internal" + }, + { + "body": { + "id": 164, + "nodeType": "Block", + "src": "5876:95:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5894:31:0", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 152, + "src": "5915:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 155, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "5895:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isBlacklisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 1016, + "src": "5895:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5895:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f646520697320626c61636b6c6973746564", + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5927:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b2595c93a5cd4ee60a0fc73f74d889182038841a2c576dfb52bdc225242aef77", + "typeString": "literal_string \"darknode is blacklisted\"" + }, + "value": "darknode is blacklisted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b2595c93a5cd4ee60a0fc73f74d889182038841a2c576dfb52bdc225242aef77", + "typeString": "literal_string \"darknode is blacklisted\"" + } + ], + "id": 154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5886:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5886:67:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "5886:67:0" + }, + { + "id": 163, + "nodeType": "PlaceholderStatement", + "src": "5963:1:0" + } + ] + }, + "documentation": "@notice Only allow darknodes which haven't been blacklisted", + "id": 165, + "name": "notBlacklisted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 152, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 165, + "src": "5857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5857:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5856:19:0" + }, + "src": "5833:138:0", + "visibility": "internal" + }, + { + "body": { + "id": 214, + "nodeType": "Block", + "src": "6623:418:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 176, + "name": "VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "6633:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 177, + "name": "_VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "6643:8:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6633:18:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 179, + "nodeType": "ExpressionStatement", + "src": "6633:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 180, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "6661:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 181, + "name": "_darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 169, + "src": "6680:17:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "src": "6661:36:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 183, + "nodeType": "ExpressionStatement", + "src": "6661:36:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 184, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "6707:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 185, + "name": "_darknodePaymentStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "6715:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "src": "6707:29:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 187, + "nodeType": "ExpressionStatement", + "src": "6707:29:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 188, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "6746:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 189, + "name": "_cycleDurationSeconds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "6762:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6746:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 191, + "nodeType": "ExpressionStatement", + "src": "6746:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 192, + "name": "blacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "6837:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 193, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "6851:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6851:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6837:24:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "6837:24:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 197, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "6907:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "6922:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6922:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6907:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 201, + "nodeType": "ExpressionStatement", + "src": "6907:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 202, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "6944:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "6961:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6961:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6944:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 206, + "nodeType": "ExpressionStatement", + "src": "6944:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 207, + "name": "cycleTimeout", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "6986:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 210, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "7020:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 208, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "7001:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "7001:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7001:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6986:48:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 213, + "nodeType": "ExpressionStatement", + "src": "6986:48:0" + } + ] + }, + "documentation": "@notice The contract constructor. Starts the current cycle using the\n time of deploy.\n\n /// @param _VERSION A string defining the contract version.\n @param _darknodeRegistry The address of the DarknodeRegistry contract\n @param _darknodePaymentStore The address of the DarknodePaymentStore\n contract\n @param _cycleDurationSeconds The minimum time before a new cycle can occur in seconds", + "id": 215, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 167, + "name": "_VERSION", + "nodeType": "VariableDeclaration", + "scope": 215, + "src": "6452:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 166, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6452:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 169, + "name": "_darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 215, + "src": "6484:34:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + }, + "typeName": { + "contractScope": null, + "id": 168, + "name": "DarknodeRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2379, + "src": "6484:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 171, + "name": "_darknodePaymentStore", + "nodeType": "VariableDeclaration", + "scope": 215, + "src": "6528:42:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + }, + "typeName": { + "contractScope": null, + "id": 170, + "name": "DarknodePaymentStore", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1276, + "src": "6528:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 173, + "name": "_cycleDurationSeconds", + "nodeType": "VariableDeclaration", + "scope": 215, + "src": "6580:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6442:173:0" + }, + "returnParameters": { + "id": 175, + "nodeType": "ParameterList", + "parameters": [], + "src": "6623:0:0" + }, + "scope": 948, + "src": "6431:610:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 268, + "nodeType": "Block", + "src": "7315:416:0", + "statements": [ + { + "assignments": [ + 223 + ], + "declarations": [ + { + "constant": false, + "id": 223, + "name": "darknodeOwner", + "nodeType": "VariableDeclaration", + "scope": 268, + "src": "7325:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 222, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7325:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 228, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 226, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "7391:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 224, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "7357:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getDarknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 1923, + "src": "7357:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7357:44:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7325:76:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 230, + "name": "darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "7419:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7444:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7436:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7419:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c6964206461726b6e6f6465206f776e6572", + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7450:24:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9c790fcc7516cfa146c3c07a005d290d38dc63b9712b8a88294a34c3910a723b", + "typeString": "literal_string \"invalid darknode owner\"" + }, + "value": "invalid darknode owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9c790fcc7516cfa146c3c07a005d290d38dc63b9712b8a88294a34c3910a723b", + "typeString": "literal_string \"invalid darknode owner\"" + } + ], + "id": 229, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "7411:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7411:64:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 237, + "nodeType": "ExpressionStatement", + "src": "7411:64:0" + }, + { + "assignments": [ + 239 + ], + "declarations": [ + { + "constant": false, + "id": 239, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 268, + "src": "7486:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 238, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7486:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 245, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 242, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "7526:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 243, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "7537:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 240, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "7503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBalances", + "nodeType": "MemberAccess", + "referencedDeclaration": 976, + "src": "7503:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7503:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7486:58:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 247, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "7562:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7571:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7562:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7468696e6720746f207769746864726177", + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7574:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d015b7d7782ab5f33f0b2a3f3ec5207107594fb24ec0023388f87a16a3862dc0", + "typeString": "literal_string \"nothing to withdraw\"" + }, + "value": "nothing to withdraw" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d015b7d7782ab5f33f0b2a3f3ec5207107594fb24ec0023388f87a16a3862dc0", + "typeString": "literal_string \"nothing to withdraw\"" + } + ], + "id": 246, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "7554:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7554:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 252, + "nodeType": "ExpressionStatement", + "src": "7554:42:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 256, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "7622:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 257, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "7633:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 258, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "7641:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 259, + "name": "darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "7649:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 253, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "7607:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1275, + "src": "7607:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_address_payable_$returns$__$", + "typeString": "function (address,address,uint256,address payable) external" + } + }, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7607:56:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 261, + "nodeType": "ExpressionStatement", + "src": "7607:56:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 263, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "7698:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 264, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "7709:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 265, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "7717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 262, + "name": "LogDarknodeWithdrew", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "7678:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (address,uint256,address)" + } + }, + "id": 266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7678:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 267, + "nodeType": "EmitStatement", + "src": "7673:51:0" + } + ] + }, + "documentation": "@notice Transfers the funds allocated to the darknode to the darknode\n owner.\n\n /// @param _darknode The address of the darknode\n @param _token Which token to transfer", + "id": 269, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 217, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 269, + "src": "7273:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 216, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7273:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 219, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 269, + "src": "7292:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 218, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7292:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7272:35:0" + }, + "returnParameters": { + "id": 221, + "nodeType": "ParameterList", + "parameters": [], + "src": "7315:0:0" + }, + "scope": 948, + "src": "7255:476:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 297, + "nodeType": "Block", + "src": "7819:114:0", + "statements": [ + { + "body": { + "id": 295, + "nodeType": "Block", + "src": "7871:56:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 289, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 271, + "src": "7894:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 290, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "7905:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 292, + "indexExpression": { + "argumentTypes": null, + "id": 291, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7913:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 288, + "name": "withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "7885:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7885:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 294, + "nodeType": "ExpressionStatement", + "src": "7885:31:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 281, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7846:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 282, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "7850:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7850:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7846:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 296, + "initializationExpression": { + "assignments": [ + 278 + ], + "declarations": [ + { + "constant": false, + "id": 278, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 296, + "src": "7834:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 277, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7834:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 280, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7843:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7834:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "7866:3:0", + "subExpression": { + "argumentTypes": null, + "id": 285, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7866:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 287, + "nodeType": "ExpressionStatement", + "src": "7866:3:0" + }, + "nodeType": "ForStatement", + "src": "7829:98:0" + } + ] + }, + "documentation": null, + "id": 298, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdrawMultiple", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 275, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 271, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 298, + "src": "7763:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 270, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7763:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 274, + "name": "_tokens", + "nodeType": "VariableDeclaration", + "scope": 298, + "src": "7782:26:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7782:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 273, + "length": null, + "nodeType": "ArrayTypeName", + "src": "7782:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7762:47:0" + }, + "returnParameters": { + "id": 276, + "nodeType": "ParameterList", + "parameters": [], + "src": "7819:0:0" + }, + "scope": 948, + "src": "7737:196:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 317, + "nodeType": "Block", + "src": "8034:117:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 305, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "8068:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 302, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "8052:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8044:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8044:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8044:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8044:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 308, + "nodeType": "ExpressionStatement", + "src": "8044:34:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "8112:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8112:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 312, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "8124:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 314, + "name": "ETHEREUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "8135:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 309, + "name": "LogPaymentReceived", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "8093:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (address,uint256,address)" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8093:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 316, + "nodeType": "EmitStatement", + "src": "8088:56:0" + } + ] + }, + "documentation": "@notice Forward all payments to the DarknodePaymentStore.", + "id": 318, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 299, + "nodeType": "ParameterList", + "parameters": [], + "src": "8014:2:0" + }, + "returnParameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [], + "src": "8034:0:0" + }, + "scope": 948, + "src": "8005:146:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 335, + "nodeType": "Block", + "src": "8347:84:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 330, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "8399:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 332, + "indexExpression": { + "argumentTypes": null, + "id": 331, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "8416:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8399:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 327, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "8387:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 325, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "8364:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "availableBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1075, + "src": "8364:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8364:30:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "8364:34:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8364:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 324, + "id": 334, + "nodeType": "Return", + "src": "8357:67:0" + } + ] + }, + "documentation": "@notice The current balance of the contract available as reward for the\n current cycle", + "id": 336, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "currentCycleRewardPool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 336, + "src": "8299:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 319, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8299:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8298:16:0" + }, + "returnParameters": { + "id": 324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 323, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 336, + "src": "8338:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8338:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8337:9:0" + }, + "scope": 948, + "src": "8267:164:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 351, + "nodeType": "Block", + "src": "8532:67:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 347, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 338, + "src": "8572:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 348, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "8585:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 345, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "8549:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBalances", + "nodeType": "MemberAccess", + "referencedDeclaration": 976, + "src": "8549:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8549:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 344, + "id": 350, + "nodeType": "Return", + "src": "8542:50:0" + } + ] + }, + "documentation": null, + "id": 352, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "darknodeBalances", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 341, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 338, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "8463:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 337, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8463:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 340, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "8484:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 339, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8484:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8462:37:0" + }, + "returnParameters": { + "id": 344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 343, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "8523:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8523:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8522:9:0" + }, + "scope": 948, + "src": "8437:162:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 433, + "nodeType": "Block", + "src": "8698:832:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 358, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7204, + "src": "8716:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 359, + "name": "cycleTimeout", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "8723:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8716:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "63616e6e6f74206379636c65207965743a20746f6f206561726c79", + "id": 361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8737:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cecae2a9522e7de8b5351ed829ea6421f34a49feaff61f26fa8e4e0daafc0c3e", + "typeString": "literal_string \"cannot cycle yet: too early\"" + }, + "value": "cannot cycle yet: too early" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cecae2a9522e7de8b5351ed829ea6421f34a49feaff61f26fa8e4e0daafc0c3e", + "typeString": "literal_string \"cannot cycle yet: too early\"" + } + ], + "id": 357, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "8708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8708:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 363, + "nodeType": "ExpressionStatement", + "src": "8708:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 365, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "8785:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8785:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 367, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "8801:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8785:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f206e657720626c6f636b", + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8815:14:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_295866d09e15f2d7cb6466a82b1128916b3b54ff9b83f600fbbd4e36ec88a9fc", + "typeString": "literal_string \"no new block\"" + }, + "value": "no new block" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_295866d09e15f2d7cb6466a82b1128916b3b54ff9b83f600fbbd4e36ec88a9fc", + "typeString": "literal_string \"no new block\"" + } + ], + "id": 364, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "8777:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8777:53:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 371, + "nodeType": "ExpressionStatement", + "src": "8777:53:0" + }, + { + "assignments": [ + 373 + ], + "declarations": [ + { + "constant": false, + "id": 373, + "name": "arrayLength", + "nodeType": "VariableDeclaration", + "scope": 433, + "src": "8889:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8889:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 376, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 374, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "8908:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 375, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8908:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8889:42:0" + }, + { + "body": { + "id": 393, + "nodeType": "Block", + "src": "8980:62:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 388, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "9011:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 390, + "indexExpression": { + "argumentTypes": null, + "id": 389, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 378, + "src": "9028:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9011:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 387, + "name": "_snapshotBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 838, + "src": "8994:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8994:37:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 392, + "nodeType": "ExpressionStatement", + "src": "8994:37:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 381, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 378, + "src": "8958:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 382, + "name": "arrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "8962:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8958:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 394, + "initializationExpression": { + "assignments": [ + 378 + ], + "declarations": [ + { + "constant": false, + "id": 378, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 394, + "src": "8946:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 377, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 380, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8955:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8946:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "8975:3:0", + "subExpression": { + "argumentTypes": null, + "id": 384, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 378, + "src": "8975:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 386, + "nodeType": "ExpressionStatement", + "src": "8975:3:0" + }, + "nodeType": "ForStatement", + "src": "8941:101:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 395, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "9081:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 396, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "9097:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9081:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 398, + "nodeType": "ExpressionStatement", + "src": "9081:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 399, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "9119:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 400, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "9134:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9134:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9119:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 403, + "nodeType": "ExpressionStatement", + "src": "9119:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 404, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "9156:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 405, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "9173:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9173:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9156:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 408, + "nodeType": "ExpressionStatement", + "src": "9156:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 409, + "name": "cycleTimeout", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "9198:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 412, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "9232:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 410, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "9213:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "9213:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9213:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9198:48:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 415, + "nodeType": "ExpressionStatement", + "src": "9198:48:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 416, + "name": "shareCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "9305:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 417, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "9318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeWhitelistLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 970, + "src": "9318:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9318:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9305:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 421, + "nodeType": "ExpressionStatement", + "src": "9305:44:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 422, + "name": "_updateTokenList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 947, + "src": "9406:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9406:18:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 424, + "nodeType": "ExpressionStatement", + "src": "9406:18:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 426, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "9452:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 427, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "9466:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 428, + "name": "cycleTimeout", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "9481:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 425, + "name": "LogNewCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "9440:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9440:54:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 430, + "nodeType": "EmitStatement", + "src": "9435:59:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 431, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "9511:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 356, + "id": 432, + "nodeType": "Return", + "src": "9504:19:0" + } + ] + }, + "documentation": "@notice Changes the current cycle.", + "id": 434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "changeCycle", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [], + "src": "8668:2:0" + }, + "returnParameters": { + "id": 356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 355, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 434, + "src": "8689:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8689:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8688:9:0" + }, + "scope": 948, + "src": "8648:882:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 500, + "nodeType": "Block", + "src": "9807:540:0", + "statements": [ + { + "assignments": [ + 442 + ], + "declarations": [ + { + "constant": false, + "id": 442, + "name": "receivedValue", + "nodeType": "VariableDeclaration", + "scope": 500, + "src": "9817:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 441, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 443, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "9817:21:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 444, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "9852:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 445, + "name": "ETHEREUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "9862:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9852:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 491, + "nodeType": "Block", + "src": "10046:227:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 470, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "10068:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "10068:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "756e6578706563746564206574686572207472616e73666572", + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10084:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2b773e1733874c38ac552212083a64eadb144022df83a1e216d77353b84e7ecd", + "typeString": "literal_string \"unexpected ether transfer\"" + }, + "value": "unexpected ether transfer" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2b773e1733874c38ac552212083a64eadb144022df83a1e216d77353b84e7ecd", + "typeString": "literal_string \"unexpected ether transfer\"" + } + ], + "id": 469, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "10060:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10060:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 476, + "nodeType": "ExpressionStatement", + "src": "10060:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 477, + "name": "receivedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "10172:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 482, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "10227:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10227:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 485, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "10247:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10239:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 487, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 436, + "src": "10255:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 479, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "10194:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 478, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6908, + "src": "10188:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$6908_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:13:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFromWithFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 3861, + "src": "10188:38:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7168_$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$7168_$", + "typeString": "function (contract IERC20,address,address,uint256) returns (uint256)" + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:74:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10172:90:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 490, + "nodeType": "ExpressionStatement", + "src": "10172:90:0" + } + ] + }, + "id": 492, + "nodeType": "IfStatement", + "src": "9848:425:0", + "trueBody": { + "id": 468, + "nodeType": "Block", + "src": "9872:168:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 448, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 436, + "src": "9894:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 449, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "9904:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9904:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9894:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d69736d617463686564206465706f7369742076616c7565", + "id": 452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9915:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d234018c93f3455a77d39bb3ddfe18573be99173ad47d162fecec56c831dcfa5", + "typeString": "literal_string \"mismatched deposit value\"" + }, + "value": "mismatched deposit value" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d234018c93f3455a77d39bb3ddfe18573be99173ad47d162fecec56c831dcfa5", + "typeString": "literal_string \"mismatched deposit value\"" + } + ], + "id": 447, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "9886:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9886:56:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 454, + "nodeType": "ExpressionStatement", + "src": "9886:56:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 455, + "name": "receivedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "9956:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 456, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "9972:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9972:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9956:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 459, + "nodeType": "ExpressionStatement", + "src": "9956:25:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 464, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "10019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10019:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 461, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "10003:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9995:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9995:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9995:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9995:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 467, + "nodeType": "ExpressionStatement", + "src": "9995:34:0" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 494, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "10306:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10306:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 496, + "name": "receivedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "10318:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 497, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "10333:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 493, + "name": "LogPaymentReceived", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "10287:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (address,uint256,address)" + } + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10287:53:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 499, + "nodeType": "EmitStatement", + "src": "10282:58:0" + } + ] + }, + "documentation": "@notice Deposits token into the contract to be paid to the Darknodes\n\n /// @param _value The amount of token deposit in the token's smallest unit.\n @param _token The token address", + "id": 501, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 436, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "9758:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 435, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9758:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 438, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "9774:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9774:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9757:32:0" + }, + "returnParameters": { + "id": 440, + "nodeType": "ParameterList", + "parameters": [], + "src": "9807:0:0" + }, + "scope": 948, + "src": "9741:606:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 552, + "nodeType": "Block", + "src": "10822:537:0", + "statements": [ + { + "assignments": [ + 513 + ], + "declarations": [ + { + "constant": false, + "id": 513, + "name": "whitelistedTime", + "nodeType": "VariableDeclaration", + "scope": 552, + "src": "10832:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 512, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 518, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 516, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10882:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 514, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "10858:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeWhitelist", + "nodeType": "MemberAccess", + "referencedDeclaration": 988, + "src": "10858:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10858:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10832:60:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 519, + "name": "whitelistedTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "10962:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10981:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "10962:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 535, + "nodeType": "IfStatement", + "src": "10958:154:0", + "trueBody": { + "id": 534, + "nodeType": "Block", + "src": "10984:128:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 525, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "11014:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 522, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "10998:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "whitelist", + "nodeType": "MemberAccess", + "referencedDeclaration": 1150, + "src": "10998:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10998:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 527, + "nodeType": "ExpressionStatement", + "src": "10998:26:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 529, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "11066:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 530, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7204, + "src": "11077:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 528, + "name": "LogDarknodeWhitelisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11043:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11043:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 532, + "nodeType": "EmitStatement", + "src": "11038:43:0" + }, + { + "expression": null, + "functionReturnParameters": 511, + "id": 533, + "nodeType": "Return", + "src": "11095:7:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 537, + "name": "whitelistedTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "11130:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 538, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "11148:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11130:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "63616e6e6f7420636c61696d20666f722074686973206379636c65", + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11164:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3d046fb6ee277dc79428b09c4f711ae205caaf399a387acd7693b7d10df0b096", + "typeString": "literal_string \"cannot claim for this cycle\"" + }, + "value": "cannot claim for this cycle" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3d046fb6ee277dc79428b09c4f711ae205caaf399a387acd7693b7d10df0b096", + "typeString": "literal_string \"cannot claim for this cycle\"" + } + ], + "id": 536, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "11122:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11122:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 542, + "nodeType": "ExpressionStatement", + "src": "11122:72:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 544, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "11285:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 543, + "name": "_claimDarknodeReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 794, + "src": "11264:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11264:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 546, + "nodeType": "ExpressionStatement", + "src": "11264:31:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 548, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "11327:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 549, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "11338:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 547, + "name": "LogDarknodeClaim", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "11310:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11310:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 551, + "nodeType": "EmitStatement", + "src": "11305:47:0" + } + ] + }, + "documentation": "@notice Claims the rewards allocated to the darknode last cycle and\n increments the darknode balances. Whitelists the darknode if it\n hasn't already been whitelisted. If a darknode does not call\n claim() then the rewards for the previous cycle is lost.\n\n /// @param _darknode The address of the darknode to claim", + "id": 553, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 506, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10785:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 507, + "modifierName": { + "argumentTypes": null, + "id": 505, + "name": "onlyDarknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 138, + "src": "10772:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10772:23:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 509, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10811:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 510, + "modifierName": { + "argumentTypes": null, + "id": 508, + "name": "notBlacklisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 165, + "src": "10796:14:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10796:25:0" + } + ], + "name": "claim", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 503, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 553, + "src": "10744:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 502, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10744:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10743:19:0" + }, + "returnParameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [], + "src": "10822:0:0" + }, + "scope": 948, + "src": "10729:630:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 574, + "nodeType": "Block", + "src": "11595:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 566, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 555, + "src": "11621:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 563, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "11605:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "blacklist", + "nodeType": "MemberAccess", + "referencedDeclaration": 1116, + "src": "11605:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11605:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 568, + "nodeType": "ExpressionStatement", + "src": "11605:26:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 555, + "src": "11669:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7204, + "src": "11680:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "LogDarknodeBlacklisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11646:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11646:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "EmitStatement", + "src": "11641:43:0" + } + ] + }, + "documentation": "@notice Blacklists a darknode from participating in rewards.\n\n /// @param _darknode The address of the darknode to blacklist", + "id": 575, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 558, + "modifierName": { + "argumentTypes": null, + "id": 557, + "name": "onlyBlacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "11555:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11555:15:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 560, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 555, + "src": "11584:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 561, + "modifierName": { + "argumentTypes": null, + "id": 559, + "name": "onlyDarknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 138, + "src": "11571:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11571:23:0" + } + ], + "name": "blacklist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 555, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 575, + "src": "11527:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 554, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11527:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11526:19:0" + }, + "returnParameters": { + "id": 562, + "nodeType": "ParameterList", + "parameters": [], + "src": "11595:0:0" + }, + "scope": 948, + "src": "11508:183:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 623, + "nodeType": "Block", + "src": "11929:318:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 583, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "11947:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 585, + "indexExpression": { + "argumentTypes": null, + "id": 584, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 577, + "src": "11968:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11947:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11979:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11947:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f6b656e20616c72656164792072656769737465726564", + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11982:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4798e198fe911d677431c88f83cf3b2c53b61cd78866de466c7e0bb77f9d3ed", + "typeString": "literal_string \"token already registered\"" + }, + "value": "token already registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d4798e198fe911d677431c88f83cf3b2c53b61cd78866de466c7e0bb77f9d3ed", + "typeString": "literal_string \"token already registered\"" + } + ], + "id": 582, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "11939:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11939:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 590, + "nodeType": "ExpressionStatement", + "src": "11939:70:0" + }, + { + "assignments": [ + 592 + ], + "declarations": [ + { + "constant": false, + "id": 592, + "name": "arrayLength", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "12019:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 591, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12019:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 595, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 593, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12038:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 594, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12038:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12019:39:0" + }, + { + "body": { + "id": 615, + "nodeType": "Block", + "src": "12107:98:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 607, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12129:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 609, + "indexExpression": { + "argumentTypes": null, + "id": 608, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 597, + "src": "12143:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12129:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 610, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 577, + "src": "12149:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12129:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f6b656e20616c72656164792070656e64696e6720726567697374726174696f6e", + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12157:36:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_787dd62bc86d4d83726163638c797bb33cf12206a1d6b26822f09d2dfd3c4850", + "typeString": "literal_string \"token already pending registration\"" + }, + "value": "token already pending registration" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_787dd62bc86d4d83726163638c797bb33cf12206a1d6b26822f09d2dfd3c4850", + "typeString": "literal_string \"token already pending registration\"" + } + ], + "id": 606, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12121:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12121:73:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "12121:73:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 600, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 597, + "src": "12085:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 601, + "name": "arrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 592, + "src": "12089:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12085:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 616, + "initializationExpression": { + "assignments": [ + 597 + ], + "declarations": [ + { + "constant": false, + "id": 597, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 616, + "src": "12073:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 596, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12073:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 599, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12082:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "12073:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "12102:3:0", + "subExpression": { + "argumentTypes": null, + "id": 603, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 597, + "src": "12102:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 605, + "nodeType": "ExpressionStatement", + "src": "12102:3:0" + }, + "nodeType": "ForStatement", + "src": "12068:137:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 620, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 577, + "src": "12233:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 617, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12214:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12214:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12214:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 622, + "nodeType": "ExpressionStatement", + "src": "12214:26:0" + } + ] + }, + "documentation": "@notice Adds tokens to be payable. Registration is pending until next\n cycle.\n\n /// @param _token The address of the token to be registered.", + "id": 624, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 580, + "modifierName": { + "argumentTypes": null, + "id": 579, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "11919:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11919:9:0" + } + ], + "name": "registerToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 578, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 577, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 624, + "src": "11894:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 576, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11894:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11893:16:0" + }, + "returnParameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [], + "src": "11929:0:0" + }, + "scope": 948, + "src": "11871:376:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 644, + "nodeType": "Block", + "src": "12515:116:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 632, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "12533:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 634, + "indexExpression": { + "argumentTypes": null, + "id": 633, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "12554:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12533:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12564:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12533:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f6b656e206e6f742072656769737465726564", + "id": 637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12567:22:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_377f1218920eabb8c88590b168b45e371255b51a019d9ffaacd5a49d2bf4672a", + "typeString": "literal_string \"token not registered\"" + }, + "value": "token not registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_377f1218920eabb8c88590b168b45e371255b51a019d9ffaacd5a49d2bf4672a", + "typeString": "literal_string \"token not registered\"" + } + ], + "id": 631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12525:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12525:65:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 639, + "nodeType": "ExpressionStatement", + "src": "12525:65:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 641, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "12617:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 640, + "name": "_deregisterToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "12600:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12600:24:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 643, + "nodeType": "ExpressionStatement", + "src": "12600:24:0" + } + ] + }, + "documentation": "@notice Removes a token from the list of supported tokens.\n Deregistration is pending until next cycle.\n\n /// @param _token The address of the token to be deregistered.", + "id": 645, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 629, + "modifierName": { + "argumentTypes": null, + "id": 628, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "12505:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12505:9:0" + } + ], + "name": "deregisterToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 627, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 626, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 645, + "src": "12480:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 625, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12480:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12479:16:0" + }, + "returnParameters": { + "id": 630, + "nodeType": "ParameterList", + "parameters": [], + "src": "12515:0:0" + }, + "scope": 948, + "src": "12455:176:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 670, + "nodeType": "Block", + "src": "12823:158:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 653, + "name": "_addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 647, + "src": "12841:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12858:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12850:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12850:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "12841:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c696420636f6e74726163742061646472657373", + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12862:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e5d559618de365ea9d9be741e7ee7e42841366bee9c710626ecee327ca18b84b", + "typeString": "literal_string \"invalid contract address\"" + }, + "value": "invalid contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e5d559618de365ea9d9be741e7ee7e42841366bee9c710626ecee327ca18b84b", + "typeString": "literal_string \"invalid contract address\"" + } + ], + "id": 652, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12833:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12833:56:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 660, + "nodeType": "ExpressionStatement", + "src": "12833:56:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 662, + "name": "_addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 647, + "src": "12926:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 663, + "name": "blacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "12933:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 661, + "name": "LogBlacklisterChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "12904:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12904:41:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 665, + "nodeType": "EmitStatement", + "src": "12899:46:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 666, + "name": "blacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "12955:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 667, + "name": "_addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 647, + "src": "12969:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12955:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 669, + "nodeType": "ExpressionStatement", + "src": "12955:19:0" + } + ] + }, + "documentation": "@notice Updates the Blacklister contract address.\n\n /// @param _addr The new Blacklister contract address.", + "id": 671, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 650, + "modifierName": { + "argumentTypes": null, + "id": 649, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "12813:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12813:9:0" + } + ], + "name": "updateBlacklister", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 648, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 647, + "name": "_addr", + "nodeType": "VariableDeclaration", + "scope": 671, + "src": "12789:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 646, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12789:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12788:15:0" + }, + "returnParameters": { + "id": 651, + "nodeType": "ParameterList", + "parameters": [], + "src": "12823:0:0" + }, + "scope": 948, + "src": "12762:219:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 691, + "nodeType": "Block", + "src": "13245:160:0", + "statements": [ + { + "assignments": [ + 679 + ], + "declarations": [ + { + "constant": false, + "id": 679, + "name": "oldDuration", + "nodeType": "VariableDeclaration", + "scope": 691, + "src": "13255:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 678, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13255:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 681, + "initialValue": { + "argumentTypes": null, + "id": 680, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13277:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13255:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 682, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13300:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 683, + "name": "_durationSeconds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 673, + "src": "13316:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13300:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 685, + "nodeType": "ExpressionStatement", + "src": "13300:32:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 687, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13371:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 688, + "name": "oldDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "13386:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 686, + "name": "LogCycleDurationChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "13347:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13347:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 690, + "nodeType": "EmitStatement", + "src": "13342:56:0" + } + ] + }, + "documentation": "@notice Updates cycle duration\n\n /// @param _durationSeconds The amount of time (in seconds) that should have\n passed before a new cycle can be called.", + "id": 692, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 676, + "modifierName": { + "argumentTypes": null, + "id": 675, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "13235:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13235:9:0" + } + ], + "name": "updateCycleDuration", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 674, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 673, + "name": "_durationSeconds", + "nodeType": "VariableDeclaration", + "scope": 692, + "src": "13200:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 672, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13200:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13199:26:0" + }, + "returnParameters": { + "id": 677, + "nodeType": "ParameterList", + "parameters": [], + "src": "13245:0:0" + }, + "scope": 948, + "src": "13171:234:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 705, + "nodeType": "Block", + "src": "13677:51:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "13711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 699, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "13687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3661, + "src": "13687:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13687:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 704, + "nodeType": "ExpressionStatement", + "src": "13687:34:0" + } + ] + }, + "documentation": "@notice Allows the contract owner to initiate an ownership transfer of\n the DarknodePaymentStore.\n\n /// @param _newOwner The address to transfer the ownership to.", + "id": 706, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 697, + "modifierName": { + "argumentTypes": null, + "id": 696, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "13667:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13667:9:0" + } + ], + "name": "transferStoreOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 695, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 694, + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "scope": 706, + "src": "13639:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 693, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13639:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13638:19:0" + }, + "returnParameters": { + "id": 698, + "nodeType": "ParameterList", + "parameters": [], + "src": "13677:0:0" + }, + "scope": 948, + "src": "13607:121:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 716, + "nodeType": "Block", + "src": "14003:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 711, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "14013:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "14013:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14013:22:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 715, + "nodeType": "ExpressionStatement", + "src": "14013:22:0" + } + ] + }, + "documentation": "@notice Claims ownership of the store passed in to the constructor.\n `transferStoreOwnership` must have previously been called when\n transferring from another DarknodePaymentStore.", + "id": 717, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 709, + "modifierName": { + "argumentTypes": null, + "id": 708, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "13993:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13993:9:0" + } + ], + "name": "claimStoreOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 707, + "nodeType": "ParameterList", + "parameters": [], + "src": "13981:2:0" + }, + "returnParameters": { + "id": 710, + "nodeType": "ParameterList", + "parameters": [], + "src": "14003:0:0" + }, + "scope": 948, + "src": "13953:89:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 793, + "nodeType": "Block", + "src": "14383:655:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "14401:40:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 723, + "name": "rewardClaimed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "14402:13:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 725, + "indexExpression": { + "argumentTypes": null, + "id": 724, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 719, + "src": "14416:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14402:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 727, + "indexExpression": { + "argumentTypes": null, + "id": 726, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "14427:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14402:39:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "72657761726420616c726561647920636c61696d6564", + "id": 729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14443:24:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_dd5732e3fabae4380b82b177a141d95d2c717ae2c95a2c5be3b639386aff2f95", + "typeString": "literal_string \"reward already claimed\"" + }, + "value": "reward already claimed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dd5732e3fabae4380b82b177a141d95d2c717ae2c95a2c5be3b639386aff2f95", + "typeString": "literal_string \"reward already claimed\"" + } + ], + "id": 722, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "14393:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14393:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 731, + "nodeType": "ExpressionStatement", + "src": "14393:75:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 732, + "name": "rewardClaimed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "14478:13:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 735, + "indexExpression": { + "argumentTypes": null, + "id": 733, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 719, + "src": "14492:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14478:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 736, + "indexExpression": { + "argumentTypes": null, + "id": 734, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "14503:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14478:39:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14520:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "14478:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "14478:46:0" + }, + { + "assignments": [ + 741 + ], + "declarations": [ + { + "constant": false, + "id": 741, + "name": "arrayLength", + "nodeType": "VariableDeclaration", + "scope": 793, + "src": "14534:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 740, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14534:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 744, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 742, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "14553:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 743, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14553:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14534:42:0" + }, + { + "body": { + "id": 791, + "nodeType": "Block", + "src": "14625:407:0", + "statements": [ + { + "assignments": [ + 756 + ], + "declarations": [ + { + "constant": false, + "id": 756, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 791, + "src": "14639:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 755, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14639:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 760, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 757, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "14655:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 759, + "indexExpression": { + "argumentTypes": null, + "id": 758, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "14672:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14655:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14639:35:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 761, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "14767:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 763, + "indexExpression": { + "argumentTypes": null, + "id": 762, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14792:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14767:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14801:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14767:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 790, + "nodeType": "IfStatement", + "src": "14763:259:0", + "trueBody": { + "id": 789, + "nodeType": "Block", + "src": "14804:218:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 766, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "14822:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 768, + "indexExpression": { + "argumentTypes": null, + "id": 767, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14822:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 773, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "14876:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 775, + "indexExpression": { + "argumentTypes": null, + "id": 774, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14901:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14876:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 769, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "14848:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 771, + "indexExpression": { + "argumentTypes": null, + "id": 770, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14865:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14848:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "14848:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14848:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14822:86:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 778, + "nodeType": "ExpressionStatement", + "src": "14822:86:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 782, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 719, + "src": "14957:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 783, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14968:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 784, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "14975:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 786, + "indexExpression": { + "argumentTypes": null, + "id": 785, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "15000:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14975:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 779, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "14926:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "incrementDarknodeBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1204, + "src": "14926:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14926:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 788, + "nodeType": "ExpressionStatement", + "src": "14926:81:0" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "14603:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "arrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 741, + "src": "14607:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14603:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 792, + "initializationExpression": { + "assignments": [ + 746 + ], + "declarations": [ + { + "constant": false, + "id": 746, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 792, + "src": "14591:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 745, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14591:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 748, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14600:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "14591:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14620:3:0", + "subExpression": { + "argumentTypes": null, + "id": 752, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "14620:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 754, + "nodeType": "ExpressionStatement", + "src": "14620:3:0" + }, + "nodeType": "ForStatement", + "src": "14586:446:0" + } + ] + }, + "documentation": "@notice Claims the darknode reward for all registered tokens into\n darknodeBalances in the DarknodePaymentStore.\n Rewards can only be claimed once per cycle.\n\n /// @param _darknode The address to the darknode to claim rewards for", + "id": 794, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_claimDarknodeReward", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 720, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 719, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 794, + "src": "14356:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 718, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14356:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14355:19:0" + }, + "returnParameters": { + "id": 721, + "nodeType": "ParameterList", + "parameters": [], + "src": "14383:0:0" + }, + "scope": 948, + "src": "14326:712:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 837, + "nodeType": "Block", + "src": "15263:391:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 799, + "name": "shareCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "15277:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15291:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15277:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 835, + "nodeType": "Block", + "src": "15403:245:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 815, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "15491:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 817, + "indexExpression": { + "argumentTypes": null, + "id": 816, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15508:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15491:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 820, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15541:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 818, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "15518:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "availableBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1075, + "src": "15518:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15518:30:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15491:57:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 823, + "nodeType": "ExpressionStatement", + "src": "15491:57:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 824, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "15562:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 826, + "indexExpression": { + "argumentTypes": null, + "id": 825, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15587:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15562:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 831, + "name": "shareCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "15626:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 827, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "15597:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 829, + "indexExpression": { + "argumentTypes": null, + "id": 828, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15614:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15597:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 6378, + "src": "15597:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15597:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15562:75:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 834, + "nodeType": "ExpressionStatement", + "src": "15562:75:0" + } + ] + }, + "id": 836, + "nodeType": "IfStatement", + "src": "15273:375:0", + "trueBody": { + "id": 814, + "nodeType": "Block", + "src": "15294:103:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 802, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "15308:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 804, + "indexExpression": { + "argumentTypes": null, + "id": 803, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15325:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15308:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15335:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15308:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 807, + "nodeType": "ExpressionStatement", + "src": "15308:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 808, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "15350:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 810, + "indexExpression": { + "argumentTypes": null, + "id": 809, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15375:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15350:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15385:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15350:36:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 813, + "nodeType": "ExpressionStatement", + "src": "15350:36:0" + } + ] + } + } + ] + }, + "documentation": "@notice Snapshots the current balance of the tokens, for all registered\n tokens.\n\n /// @param _token The address the token to snapshot.", + "id": 838, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_snapshotBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 797, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 796, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 838, + "src": "15239:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15239:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15238:16:0" + }, + "returnParameters": { + "id": 798, + "nodeType": "ParameterList", + "parameters": [], + "src": "15263:0:0" + }, + "scope": 948, + "src": "15213:441:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 896, + "nodeType": "Block", + "src": "15880:638:0", + "statements": [ + { + "assignments": [ + 844 + ], + "declarations": [ + { + "constant": false, + "id": 844, + "name": "lastToken", + "nodeType": "VariableDeclaration", + "scope": 896, + "src": "15890:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 843, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15890:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 852, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 845, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "15910:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15955:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 846, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "15927:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15927:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "15927:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15927:30:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15910:48:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15890:68:0" + }, + { + "assignments": [ + 854 + ], + "declarations": [ + { + "constant": false, + "id": 854, + "name": "deletedTokenIndex", + "nodeType": "VariableDeclaration", + "scope": 896, + "src": "15968:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 853, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 861, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16029:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 855, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "15996:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 857, + "indexExpression": { + "argumentTypes": null, + "id": 856, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "16017:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15996:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "15996:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15996:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15968:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 862, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "16115:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 864, + "indexExpression": { + "argumentTypes": null, + "id": 863, + "name": "deletedTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "16132:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16115:35:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 865, + "name": "lastToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "16153:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16115:47:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 867, + "nodeType": "ExpressionStatement", + "src": "16115:47:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 868, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "16172:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 870, + "indexExpression": { + "argumentTypes": null, + "id": 869, + "name": "lastToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "16193:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16172:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 871, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "16206:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 873, + "indexExpression": { + "argumentTypes": null, + "id": 872, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "16227:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16206:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16172:62:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 875, + "nodeType": "ExpressionStatement", + "src": "16172:62:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "16369:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 878, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16369:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16423:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 879, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "16395:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 880, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16395:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "16395:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16395:30:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16369:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 885, + "nodeType": "ExpressionStatement", + "src": "16369:56:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "16435:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 888, + "indexExpression": { + "argumentTypes": null, + "id": 887, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "16456:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16435:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16466:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16435:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 891, + "nodeType": "ExpressionStatement", + "src": "16435:32:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 893, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "16504:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 892, + "name": "LogTokenDeregistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "16483:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16483:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 895, + "nodeType": "EmitStatement", + "src": "16478:33:0" + } + ] + }, + "documentation": "@notice Deregisters a token, removing it from the list of\n registeredTokens.\n\n /// @param _token The address of the token to deregister.", + "id": 897, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_deregisterToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 840, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 897, + "src": "15856:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 839, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15856:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15855:16:0" + }, + "returnParameters": { + "id": 842, + "nodeType": "ParameterList", + "parameters": [], + "src": "15880:0:0" + }, + "scope": 948, + "src": "15830:688:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 946, + "nodeType": "Block", + "src": "16743:375:0", + "statements": [ + { + "assignments": [ + 901 + ], + "declarations": [ + { + "constant": false, + "id": 901, + "name": "arrayLength", + "nodeType": "VariableDeclaration", + "scope": 946, + "src": "16780:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 900, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "16780:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 904, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 902, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "16799:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 903, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16799:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16780:39:0" + }, + { + "body": { + "id": 938, + "nodeType": "Block", + "src": "16868:210:0", + "statements": [ + { + "assignments": [ + 916 + ], + "declarations": [ + { + "constant": false, + "id": 916, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 938, + "src": "16882:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16882:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 920, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 917, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "16898:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 919, + "indexExpression": { + "argumentTypes": null, + "id": 918, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "16912:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16898:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16882:32:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 924, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 916, + "src": "16950:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 921, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "16928:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16928:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16928:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 926, + "nodeType": "ExpressionStatement", + "src": "16928:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 927, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "16970:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 929, + "indexExpression": { + "argumentTypes": null, + "id": 928, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 916, + "src": "16991:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16970:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 930, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "17000:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 931, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17000:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16970:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 933, + "nodeType": "ExpressionStatement", + "src": "16970:53:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 935, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 916, + "src": "17061:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 934, + "name": "LogTokenRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "17042:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17042:25:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 937, + "nodeType": "EmitStatement", + "src": "17037:30:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 909, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "16846:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 910, + "name": "arrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 901, + "src": "16850:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16846:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 939, + "initializationExpression": { + "assignments": [ + 906 + ], + "declarations": [ + { + "constant": false, + "id": 906, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 939, + "src": "16834:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 905, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "16834:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 908, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16843:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "16834:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "16863:3:0", + "subExpression": { + "argumentTypes": null, + "id": 912, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "16863:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 914, + "nodeType": "ExpressionStatement", + "src": "16863:3:0" + }, + "nodeType": "ForStatement", + "src": "16829:249:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 940, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "17087:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17110:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17087:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "nodeType": "ExpressionStatement", + "src": "17087:24:0" + } + ] + }, + "documentation": "@notice Updates the list of registeredTokens adding tokens that are to be registered.\n The list of tokens that are pending registration are emptied afterwards.", + "id": 947, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_updateTokenList", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 898, + "nodeType": "ParameterList", + "parameters": [], + "src": "16732:2:0" + }, + "returnParameters": { + "id": 899, + "nodeType": "ParameterList", + "parameters": [], + "src": "16743:0:0" + }, + "scope": 948, + "src": "16707:411:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + } + ], + "scope": 949, + "src": "458:16663:0" + } + ], + "src": "0:17122:0" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePayment.sol", + "exportedSymbols": { + "DarknodePayment": [ + 948 + ] + }, + "id": 949, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:0" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 6512, + "src": "25:63:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 6401, + "src": "89:59:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 6909, + "src": "149:63:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/CompatibleERC20Functions.sol", + "file": "../libraries/CompatibleERC20Functions.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 4038, + "src": "214:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol", + "file": "../DarknodeRegistry/DarknodeRegistry.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 2380, + "src": "266:50:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePaymentStore.sol", + "file": "./DarknodePaymentStore.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 949, + "sourceUnit": 1277, + "src": "317:36:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6511, + "src": "486:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$6511", + "typeString": "contract Ownable" + } + }, + "id": 9, + "nodeType": "InheritanceSpecifier", + "src": "486:7:0" + } + ], + "contractDependencies": [ + 6511 + ], + "contractKind": "contract", + "documentation": "@notice DarknodePayment is responsible for paying off darknodes for their\n computation.", + "fullyImplemented": true, + "id": 948, + "linearizedBaseContracts": [ + 948, + 6511 + ], + "name": "DarknodePayment", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 12, + "libraryName": { + "contractScope": null, + "id": 10, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6400, + "src": "506:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6400", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "500:27:0", + "typeName": { + "id": 11, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "519:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 15, + "libraryName": { + "contractScope": null, + "id": 13, + "name": "CompatibleERC20Functions", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4037, + "src": "538:24:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CompatibleERC20Functions_$4037", + "typeString": "library CompatibleERC20Functions" + } + }, + "nodeType": "UsingForDirective", + "src": "532:41:0", + "typeName": { + "contractScope": null, + "id": 14, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6908, + "src": "567:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + } + }, + { + "constant": false, + "id": 17, + "name": "VERSION", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "579:21:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 16, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "579:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 20, + "name": "ETHEREUM", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "695:77:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "695:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 19, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "730:42:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 22, + "name": "darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "779:40:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21, + "name": "DarknodeRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2379, + "src": "779:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 24, + "name": "store", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "967:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + }, + "typeName": { + "contractScope": null, + "id": 23, + "name": "DarknodePaymentStore", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1276, + "src": "967:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 26, + "name": "blacklister", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1102:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 25, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1102:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 28, + "name": "currentCycle", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1135:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1135:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 30, + "name": "previousCycle", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1168:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 29, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1168:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 32, + "name": "shareCount", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1266:25:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 31, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1266:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 35, + "name": "pendingTokens", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1501:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 33, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1501:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 34, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1501:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 38, + "name": "registeredTokens", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1650:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1650:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 37, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1650:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 42, + "name": "registeredTokenIndex", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "1793:55:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 41, + "keyType": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1801:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1793:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 40, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 46, + "name": "unclaimedRewards", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2012:51:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 45, + "keyType": { + "id": 43, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2020:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2012:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 44, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2031:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 50, + "name": "previousCycleRewardShare", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2183:59:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 49, + "keyType": { + "id": 47, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2191:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2183:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 48, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 52, + "name": "cycleStartTime", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2306:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2306:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 54, + "name": "cycleDuration", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2415:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 53, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2415:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 56, + "name": "cycleTimeout", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2523:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 55, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2523:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 62, + "name": "rewardClaimed", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "2727:65:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + }, + "typeName": { + "id": 61, + "keyType": { + "id": 57, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2735:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2727:44:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + }, + "valueType": { + "id": 60, + "keyType": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2754:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2746:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + }, + "valueType": { + "id": 59, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode is blacklisted from receiving rewards\n @param _darknode The address of the darknode which was blacklisted\n @param _time The time at which the darknode was blacklisted", + "id": 68, + "name": "LogDarknodeBlacklisted", + "nodeType": "EventDefinition", + "parameters": { + "id": 67, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64, + "indexed": true, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "3049:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 63, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3049:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "indexed": false, + "name": "_time", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "3076:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 65, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3076:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3048:42:0" + }, + "src": "3020:71:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode is whitelisted to receive rewards\n @param _darknode The address of the darknode which was whitelisted\n @param _time The time at which the darknode was whitelisted", + "id": 74, + "name": "LogDarknodeWhitelisted", + "nodeType": "EventDefinition", + "parameters": { + "id": 73, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 70, + "indexed": true, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 74, + "src": "3343:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 69, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3343:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 72, + "indexed": false, + "name": "_time", + "nodeType": "VariableDeclaration", + "scope": 74, + "src": "3370:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 71, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3342:42:0" + }, + "src": "3314:71:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode claims their share of reward\n @param _darknode The darknode which claimed\n @param _cycle The cycle that the darknode claimed for", + "id": 80, + "name": "LogDarknodeClaim", + "nodeType": "EventDefinition", + "parameters": { + "id": 79, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 76, + "indexed": true, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 80, + "src": "3597:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3597:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 78, + "indexed": false, + "name": "_cycle", + "nodeType": "VariableDeclaration", + "scope": 80, + "src": "3624:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 77, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3624:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3596:43:0" + }, + "src": "3574:66:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when someone pays the DarknodePayment contract\n @param _payer The darknode which claimed\n @param _amount The cycle that the darknode claimed for\n @param _token The address of the token that was transferred", + "id": 88, + "name": "LogPaymentReceived", + "nodeType": "EventDefinition", + "parameters": { + "id": 87, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 82, + "indexed": true, + "name": "_payer", + "nodeType": "VariableDeclaration", + "scope": 88, + "src": "3922:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 81, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3922:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 84, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 88, + "src": "3946:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 83, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3946:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 86, + "indexed": false, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 88, + "src": "3963:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 85, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3963:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3921:57:0" + }, + "src": "3897:82:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode calls withdraw\n @param _payee The address of the darknode which withdrew\n @param _value The amount of DAI withdrawn\n @param _token The address of the token that was withdrawn", + "id": 96, + "name": "LogDarknodeWithdrew", + "nodeType": "EventDefinition", + "parameters": { + "id": 95, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 90, + "indexed": true, + "name": "_payee", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "4247:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 89, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4247:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 92, + "indexed": false, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "4271:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 91, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4271:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 94, + "indexed": false, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "4287:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4287:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4246:56:0" + }, + "src": "4221:82:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a new cycle happens\n @param _newCycle The new, current cycle\n @param _lastCycle The previous cycle\n @param _cycleTimeout The earliest a new cycle can be called", + "id": 104, + "name": "LogNewCycle", + "nodeType": "EventDefinition", + "parameters": { + "id": 103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 98, + "indexed": false, + "name": "_newCycle", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "4537:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 97, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4537:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 100, + "indexed": false, + "name": "_lastCycle", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "4556:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 99, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4556:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 102, + "indexed": false, + "name": "_cycleTimeout", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "4576:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4576:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4536:62:0" + }, + "src": "4519:80:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when the cycle duration changes\n @param _newDuration The new duration\n @param _oldDuration The old duration", + "id": 110, + "name": "LogCycleDurationChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "indexed": false, + "name": "_newDuration", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "4781:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4781:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "indexed": false, + "name": "_oldDuration", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "4803:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 107, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4803:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4780:44:0" + }, + "src": "4751:74:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when the Blacklister contract changes\n @param _newBlacklister The new Blacklister\n @param _oldBlacklister The old Blacklister", + "id": 116, + "name": "LogBlacklisterChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 112, + "indexed": false, + "name": "_newBlacklister", + "nodeType": "VariableDeclaration", + "scope": 116, + "src": "5023:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 111, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5023:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 114, + "indexed": false, + "name": "_oldBlacklister", + "nodeType": "VariableDeclaration", + "scope": 116, + "src": "5048:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 113, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5048:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5022:50:0" + }, + "src": "4995:78:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a new token is registered\n @param _token The token that was registered", + "id": 120, + "name": "LogTokenRegistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 118, + "indexed": false, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 120, + "src": "5211:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 117, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5211:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5210:16:0" + }, + "src": "5186:41:0" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a token is deregistered\n @param _token The token that was deregistered", + "id": 124, + "name": "LogTokenDeregistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 122, + "indexed": false, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 124, + "src": "5367:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 121, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5367:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5366:16:0" + }, + "src": "5340:43:0" + }, + { + "body": { + "id": 137, + "nodeType": "Block", + "src": "5480:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 131, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "5528:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 129, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "5498:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isRegistered", + "nodeType": "MemberAccess", + "referencedDeclaration": 2167, + "src": "5498:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5498:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f6465206973206e6f742072656769737465726564", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5540:28:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c0f050aeb8de9b1f22ac151ce61ab97f0e469f4b821d98865a331c02d75a5fcd", + "typeString": "literal_string \"darknode is not registered\"" + }, + "value": "darknode is not registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c0f050aeb8de9b1f22ac151ce61ab97f0e469f4b821d98865a331c02d75a5fcd", + "typeString": "literal_string \"darknode is not registered\"" + } + ], + "id": 128, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5490:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5490:79:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 135, + "nodeType": "ExpressionStatement", + "src": "5490:79:0" + }, + { + "id": 136, + "nodeType": "PlaceholderStatement", + "src": "5579:1:0" + } + ] + }, + "documentation": "@notice Only allow registered dark nodes.", + "id": 138, + "name": "onlyDarknode", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 127, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 126, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 138, + "src": "5461:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5461:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5460:19:0" + }, + "src": "5439:148:0", + "visibility": "internal" + }, + { + "body": { + "id": 149, + "nodeType": "Block", + "src": "5678:81:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 141, + "name": "blacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "5696:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 142, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5711:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5711:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5696:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420426c61636b6c6973746572", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5723:17:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42a83d196c4be03f7ac5843bd0fd11960453ebb76ebc0b5dc29ceef0a96b197c", + "typeString": "literal_string \"not Blacklister\"" + }, + "value": "not Blacklister" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_42a83d196c4be03f7ac5843bd0fd11960453ebb76ebc0b5dc29ceef0a96b197c", + "typeString": "literal_string \"not Blacklister\"" + } + ], + "id": 140, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5688:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5688:53:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 147, + "nodeType": "ExpressionStatement", + "src": "5688:53:0" + }, + { + "id": 148, + "nodeType": "PlaceholderStatement", + "src": "5751:1:0" + } + ] + }, + "documentation": "@notice Only allow the Darknode Payment contract.", + "id": 150, + "name": "onlyBlacklister", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [], + "src": "5675:2:0" + }, + "src": "5651:108:0", + "visibility": "internal" + }, + { + "body": { + "id": 164, + "nodeType": "Block", + "src": "5876:95:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5894:31:0", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 152, + "src": "5915:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 155, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "5895:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isBlacklisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 1016, + "src": "5895:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5895:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f646520697320626c61636b6c6973746564", + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5927:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b2595c93a5cd4ee60a0fc73f74d889182038841a2c576dfb52bdc225242aef77", + "typeString": "literal_string \"darknode is blacklisted\"" + }, + "value": "darknode is blacklisted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b2595c93a5cd4ee60a0fc73f74d889182038841a2c576dfb52bdc225242aef77", + "typeString": "literal_string \"darknode is blacklisted\"" + } + ], + "id": 154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5886:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5886:67:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "5886:67:0" + }, + { + "id": 163, + "nodeType": "PlaceholderStatement", + "src": "5963:1:0" + } + ] + }, + "documentation": "@notice Only allow darknodes which haven't been blacklisted", + "id": 165, + "name": "notBlacklisted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 152, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 165, + "src": "5857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5857:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5856:19:0" + }, + "src": "5833:138:0", + "visibility": "internal" + }, + { + "body": { + "id": 214, + "nodeType": "Block", + "src": "6623:418:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 176, + "name": "VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "6633:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 177, + "name": "_VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "6643:8:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6633:18:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 179, + "nodeType": "ExpressionStatement", + "src": "6633:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 180, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "6661:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 181, + "name": "_darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 169, + "src": "6680:17:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "src": "6661:36:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 183, + "nodeType": "ExpressionStatement", + "src": "6661:36:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 184, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "6707:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 185, + "name": "_darknodePaymentStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "6715:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "src": "6707:29:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 187, + "nodeType": "ExpressionStatement", + "src": "6707:29:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 188, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "6746:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 189, + "name": "_cycleDurationSeconds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "6762:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6746:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 191, + "nodeType": "ExpressionStatement", + "src": "6746:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 192, + "name": "blacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "6837:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 193, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "6851:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6851:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6837:24:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "6837:24:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 197, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "6907:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "6922:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6922:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6907:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 201, + "nodeType": "ExpressionStatement", + "src": "6907:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 202, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "6944:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "6961:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6961:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6944:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 206, + "nodeType": "ExpressionStatement", + "src": "6944:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 207, + "name": "cycleTimeout", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "6986:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 210, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "7020:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 208, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "7001:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "7001:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7001:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6986:48:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 213, + "nodeType": "ExpressionStatement", + "src": "6986:48:0" + } + ] + }, + "documentation": "@notice The contract constructor. Starts the current cycle using the\n time of deploy.\n\n /// @param _VERSION A string defining the contract version.\n @param _darknodeRegistry The address of the DarknodeRegistry contract\n @param _darknodePaymentStore The address of the DarknodePaymentStore\n contract\n @param _cycleDurationSeconds The minimum time before a new cycle can occur in seconds", + "id": 215, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 167, + "name": "_VERSION", + "nodeType": "VariableDeclaration", + "scope": 215, + "src": "6452:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 166, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6452:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 169, + "name": "_darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 215, + "src": "6484:34:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + }, + "typeName": { + "contractScope": null, + "id": 168, + "name": "DarknodeRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2379, + "src": "6484:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 171, + "name": "_darknodePaymentStore", + "nodeType": "VariableDeclaration", + "scope": 215, + "src": "6528:42:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + }, + "typeName": { + "contractScope": null, + "id": 170, + "name": "DarknodePaymentStore", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1276, + "src": "6528:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 173, + "name": "_cycleDurationSeconds", + "nodeType": "VariableDeclaration", + "scope": 215, + "src": "6580:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6442:173:0" + }, + "returnParameters": { + "id": 175, + "nodeType": "ParameterList", + "parameters": [], + "src": "6623:0:0" + }, + "scope": 948, + "src": "6431:610:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 268, + "nodeType": "Block", + "src": "7315:416:0", + "statements": [ + { + "assignments": [ + 223 + ], + "declarations": [ + { + "constant": false, + "id": 223, + "name": "darknodeOwner", + "nodeType": "VariableDeclaration", + "scope": 268, + "src": "7325:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 222, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7325:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 228, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 226, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "7391:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 224, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "7357:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getDarknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 1923, + "src": "7357:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7357:44:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7325:76:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 230, + "name": "darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "7419:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7444:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7436:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7419:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c6964206461726b6e6f6465206f776e6572", + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7450:24:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9c790fcc7516cfa146c3c07a005d290d38dc63b9712b8a88294a34c3910a723b", + "typeString": "literal_string \"invalid darknode owner\"" + }, + "value": "invalid darknode owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9c790fcc7516cfa146c3c07a005d290d38dc63b9712b8a88294a34c3910a723b", + "typeString": "literal_string \"invalid darknode owner\"" + } + ], + "id": 229, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "7411:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7411:64:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 237, + "nodeType": "ExpressionStatement", + "src": "7411:64:0" + }, + { + "assignments": [ + 239 + ], + "declarations": [ + { + "constant": false, + "id": 239, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 268, + "src": "7486:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 238, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7486:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 245, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 242, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "7526:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 243, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "7537:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 240, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "7503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBalances", + "nodeType": "MemberAccess", + "referencedDeclaration": 976, + "src": "7503:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7503:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7486:58:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 247, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "7562:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7571:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7562:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7468696e6720746f207769746864726177", + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7574:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d015b7d7782ab5f33f0b2a3f3ec5207107594fb24ec0023388f87a16a3862dc0", + "typeString": "literal_string \"nothing to withdraw\"" + }, + "value": "nothing to withdraw" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d015b7d7782ab5f33f0b2a3f3ec5207107594fb24ec0023388f87a16a3862dc0", + "typeString": "literal_string \"nothing to withdraw\"" + } + ], + "id": 246, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "7554:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7554:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 252, + "nodeType": "ExpressionStatement", + "src": "7554:42:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 256, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "7622:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 257, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "7633:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 258, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "7641:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 259, + "name": "darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "7649:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 253, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "7607:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1275, + "src": "7607:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_address_payable_$returns$__$", + "typeString": "function (address,address,uint256,address payable) external" + } + }, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7607:56:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 261, + "nodeType": "ExpressionStatement", + "src": "7607:56:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 263, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "7698:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 264, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "7709:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 265, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "7717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 262, + "name": "LogDarknodeWithdrew", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "7678:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (address,uint256,address)" + } + }, + "id": 266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7678:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 267, + "nodeType": "EmitStatement", + "src": "7673:51:0" + } + ] + }, + "documentation": "@notice Transfers the funds allocated to the darknode to the darknode\n owner.\n\n /// @param _darknode The address of the darknode\n @param _token Which token to transfer", + "id": 269, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 217, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 269, + "src": "7273:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 216, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7273:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 219, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 269, + "src": "7292:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 218, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7292:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7272:35:0" + }, + "returnParameters": { + "id": 221, + "nodeType": "ParameterList", + "parameters": [], + "src": "7315:0:0" + }, + "scope": 948, + "src": "7255:476:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 297, + "nodeType": "Block", + "src": "7819:114:0", + "statements": [ + { + "body": { + "id": 295, + "nodeType": "Block", + "src": "7871:56:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 289, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 271, + "src": "7894:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 290, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "7905:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 292, + "indexExpression": { + "argumentTypes": null, + "id": 291, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7913:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 288, + "name": "withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 269, + "src": "7885:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7885:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 294, + "nodeType": "ExpressionStatement", + "src": "7885:31:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 281, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7846:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 282, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "7850:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7850:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7846:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 296, + "initializationExpression": { + "assignments": [ + 278 + ], + "declarations": [ + { + "constant": false, + "id": 278, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 296, + "src": "7834:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 277, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7834:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 280, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7843:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7834:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "7866:3:0", + "subExpression": { + "argumentTypes": null, + "id": 285, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7866:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 287, + "nodeType": "ExpressionStatement", + "src": "7866:3:0" + }, + "nodeType": "ForStatement", + "src": "7829:98:0" + } + ] + }, + "documentation": null, + "id": 298, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdrawMultiple", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 275, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 271, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 298, + "src": "7763:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 270, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7763:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 274, + "name": "_tokens", + "nodeType": "VariableDeclaration", + "scope": 298, + "src": "7782:26:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7782:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 273, + "length": null, + "nodeType": "ArrayTypeName", + "src": "7782:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7762:47:0" + }, + "returnParameters": { + "id": 276, + "nodeType": "ParameterList", + "parameters": [], + "src": "7819:0:0" + }, + "scope": 948, + "src": "7737:196:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 317, + "nodeType": "Block", + "src": "8034:117:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 305, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "8068:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 302, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "8052:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8044:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8044:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8044:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8044:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 308, + "nodeType": "ExpressionStatement", + "src": "8044:34:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "8112:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8112:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 312, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "8124:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 314, + "name": "ETHEREUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "8135:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 309, + "name": "LogPaymentReceived", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "8093:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (address,uint256,address)" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8093:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 316, + "nodeType": "EmitStatement", + "src": "8088:56:0" + } + ] + }, + "documentation": "@notice Forward all payments to the DarknodePaymentStore.", + "id": 318, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 299, + "nodeType": "ParameterList", + "parameters": [], + "src": "8014:2:0" + }, + "returnParameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [], + "src": "8034:0:0" + }, + "scope": 948, + "src": "8005:146:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 335, + "nodeType": "Block", + "src": "8347:84:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 330, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "8399:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 332, + "indexExpression": { + "argumentTypes": null, + "id": 331, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "8416:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8399:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 327, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "8387:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 325, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "8364:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "availableBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1075, + "src": "8364:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8364:30:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "8364:34:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8364:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 324, + "id": 334, + "nodeType": "Return", + "src": "8357:67:0" + } + ] + }, + "documentation": "@notice The current balance of the contract available as reward for the\n current cycle", + "id": 336, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "currentCycleRewardPool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 336, + "src": "8299:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 319, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8299:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8298:16:0" + }, + "returnParameters": { + "id": 324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 323, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 336, + "src": "8338:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8338:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8337:9:0" + }, + "scope": 948, + "src": "8267:164:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 351, + "nodeType": "Block", + "src": "8532:67:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 347, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 338, + "src": "8572:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 348, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "8585:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 345, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "8549:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBalances", + "nodeType": "MemberAccess", + "referencedDeclaration": 976, + "src": "8549:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8549:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 344, + "id": 350, + "nodeType": "Return", + "src": "8542:50:0" + } + ] + }, + "documentation": null, + "id": 352, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "darknodeBalances", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 341, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 338, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "8463:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 337, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8463:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 340, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "8484:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 339, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8484:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8462:37:0" + }, + "returnParameters": { + "id": 344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 343, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "8523:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8523:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8522:9:0" + }, + "scope": 948, + "src": "8437:162:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 433, + "nodeType": "Block", + "src": "8698:832:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 358, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7204, + "src": "8716:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 359, + "name": "cycleTimeout", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "8723:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8716:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "63616e6e6f74206379636c65207965743a20746f6f206561726c79", + "id": 361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8737:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cecae2a9522e7de8b5351ed829ea6421f34a49feaff61f26fa8e4e0daafc0c3e", + "typeString": "literal_string \"cannot cycle yet: too early\"" + }, + "value": "cannot cycle yet: too early" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cecae2a9522e7de8b5351ed829ea6421f34a49feaff61f26fa8e4e0daafc0c3e", + "typeString": "literal_string \"cannot cycle yet: too early\"" + } + ], + "id": 357, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "8708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8708:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 363, + "nodeType": "ExpressionStatement", + "src": "8708:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 365, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "8785:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8785:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 367, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "8801:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8785:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f206e657720626c6f636b", + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8815:14:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_295866d09e15f2d7cb6466a82b1128916b3b54ff9b83f600fbbd4e36ec88a9fc", + "typeString": "literal_string \"no new block\"" + }, + "value": "no new block" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_295866d09e15f2d7cb6466a82b1128916b3b54ff9b83f600fbbd4e36ec88a9fc", + "typeString": "literal_string \"no new block\"" + } + ], + "id": 364, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "8777:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8777:53:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 371, + "nodeType": "ExpressionStatement", + "src": "8777:53:0" + }, + { + "assignments": [ + 373 + ], + "declarations": [ + { + "constant": false, + "id": 373, + "name": "arrayLength", + "nodeType": "VariableDeclaration", + "scope": 433, + "src": "8889:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8889:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 376, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 374, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "8908:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 375, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8908:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8889:42:0" + }, + { + "body": { + "id": 393, + "nodeType": "Block", + "src": "8980:62:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 388, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "9011:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 390, + "indexExpression": { + "argumentTypes": null, + "id": 389, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 378, + "src": "9028:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9011:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 387, + "name": "_snapshotBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 838, + "src": "8994:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8994:37:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 392, + "nodeType": "ExpressionStatement", + "src": "8994:37:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 381, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 378, + "src": "8958:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 382, + "name": "arrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "8962:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8958:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 394, + "initializationExpression": { + "assignments": [ + 378 + ], + "declarations": [ + { + "constant": false, + "id": 378, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 394, + "src": "8946:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 377, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 380, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8955:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8946:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "8975:3:0", + "subExpression": { + "argumentTypes": null, + "id": 384, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 378, + "src": "8975:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 386, + "nodeType": "ExpressionStatement", + "src": "8975:3:0" + }, + "nodeType": "ForStatement", + "src": "8941:101:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 395, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "9081:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 396, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "9097:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9081:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 398, + "nodeType": "ExpressionStatement", + "src": "9081:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 399, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "9119:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 400, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "9134:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9134:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9119:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 403, + "nodeType": "ExpressionStatement", + "src": "9119:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 404, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "9156:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 405, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "9173:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9173:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9156:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 408, + "nodeType": "ExpressionStatement", + "src": "9156:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 409, + "name": "cycleTimeout", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "9198:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 412, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "9232:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 410, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "9213:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "9213:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9213:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9198:48:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 415, + "nodeType": "ExpressionStatement", + "src": "9198:48:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 416, + "name": "shareCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "9305:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 417, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "9318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeWhitelistLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 970, + "src": "9318:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9318:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9305:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 421, + "nodeType": "ExpressionStatement", + "src": "9305:44:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 422, + "name": "_updateTokenList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 947, + "src": "9406:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9406:18:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 424, + "nodeType": "ExpressionStatement", + "src": "9406:18:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 426, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "9452:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 427, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "9466:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 428, + "name": "cycleTimeout", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 56, + "src": "9481:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 425, + "name": "LogNewCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "9440:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9440:54:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 430, + "nodeType": "EmitStatement", + "src": "9435:59:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 431, + "name": "currentCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "9511:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 356, + "id": 432, + "nodeType": "Return", + "src": "9504:19:0" + } + ] + }, + "documentation": "@notice Changes the current cycle.", + "id": 434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "changeCycle", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [], + "src": "8668:2:0" + }, + "returnParameters": { + "id": 356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 355, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 434, + "src": "8689:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8689:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8688:9:0" + }, + "scope": 948, + "src": "8648:882:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 500, + "nodeType": "Block", + "src": "9807:540:0", + "statements": [ + { + "assignments": [ + 442 + ], + "declarations": [ + { + "constant": false, + "id": 442, + "name": "receivedValue", + "nodeType": "VariableDeclaration", + "scope": 500, + "src": "9817:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 441, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 443, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "9817:21:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 444, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "9852:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 445, + "name": "ETHEREUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "9862:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9852:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 491, + "nodeType": "Block", + "src": "10046:227:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 470, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "10068:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "10068:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "756e6578706563746564206574686572207472616e73666572", + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10084:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2b773e1733874c38ac552212083a64eadb144022df83a1e216d77353b84e7ecd", + "typeString": "literal_string \"unexpected ether transfer\"" + }, + "value": "unexpected ether transfer" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2b773e1733874c38ac552212083a64eadb144022df83a1e216d77353b84e7ecd", + "typeString": "literal_string \"unexpected ether transfer\"" + } + ], + "id": 469, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "10060:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10060:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 476, + "nodeType": "ExpressionStatement", + "src": "10060:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 477, + "name": "receivedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "10172:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 482, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "10227:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10227:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 485, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "10247:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10239:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 487, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 436, + "src": "10255:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 479, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "10194:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 478, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6908, + "src": "10188:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$6908_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:13:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFromWithFees", + "nodeType": "MemberAccess", + "referencedDeclaration": 3861, + "src": "10188:38:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7168_$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$7168_$", + "typeString": "function (contract IERC20,address,address,uint256) returns (uint256)" + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:74:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10172:90:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 490, + "nodeType": "ExpressionStatement", + "src": "10172:90:0" + } + ] + }, + "id": 492, + "nodeType": "IfStatement", + "src": "9848:425:0", + "trueBody": { + "id": 468, + "nodeType": "Block", + "src": "9872:168:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 448, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 436, + "src": "9894:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 449, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "9904:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9904:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9894:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d69736d617463686564206465706f7369742076616c7565", + "id": 452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9915:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d234018c93f3455a77d39bb3ddfe18573be99173ad47d162fecec56c831dcfa5", + "typeString": "literal_string \"mismatched deposit value\"" + }, + "value": "mismatched deposit value" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d234018c93f3455a77d39bb3ddfe18573be99173ad47d162fecec56c831dcfa5", + "typeString": "literal_string \"mismatched deposit value\"" + } + ], + "id": 447, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "9886:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9886:56:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 454, + "nodeType": "ExpressionStatement", + "src": "9886:56:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 455, + "name": "receivedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "9956:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 456, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "9972:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9972:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9956:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 459, + "nodeType": "ExpressionStatement", + "src": "9956:25:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 464, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "10019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10019:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 461, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "10003:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9995:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9995:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9995:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9995:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 467, + "nodeType": "ExpressionStatement", + "src": "9995:34:0" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 494, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "10306:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10306:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 496, + "name": "receivedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "10318:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 497, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "10333:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 493, + "name": "LogPaymentReceived", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 88, + "src": "10287:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (address,uint256,address)" + } + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10287:53:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 499, + "nodeType": "EmitStatement", + "src": "10282:58:0" + } + ] + }, + "documentation": "@notice Deposits token into the contract to be paid to the Darknodes\n\n /// @param _value The amount of token deposit in the token's smallest unit.\n @param _token The token address", + "id": 501, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 436, + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "9758:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 435, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9758:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 438, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "9774:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9774:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9757:32:0" + }, + "returnParameters": { + "id": 440, + "nodeType": "ParameterList", + "parameters": [], + "src": "9807:0:0" + }, + "scope": 948, + "src": "9741:606:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 552, + "nodeType": "Block", + "src": "10822:537:0", + "statements": [ + { + "assignments": [ + 513 + ], + "declarations": [ + { + "constant": false, + "id": 513, + "name": "whitelistedTime", + "nodeType": "VariableDeclaration", + "scope": 552, + "src": "10832:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 512, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 518, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 516, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10882:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 514, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "10858:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeWhitelist", + "nodeType": "MemberAccess", + "referencedDeclaration": 988, + "src": "10858:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10858:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10832:60:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 519, + "name": "whitelistedTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "10962:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10981:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "10962:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 535, + "nodeType": "IfStatement", + "src": "10958:154:0", + "trueBody": { + "id": 534, + "nodeType": "Block", + "src": "10984:128:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 525, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "11014:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 522, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "10998:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "whitelist", + "nodeType": "MemberAccess", + "referencedDeclaration": 1150, + "src": "10998:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10998:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 527, + "nodeType": "ExpressionStatement", + "src": "10998:26:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 529, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "11066:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 530, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7204, + "src": "11077:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 528, + "name": "LogDarknodeWhitelisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11043:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11043:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 532, + "nodeType": "EmitStatement", + "src": "11038:43:0" + }, + { + "expression": null, + "functionReturnParameters": 511, + "id": 533, + "nodeType": "Return", + "src": "11095:7:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 537, + "name": "whitelistedTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "11130:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 538, + "name": "cycleStartTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "11148:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11130:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "63616e6e6f7420636c61696d20666f722074686973206379636c65", + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11164:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3d046fb6ee277dc79428b09c4f711ae205caaf399a387acd7693b7d10df0b096", + "typeString": "literal_string \"cannot claim for this cycle\"" + }, + "value": "cannot claim for this cycle" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3d046fb6ee277dc79428b09c4f711ae205caaf399a387acd7693b7d10df0b096", + "typeString": "literal_string \"cannot claim for this cycle\"" + } + ], + "id": 536, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "11122:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11122:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 542, + "nodeType": "ExpressionStatement", + "src": "11122:72:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 544, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "11285:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 543, + "name": "_claimDarknodeReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 794, + "src": "11264:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11264:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 546, + "nodeType": "ExpressionStatement", + "src": "11264:31:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 548, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "11327:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 549, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "11338:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 547, + "name": "LogDarknodeClaim", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "11310:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11310:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 551, + "nodeType": "EmitStatement", + "src": "11305:47:0" + } + ] + }, + "documentation": "@notice Claims the rewards allocated to the darknode last cycle and\n increments the darknode balances. Whitelists the darknode if it\n hasn't already been whitelisted. If a darknode does not call\n claim() then the rewards for the previous cycle is lost.\n\n /// @param _darknode The address of the darknode to claim", + "id": 553, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 506, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10785:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 507, + "modifierName": { + "argumentTypes": null, + "id": 505, + "name": "onlyDarknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 138, + "src": "10772:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10772:23:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 509, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 503, + "src": "10811:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 510, + "modifierName": { + "argumentTypes": null, + "id": 508, + "name": "notBlacklisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 165, + "src": "10796:14:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10796:25:0" + } + ], + "name": "claim", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 503, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 553, + "src": "10744:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 502, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10744:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10743:19:0" + }, + "returnParameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [], + "src": "10822:0:0" + }, + "scope": 948, + "src": "10729:630:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 574, + "nodeType": "Block", + "src": "11595:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 566, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 555, + "src": "11621:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 563, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "11605:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "blacklist", + "nodeType": "MemberAccess", + "referencedDeclaration": 1116, + "src": "11605:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11605:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 568, + "nodeType": "ExpressionStatement", + "src": "11605:26:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 555, + "src": "11669:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7204, + "src": "11680:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "LogDarknodeBlacklisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11646:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11646:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "EmitStatement", + "src": "11641:43:0" + } + ] + }, + "documentation": "@notice Blacklists a darknode from participating in rewards.\n\n /// @param _darknode The address of the darknode to blacklist", + "id": 575, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 558, + "modifierName": { + "argumentTypes": null, + "id": 557, + "name": "onlyBlacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "11555:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11555:15:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 560, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 555, + "src": "11584:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 561, + "modifierName": { + "argumentTypes": null, + "id": 559, + "name": "onlyDarknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 138, + "src": "11571:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11571:23:0" + } + ], + "name": "blacklist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 555, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 575, + "src": "11527:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 554, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11527:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11526:19:0" + }, + "returnParameters": { + "id": 562, + "nodeType": "ParameterList", + "parameters": [], + "src": "11595:0:0" + }, + "scope": 948, + "src": "11508:183:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 623, + "nodeType": "Block", + "src": "11929:318:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 583, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "11947:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 585, + "indexExpression": { + "argumentTypes": null, + "id": 584, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 577, + "src": "11968:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11947:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11979:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11947:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f6b656e20616c72656164792072656769737465726564", + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11982:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d4798e198fe911d677431c88f83cf3b2c53b61cd78866de466c7e0bb77f9d3ed", + "typeString": "literal_string \"token already registered\"" + }, + "value": "token already registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d4798e198fe911d677431c88f83cf3b2c53b61cd78866de466c7e0bb77f9d3ed", + "typeString": "literal_string \"token already registered\"" + } + ], + "id": 582, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "11939:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11939:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 590, + "nodeType": "ExpressionStatement", + "src": "11939:70:0" + }, + { + "assignments": [ + 592 + ], + "declarations": [ + { + "constant": false, + "id": 592, + "name": "arrayLength", + "nodeType": "VariableDeclaration", + "scope": 623, + "src": "12019:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 591, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12019:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 595, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 593, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12038:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 594, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12038:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12019:39:0" + }, + { + "body": { + "id": 615, + "nodeType": "Block", + "src": "12107:98:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 607, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12129:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 609, + "indexExpression": { + "argumentTypes": null, + "id": 608, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 597, + "src": "12143:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12129:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 610, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 577, + "src": "12149:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12129:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f6b656e20616c72656164792070656e64696e6720726567697374726174696f6e", + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12157:36:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_787dd62bc86d4d83726163638c797bb33cf12206a1d6b26822f09d2dfd3c4850", + "typeString": "literal_string \"token already pending registration\"" + }, + "value": "token already pending registration" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_787dd62bc86d4d83726163638c797bb33cf12206a1d6b26822f09d2dfd3c4850", + "typeString": "literal_string \"token already pending registration\"" + } + ], + "id": 606, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12121:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12121:73:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "12121:73:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 600, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 597, + "src": "12085:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 601, + "name": "arrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 592, + "src": "12089:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12085:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 616, + "initializationExpression": { + "assignments": [ + 597 + ], + "declarations": [ + { + "constant": false, + "id": 597, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 616, + "src": "12073:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 596, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12073:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 599, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12082:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "12073:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "12102:3:0", + "subExpression": { + "argumentTypes": null, + "id": 603, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 597, + "src": "12102:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 605, + "nodeType": "ExpressionStatement", + "src": "12102:3:0" + }, + "nodeType": "ForStatement", + "src": "12068:137:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 620, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 577, + "src": "12233:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 617, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12214:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12214:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12214:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 622, + "nodeType": "ExpressionStatement", + "src": "12214:26:0" + } + ] + }, + "documentation": "@notice Adds tokens to be payable. Registration is pending until next\n cycle.\n\n /// @param _token The address of the token to be registered.", + "id": 624, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 580, + "modifierName": { + "argumentTypes": null, + "id": 579, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "11919:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11919:9:0" + } + ], + "name": "registerToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 578, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 577, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 624, + "src": "11894:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 576, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11894:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11893:16:0" + }, + "returnParameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [], + "src": "11929:0:0" + }, + "scope": 948, + "src": "11871:376:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 644, + "nodeType": "Block", + "src": "12515:116:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 632, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "12533:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 634, + "indexExpression": { + "argumentTypes": null, + "id": 633, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "12554:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12533:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12564:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12533:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f6b656e206e6f742072656769737465726564", + "id": 637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12567:22:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_377f1218920eabb8c88590b168b45e371255b51a019d9ffaacd5a49d2bf4672a", + "typeString": "literal_string \"token not registered\"" + }, + "value": "token not registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_377f1218920eabb8c88590b168b45e371255b51a019d9ffaacd5a49d2bf4672a", + "typeString": "literal_string \"token not registered\"" + } + ], + "id": 631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12525:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12525:65:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 639, + "nodeType": "ExpressionStatement", + "src": "12525:65:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 641, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "12617:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 640, + "name": "_deregisterToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "12600:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12600:24:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 643, + "nodeType": "ExpressionStatement", + "src": "12600:24:0" + } + ] + }, + "documentation": "@notice Removes a token from the list of supported tokens.\n Deregistration is pending until next cycle.\n\n /// @param _token The address of the token to be deregistered.", + "id": 645, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 629, + "modifierName": { + "argumentTypes": null, + "id": 628, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "12505:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12505:9:0" + } + ], + "name": "deregisterToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 627, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 626, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 645, + "src": "12480:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 625, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12480:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12479:16:0" + }, + "returnParameters": { + "id": 630, + "nodeType": "ParameterList", + "parameters": [], + "src": "12515:0:0" + }, + "scope": 948, + "src": "12455:176:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 670, + "nodeType": "Block", + "src": "12823:158:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 653, + "name": "_addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 647, + "src": "12841:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12858:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12850:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12850:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "12841:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c696420636f6e74726163742061646472657373", + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12862:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e5d559618de365ea9d9be741e7ee7e42841366bee9c710626ecee327ca18b84b", + "typeString": "literal_string \"invalid contract address\"" + }, + "value": "invalid contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e5d559618de365ea9d9be741e7ee7e42841366bee9c710626ecee327ca18b84b", + "typeString": "literal_string \"invalid contract address\"" + } + ], + "id": 652, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12833:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12833:56:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 660, + "nodeType": "ExpressionStatement", + "src": "12833:56:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 662, + "name": "_addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 647, + "src": "12926:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 663, + "name": "blacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "12933:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 661, + "name": "LogBlacklisterChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "12904:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12904:41:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 665, + "nodeType": "EmitStatement", + "src": "12899:46:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 666, + "name": "blacklister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "12955:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 667, + "name": "_addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 647, + "src": "12969:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12955:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 669, + "nodeType": "ExpressionStatement", + "src": "12955:19:0" + } + ] + }, + "documentation": "@notice Updates the Blacklister contract address.\n\n /// @param _addr The new Blacklister contract address.", + "id": 671, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 650, + "modifierName": { + "argumentTypes": null, + "id": 649, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "12813:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12813:9:0" + } + ], + "name": "updateBlacklister", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 648, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 647, + "name": "_addr", + "nodeType": "VariableDeclaration", + "scope": 671, + "src": "12789:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 646, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12789:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12788:15:0" + }, + "returnParameters": { + "id": 651, + "nodeType": "ParameterList", + "parameters": [], + "src": "12823:0:0" + }, + "scope": 948, + "src": "12762:219:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 691, + "nodeType": "Block", + "src": "13245:160:0", + "statements": [ + { + "assignments": [ + 679 + ], + "declarations": [ + { + "constant": false, + "id": 679, + "name": "oldDuration", + "nodeType": "VariableDeclaration", + "scope": 691, + "src": "13255:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 678, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13255:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 681, + "initialValue": { + "argumentTypes": null, + "id": 680, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13277:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13255:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 682, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13300:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 683, + "name": "_durationSeconds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 673, + "src": "13316:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13300:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 685, + "nodeType": "ExpressionStatement", + "src": "13300:32:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 687, + "name": "cycleDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13371:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 688, + "name": "oldDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "13386:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 686, + "name": "LogCycleDurationChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "13347:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13347:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 690, + "nodeType": "EmitStatement", + "src": "13342:56:0" + } + ] + }, + "documentation": "@notice Updates cycle duration\n\n /// @param _durationSeconds The amount of time (in seconds) that should have\n passed before a new cycle can be called.", + "id": 692, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 676, + "modifierName": { + "argumentTypes": null, + "id": 675, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "13235:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13235:9:0" + } + ], + "name": "updateCycleDuration", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 674, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 673, + "name": "_durationSeconds", + "nodeType": "VariableDeclaration", + "scope": 692, + "src": "13200:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 672, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13200:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13199:26:0" + }, + "returnParameters": { + "id": 677, + "nodeType": "ParameterList", + "parameters": [], + "src": "13245:0:0" + }, + "scope": 948, + "src": "13171:234:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 705, + "nodeType": "Block", + "src": "13677:51:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "13711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 699, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "13687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3661, + "src": "13687:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13687:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 704, + "nodeType": "ExpressionStatement", + "src": "13687:34:0" + } + ] + }, + "documentation": "@notice Allows the contract owner to initiate an ownership transfer of\n the DarknodePaymentStore.\n\n /// @param _newOwner The address to transfer the ownership to.", + "id": 706, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 697, + "modifierName": { + "argumentTypes": null, + "id": 696, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "13667:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13667:9:0" + } + ], + "name": "transferStoreOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 695, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 694, + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "scope": 706, + "src": "13639:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 693, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13639:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13638:19:0" + }, + "returnParameters": { + "id": 698, + "nodeType": "ParameterList", + "parameters": [], + "src": "13677:0:0" + }, + "scope": 948, + "src": "13607:121:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 716, + "nodeType": "Block", + "src": "14003:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 711, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "14013:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "14013:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14013:22:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 715, + "nodeType": "ExpressionStatement", + "src": "14013:22:0" + } + ] + }, + "documentation": "@notice Claims ownership of the store passed in to the constructor.\n `transferStoreOwnership` must have previously been called when\n transferring from another DarknodePaymentStore.", + "id": 717, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 709, + "modifierName": { + "argumentTypes": null, + "id": 708, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "13993:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13993:9:0" + } + ], + "name": "claimStoreOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 707, + "nodeType": "ParameterList", + "parameters": [], + "src": "13981:2:0" + }, + "returnParameters": { + "id": 710, + "nodeType": "ParameterList", + "parameters": [], + "src": "14003:0:0" + }, + "scope": 948, + "src": "13953:89:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 793, + "nodeType": "Block", + "src": "14383:655:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "14401:40:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 723, + "name": "rewardClaimed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "14402:13:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 725, + "indexExpression": { + "argumentTypes": null, + "id": 724, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 719, + "src": "14416:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14402:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 727, + "indexExpression": { + "argumentTypes": null, + "id": 726, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "14427:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14402:39:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "72657761726420616c726561647920636c61696d6564", + "id": 729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14443:24:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_dd5732e3fabae4380b82b177a141d95d2c717ae2c95a2c5be3b639386aff2f95", + "typeString": "literal_string \"reward already claimed\"" + }, + "value": "reward already claimed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dd5732e3fabae4380b82b177a141d95d2c717ae2c95a2c5be3b639386aff2f95", + "typeString": "literal_string \"reward already claimed\"" + } + ], + "id": 722, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "14393:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14393:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 731, + "nodeType": "ExpressionStatement", + "src": "14393:75:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 732, + "name": "rewardClaimed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "14478:13:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 735, + "indexExpression": { + "argumentTypes": null, + "id": 733, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 719, + "src": "14492:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14478:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 736, + "indexExpression": { + "argumentTypes": null, + "id": 734, + "name": "previousCycle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "14503:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14478:39:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14520:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "14478:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "14478:46:0" + }, + { + "assignments": [ + 741 + ], + "declarations": [ + { + "constant": false, + "id": 741, + "name": "arrayLength", + "nodeType": "VariableDeclaration", + "scope": 793, + "src": "14534:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 740, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14534:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 744, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 742, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "14553:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 743, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14553:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14534:42:0" + }, + { + "body": { + "id": 791, + "nodeType": "Block", + "src": "14625:407:0", + "statements": [ + { + "assignments": [ + 756 + ], + "declarations": [ + { + "constant": false, + "id": 756, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 791, + "src": "14639:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 755, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14639:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 760, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 757, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "14655:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 759, + "indexExpression": { + "argumentTypes": null, + "id": 758, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "14672:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14655:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14639:35:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 761, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "14767:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 763, + "indexExpression": { + "argumentTypes": null, + "id": 762, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14792:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14767:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14801:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14767:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 790, + "nodeType": "IfStatement", + "src": "14763:259:0", + "trueBody": { + "id": 789, + "nodeType": "Block", + "src": "14804:218:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 766, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "14822:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 768, + "indexExpression": { + "argumentTypes": null, + "id": 767, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14822:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 773, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "14876:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 775, + "indexExpression": { + "argumentTypes": null, + "id": 774, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14901:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14876:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 769, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "14848:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 771, + "indexExpression": { + "argumentTypes": null, + "id": 770, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14865:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14848:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "14848:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14848:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14822:86:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 778, + "nodeType": "ExpressionStatement", + "src": "14822:86:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 782, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 719, + "src": "14957:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 783, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "14968:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 784, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "14975:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 786, + "indexExpression": { + "argumentTypes": null, + "id": 785, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "15000:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14975:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 779, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "14926:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "incrementDarknodeBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1204, + "src": "14926:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14926:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 788, + "nodeType": "ExpressionStatement", + "src": "14926:81:0" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "14603:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "arrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 741, + "src": "14607:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14603:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 792, + "initializationExpression": { + "assignments": [ + 746 + ], + "declarations": [ + { + "constant": false, + "id": 746, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 792, + "src": "14591:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 745, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14591:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 748, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14600:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "14591:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14620:3:0", + "subExpression": { + "argumentTypes": null, + "id": 752, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "14620:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 754, + "nodeType": "ExpressionStatement", + "src": "14620:3:0" + }, + "nodeType": "ForStatement", + "src": "14586:446:0" + } + ] + }, + "documentation": "@notice Claims the darknode reward for all registered tokens into\n darknodeBalances in the DarknodePaymentStore.\n Rewards can only be claimed once per cycle.\n\n /// @param _darknode The address to the darknode to claim rewards for", + "id": 794, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_claimDarknodeReward", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 720, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 719, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 794, + "src": "14356:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 718, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14356:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14355:19:0" + }, + "returnParameters": { + "id": 721, + "nodeType": "ParameterList", + "parameters": [], + "src": "14383:0:0" + }, + "scope": 948, + "src": "14326:712:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 837, + "nodeType": "Block", + "src": "15263:391:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 799, + "name": "shareCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "15277:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15291:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15277:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 835, + "nodeType": "Block", + "src": "15403:245:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 815, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "15491:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 817, + "indexExpression": { + "argumentTypes": null, + "id": 816, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15508:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15491:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 820, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15541:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 818, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "15518:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + }, + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "availableBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1075, + "src": "15518:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15518:30:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15491:57:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 823, + "nodeType": "ExpressionStatement", + "src": "15491:57:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 824, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "15562:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 826, + "indexExpression": { + "argumentTypes": null, + "id": 825, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15587:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15562:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 831, + "name": "shareCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "15626:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 827, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "15597:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 829, + "indexExpression": { + "argumentTypes": null, + "id": 828, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15614:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15597:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 6378, + "src": "15597:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15597:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15562:75:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 834, + "nodeType": "ExpressionStatement", + "src": "15562:75:0" + } + ] + }, + "id": 836, + "nodeType": "IfStatement", + "src": "15273:375:0", + "trueBody": { + "id": 814, + "nodeType": "Block", + "src": "15294:103:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 802, + "name": "unclaimedRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "15308:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 804, + "indexExpression": { + "argumentTypes": null, + "id": 803, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15325:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15308:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15335:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15308:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 807, + "nodeType": "ExpressionStatement", + "src": "15308:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 808, + "name": "previousCycleRewardShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "15350:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 810, + "indexExpression": { + "argumentTypes": null, + "id": 809, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "15375:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15350:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15385:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15350:36:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 813, + "nodeType": "ExpressionStatement", + "src": "15350:36:0" + } + ] + } + } + ] + }, + "documentation": "@notice Snapshots the current balance of the tokens, for all registered\n tokens.\n\n /// @param _token The address the token to snapshot.", + "id": 838, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_snapshotBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 797, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 796, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 838, + "src": "15239:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15239:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15238:16:0" + }, + "returnParameters": { + "id": 798, + "nodeType": "ParameterList", + "parameters": [], + "src": "15263:0:0" + }, + "scope": 948, + "src": "15213:441:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 896, + "nodeType": "Block", + "src": "15880:638:0", + "statements": [ + { + "assignments": [ + 844 + ], + "declarations": [ + { + "constant": false, + "id": 844, + "name": "lastToken", + "nodeType": "VariableDeclaration", + "scope": 896, + "src": "15890:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 843, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15890:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 852, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 845, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "15910:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15955:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 846, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "15927:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15927:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "15927:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15927:30:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15910:48:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15890:68:0" + }, + { + "assignments": [ + 854 + ], + "declarations": [ + { + "constant": false, + "id": 854, + "name": "deletedTokenIndex", + "nodeType": "VariableDeclaration", + "scope": 896, + "src": "15968:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 853, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 861, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16029:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 855, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "15996:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 857, + "indexExpression": { + "argumentTypes": null, + "id": 856, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "16017:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15996:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "15996:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15996:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15968:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 862, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "16115:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 864, + "indexExpression": { + "argumentTypes": null, + "id": 863, + "name": "deletedTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "16132:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16115:35:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 865, + "name": "lastToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "16153:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16115:47:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 867, + "nodeType": "ExpressionStatement", + "src": "16115:47:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 868, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "16172:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 870, + "indexExpression": { + "argumentTypes": null, + "id": 869, + "name": "lastToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "16193:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16172:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 871, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "16206:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 873, + "indexExpression": { + "argumentTypes": null, + "id": 872, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "16227:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16206:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16172:62:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 875, + "nodeType": "ExpressionStatement", + "src": "16172:62:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "16369:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 878, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16369:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16423:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 879, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "16395:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 880, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16395:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "16395:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16395:30:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16369:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 885, + "nodeType": "ExpressionStatement", + "src": "16369:56:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "16435:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 888, + "indexExpression": { + "argumentTypes": null, + "id": 887, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "16456:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16435:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16466:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16435:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 891, + "nodeType": "ExpressionStatement", + "src": "16435:32:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 893, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "16504:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 892, + "name": "LogTokenDeregistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "16483:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16483:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 895, + "nodeType": "EmitStatement", + "src": "16478:33:0" + } + ] + }, + "documentation": "@notice Deregisters a token, removing it from the list of\n registeredTokens.\n\n /// @param _token The address of the token to deregister.", + "id": 897, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_deregisterToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 840, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 897, + "src": "15856:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 839, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15856:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15855:16:0" + }, + "returnParameters": { + "id": 842, + "nodeType": "ParameterList", + "parameters": [], + "src": "15880:0:0" + }, + "scope": 948, + "src": "15830:688:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 946, + "nodeType": "Block", + "src": "16743:375:0", + "statements": [ + { + "assignments": [ + 901 + ], + "declarations": [ + { + "constant": false, + "id": 901, + "name": "arrayLength", + "nodeType": "VariableDeclaration", + "scope": 946, + "src": "16780:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 900, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "16780:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 904, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 902, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "16799:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 903, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16799:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16780:39:0" + }, + { + "body": { + "id": 938, + "nodeType": "Block", + "src": "16868:210:0", + "statements": [ + { + "assignments": [ + 916 + ], + "declarations": [ + { + "constant": false, + "id": 916, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 938, + "src": "16882:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16882:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 920, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 917, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "16898:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 919, + "indexExpression": { + "argumentTypes": null, + "id": 918, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "16912:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16898:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16882:32:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 924, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 916, + "src": "16950:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 921, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "16928:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16928:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16928:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 926, + "nodeType": "ExpressionStatement", + "src": "16928:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 927, + "name": "registeredTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "16970:20:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 929, + "indexExpression": { + "argumentTypes": null, + "id": 928, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 916, + "src": "16991:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16970:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 930, + "name": "registeredTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "17000:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 931, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17000:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16970:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 933, + "nodeType": "ExpressionStatement", + "src": "16970:53:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 935, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 916, + "src": "17061:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 934, + "name": "LogTokenRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "17042:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17042:25:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 937, + "nodeType": "EmitStatement", + "src": "17037:30:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 909, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "16846:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 910, + "name": "arrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 901, + "src": "16850:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16846:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 939, + "initializationExpression": { + "assignments": [ + 906 + ], + "declarations": [ + { + "constant": false, + "id": 906, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 939, + "src": "16834:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 905, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "16834:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 908, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16843:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "16834:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "16863:3:0", + "subExpression": { + "argumentTypes": null, + "id": 912, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "16863:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 914, + "nodeType": "ExpressionStatement", + "src": "16863:3:0" + }, + "nodeType": "ForStatement", + "src": "16829:249:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 940, + "name": "pendingTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "17087:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17110:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17087:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "nodeType": "ExpressionStatement", + "src": "17087:24:0" + } + ] + }, + "documentation": "@notice Updates the list of registeredTokens adding tokens that are to be registered.\n The list of tokens that are pending registration are emptied afterwards.", + "id": 947, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_updateTokenList", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 898, + "nodeType": "ParameterList", + "parameters": [], + "src": "16732:2:0" + }, + "returnParameters": { + "id": 899, + "nodeType": "ParameterList", + "parameters": [], + "src": "16743:0:0" + }, + "scope": 948, + "src": "16707:411:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + } + ], + "scope": 949, + "src": "458:16663:0" + } + ], + "src": "0:17122:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0xd2b847810d644004679c7a8d5f5188fe2b12b6f34dba8501760d99232fa9b7bc": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknode", + "type": "address" + }, + { + "indexed": false, + "name": "_time", + "type": "uint256" + } + ], + "name": "LogDarknodeBlacklisted", + "type": "event", + "signature": "0xd2b847810d644004679c7a8d5f5188fe2b12b6f34dba8501760d99232fa9b7bc" + }, + "0x7634be097aa1800f447c3ae3ffe9444f1bc44a98bd2c1e986c1883f9f645f2b6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknode", + "type": "address" + }, + { + "indexed": false, + "name": "_time", + "type": "uint256" + } + ], + "name": "LogDarknodeWhitelisted", + "type": "event", + "signature": "0x7634be097aa1800f447c3ae3ffe9444f1bc44a98bd2c1e986c1883f9f645f2b6" + }, + "0x99c5ad5c5f898b30039b8cc54b8c0e6eb423e49bfc965a5999ebad131984e40d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknode", + "type": "address" + }, + { + "indexed": false, + "name": "_cycle", + "type": "uint256" + } + ], + "name": "LogDarknodeClaim", + "type": "event", + "signature": "0x99c5ad5c5f898b30039b8cc54b8c0e6eb423e49bfc965a5999ebad131984e40d" + }, + "0xea0e59b45b3d900359e312f5e429275ec827a5e4e2430e1610a1c678cd6cd2e2": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_payer", + "type": "address" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "_token", + "type": "address" + } + ], + "name": "LogPaymentReceived", + "type": "event", + "signature": "0xea0e59b45b3d900359e312f5e429275ec827a5e4e2430e1610a1c678cd6cd2e2" + }, + "0xe1f157c0881b2e477dca89772b158029611366b8e7dc8be4f6f308fa7a0aa028": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_payee", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + }, + { + "indexed": false, + "name": "_token", + "type": "address" + } + ], + "name": "LogDarknodeWithdrew", + "type": "event", + "signature": "0xe1f157c0881b2e477dca89772b158029611366b8e7dc8be4f6f308fa7a0aa028" + }, + "0x6611b6f4e1fb92277f863eca934cba1c2d6987070d73762b72b942720bfe43a2": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_newCycle", + "type": "uint256" + }, + { + "indexed": false, + "name": "_lastCycle", + "type": "uint256" + }, + { + "indexed": false, + "name": "_cycleTimeout", + "type": "uint256" + } + ], + "name": "LogNewCycle", + "type": "event", + "signature": "0x6611b6f4e1fb92277f863eca934cba1c2d6987070d73762b72b942720bfe43a2" + }, + "0x59cbd678a801fd313f133a5efc6be7aee2814b07d41c9d9fb72f91197b2f9d4a": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_newDuration", + "type": "uint256" + }, + { + "indexed": false, + "name": "_oldDuration", + "type": "uint256" + } + ], + "name": "LogCycleDurationChanged", + "type": "event", + "signature": "0x59cbd678a801fd313f133a5efc6be7aee2814b07d41c9d9fb72f91197b2f9d4a" + }, + "0xef549604431567c0cd1b94ebc91fed6cf5cd907f6ff0b63aa1d475dcf8d4901c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_newBlacklister", + "type": "address" + }, + { + "indexed": false, + "name": "_oldBlacklister", + "type": "address" + } + ], + "name": "LogBlacklisterChanged", + "type": "event", + "signature": "0xef549604431567c0cd1b94ebc91fed6cf5cd907f6ff0b63aa1d475dcf8d4901c" + }, + "0xd780ddbc43f0c4efd61c5ca1bc8eeee3368abfb1f97aa7355da9f8bf8431c8ae": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_token", + "type": "address" + } + ], + "name": "LogTokenRegistered", + "type": "event", + "signature": "0xd780ddbc43f0c4efd61c5ca1bc8eeee3368abfb1f97aa7355da9f8bf8431c8ae" + }, + "0xe46f21bb6906b7d69a6c06d5662a2b6c1c59d134cd7b1235babdb1a70a4b436a": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_token", + "type": "address" + } + ], + "name": "LogTokenDeregistered", + "type": "event", + "signature": "0xe46f21bb6906b7d69a6c06d5662a2b6c1c59d134cd7b1235babdb1a70a4b436a" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + } + }, + "links": {}, + "address": "0x1f1b1d015Fc31d425C616cC35E39e31686DA69A8", + "transactionHash": "0x5f7e43c81b2aeaeccf13db7a15fd77a86b16917f90ccf7a68c048b0caa3823e5" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:21:48.641Z", + "devdoc": { + "methods": { + "blacklist(address)": { + "params": { + "_darknode": "The address of the darknode to blacklist" + } + }, + "claim(address)": { + "params": { + "_darknode": "The address of the darknode to claim" + } + }, + "constructor": { + "params": { + "_VERSION": "A string defining the contract version.", + "_cycleDurationSeconds": "The minimum time before a new cycle can occur in seconds", + "_darknodePaymentStore": "The address of the DarknodePaymentStore contract", + "_darknodeRegistry": "The address of the DarknodeRegistry contract" + } + }, + "deposit(uint256,address)": { + "params": { + "_token": "The token address", + "_value": "The amount of token deposit in the token's smallest unit." + } + }, + "deregisterToken(address)": { + "params": { + "_token": "The address of the token to be deregistered." + } + }, + "isOwner()": { + "details": "Returns true if the caller is the current owner." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "registerToken(address)": { + "params": { + "_token": "The address of the token to be registered." + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "transferStoreOwnership(address)": { + "params": { + "_newOwner": "The address to transfer the ownership to." + } + }, + "updateBlacklister(address)": { + "params": { + "_addr": "The new Blacklister contract address." + } + }, + "updateCycleDuration(uint256)": { + "params": { + "_durationSeconds": "The amount of time (in seconds) that should have passed before a new cycle can be called." + } + }, + "withdraw(address,address)": { + "params": { + "_darknode": "The address of the darknode", + "_token": "Which token to transfer" + } + } + } + }, + "userdoc": { + "methods": { + "blacklist(address)": { + "notice": "Blacklists a darknode from participating in rewards. " + }, + "changeCycle()": { + "notice": "Changes the current cycle." + }, + "claim(address)": { + "notice": "Claims the rewards allocated to the darknode last cycle and increments the darknode balances. Whitelists the darknode if it hasn't already been whitelisted. If a darknode does not call claim() then the rewards for the previous cycle is lost. " + }, + "claimStoreOwnership()": { + "notice": "Claims ownership of the store passed in to the constructor. `transferStoreOwnership` must have previously been called when transferring from another DarknodePaymentStore." + }, + "constructor": "The contract constructor. Starts the current cycle using the time of deploy. ", + "currentCycleRewardPool(address)": { + "notice": "The current balance of the contract available as reward for the current cycle" + }, + "deposit(uint256,address)": { + "notice": "Deposits token into the contract to be paid to the Darknodes " + }, + "deregisterToken(address)": { + "notice": "Removes a token from the list of supported tokens. Deregistration is pending until next cycle. " + }, + "registerToken(address)": { + "notice": "Adds tokens to be payable. Registration is pending until next cycle. " + }, + "transferStoreOwnership(address)": { + "notice": "Allows the contract owner to initiate an ownership transfer of the DarknodePaymentStore. " + }, + "updateBlacklister(address)": { + "notice": "Updates the Blacklister contract address. " + }, + "updateCycleDuration(uint256)": { + "notice": "Updates cycle duration " + }, + "withdraw(address,address)": { + "notice": "Transfers the funds allocated to the darknode to the darknode owner. " + } + }, + "notice": "DarknodePayment is responsible for paying off darknodes for their computation." + } +} \ No newline at end of file diff --git a/build/devnet/DarknodePaymentStore.json b/build/devnet/DarknodePaymentStore.json new file mode 100644 index 00000000..46faf082 --- /dev/null +++ b/build/devnet/DarknodePaymentStore.json @@ -0,0 +1,9015 @@ +{ + "contractName": "DarknodePaymentStore", + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "lockedBalances", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "darknodeWhitelistLength", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "darknodeBlacklist", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "address" + } + ], + "name": "darknodeBalances", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "darknodeWhitelist", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ETHEREUM", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_VERSION", + "type": "string" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknode", + "type": "address" + } + ], + "name": "isBlacklisted", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknode", + "type": "address" + } + ], + "name": "isWhitelisted", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "totalBalance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "availableBalance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknode", + "type": "address" + } + ], + "name": "blacklist", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknode", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknode", + "type": "address" + }, + { + "name": "_token", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "incrementDarknodeBalance", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknode", + "type": "address" + }, + { + "name": "_token", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_recipient", + "type": "address" + } + ], + "name": "transfer", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedBalances\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodeWhitelistLength\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"}],\"name\":\"isWhitelisted\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"darknodeBlacklist\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"totalBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"darknodeBalances\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"darknodeWhitelist\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"}],\"name\":\"whitelist\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"availableBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"},{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"incrementDarknodeBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ETHEREUM\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"},{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"}],\"name\":\"blacklist\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknode\",\"type\":\"address\"}],\"name\":\"isBlacklisted\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_VERSION\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"availableBalance(address)\":{\"params\":{\"_token\":\"The token to check balance of\"},\"return\":\"The available balance of the contract\"},\"blacklist(address)\":{\"params\":{\"_darknode\":\"The address of the darknode to blacklist\"}},\"claimOwnership()\":{\"details\":\"Allows the pendingOwner address to finalize the transfer.\"},\"constructor\":{\"params\":{\"_VERSION\":\"A string defining the contract version.\"}},\"incrementDarknodeBalance(address,address,uint256)\":{\"params\":{\"_amount\":\"The amount that the balance should be incremented by\",\"_darknode\":\"The address of the darknode to increase balance of\",\"_token\":\"The token which the balance should be incremented\"}},\"isBlacklisted(address)\":{\"params\":{\"_darknode\":\"The address of the darknode\"},\"return\":\"true if the darknode is blacklisted\"},\"isOwner()\":{\"return\":\"true if `msg.sender` is the owner of the contract.\"},\"isWhitelisted(address)\":{\"params\":{\"_darknode\":\"The address of the darknode\"},\"return\":\"true if the darknode is whitelisted\"},\"owner()\":{\"return\":\"the address of the owner.\"},\"renounceOwnership()\":{\"details\":\"Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore.\"},\"totalBalance(address)\":{\"params\":{\"_token\":\"The token to check balance of\"},\"return\":\"The total balance of the contract\"},\"transfer(address,address,uint256,address)\":{\"params\":{\"_amount\":\"The amount to transfer\",\"_darknode\":\"The address of the darknode\",\"_recipient\":\"The address to withdraw it to\",\"_token\":\"Which token to transfer\"}},\"transferOwnership(address)\":{\"details\":\"Allows the current owner to set the pendingOwner address.\",\"params\":{\"newOwner\":\"The address to transfer ownership to.\"}},\"whitelist(address)\":{\"params\":{\"_darknode\":\"The address of the darknode to whitelist\"}}}},\"userdoc\":{\"methods\":{\"availableBalance(address)\":{\"notice\":\"Get the available balance of the contract for a particular token This is the free amount which has not yet been allocated to darknodes. \"},\"blacklist(address)\":{\"notice\":\"Blacklists a darknode from participating in reward allocation. If the darknode is whitelisted, it is removed from the whitelist and the number of whitelisted nodes is decreased. \"},\"constructor\":\"The contract constructor. \",\"incrementDarknodeBalance(address,address,uint256)\":{\"notice\":\"Increments the amount of funds allocated to a particular darknode. \"},\"isBlacklisted(address)\":{\"notice\":\"Checks to see if a darknode is blacklisted \"},\"isWhitelisted(address)\":{\"notice\":\"Checks to see if a darknode is whitelisted \"},\"renounceOwnership()\":{\"notice\":\"Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"totalBalance(address)\":{\"notice\":\"Get the total balance of the contract for a particular token \"},\"transfer(address,address,uint256,address)\":{\"notice\":\"Transfers an amount out of balance to a specified address \"},\"whitelist(address)\":{\"notice\":\"Whitelists a darknode allowing it to participate in reward allocation. \"}},\"notice\":\"DarknodePaymentStore is responsible for tracking black/whitelisted darknodes as well as the balances which have been allocated to the darknodes. It is also responsible for holding the tokens to be paid out to darknodes.\"}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePaymentStore.sol\":\"DarknodePaymentStore\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePaymentStore.sol\":{\"keccak256\":\"0x5fa14e396e45b93df54c1641ce8d0d83fa8ac3ec6679bb969b4088360e2f97d5\",\"urls\":[\"bzzr://de076428cc66269df2aa797cee62012ff56c963eeb1dfee77314731f9ea98200\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol\":{\"keccak256\":\"0xe2c22dc48cac917fa2890d5a6b6ed0e86ecf273c0d2762bdf490347012145480\",\"urls\":[\"bzzr://5cf4705abd3d66528c43d1e47f9d56e3e0e35403196762e50d15905bbb539527\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol\":{\"keccak256\":\"0x423b0630cad633c8385e457c0762a8d4b2a5028ee2e89af3f112d5f2d3a04022\",\"urls\":[\"bzzr://de7a014c67223932f191f05238df1a37fa3d325dad943787b3506f072af8e444\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol\":{\"keccak256\":\"0x815e7571a0fd9b61f8f8bf693e7891ab78bbf36b20781012ac64c12f56ef36c5\",\"urls\":[\"bzzr://8e02714dc3b3bf491d533506859802a0756b444ba1b06b6ff64184a723f8697b\"]},\"/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol\":{\"keccak256\":\"0x574c593875a7afc210e709573a4d46d6ad6ea60d348ade04692149aae68a85da\",\"urls\":[\"bzzr://6216d6c45babda33bf82905fd7384368d9529b6e572f435c2a217bd7634467e9\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/CompatibleERC20Functions.sol\":{\"keccak256\":\"0xb9e38917912b1ff2e0a1d6996636170c0af89fb412d4168a5dfa6c9a55b2f71a\",\"urls\":[\"bzzr://238d0af72f2ac122a434f414df1707630b5a07fee0e042fdf94b97f202f34ac0\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/LinkedList.sol\":{\"keccak256\":\"0x318273ca74f037e14739675b74e3538fa6d08ff412869f1931aacd351d35bdcc\",\"urls\":[\"bzzr://2174bf7bb80a3ed2d366ac0041168e2478c5b0a65b9a8aeaf99a0058e3021f53\"]},\"openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb\",\"urls\":[\"bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad\"]},\"openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0xf6826c684d51ca28db5293ce11a54c5cca1c757b6cd32b87613833c65086f995\",\"urls\":[\"bzzr://01b2756ab5b41b1d7ccadfeac53fbdce9c889263f1e011329c300c5fa3fda65f\"]},\"openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x609f8cb524cd6b502624c79c099ec2fc6f23eef57b5c38e28efd82490875f37e\",\"urls\":[\"bzzr://46ee461a64298ef418bd100df1301355f4dc9ffeb06fe7a39aaf98d45c0bf988\"]},\"openzeppelin-solidity/contracts/math/Math.sol\":{\"keccak256\":\"0x4b5aa451e4e8801478708f94b118a7821c0500d676255eaf89fc78c14856ce4e\",\"urls\":[\"bzzr://200d5728b32858918810d8d7a8db1406ee9b157ad5026f050e6d864a696b9080\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xf79fb10e8235770eb4aea7249034076a3cc9f9119ad944fc48705bae9c9d20dc\",\"urls\":[\"bzzr://d12a11272051eb6586de8f7e0a82c04a98c9984ce8b2a6cf1ee439f65aba29a9\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa5ebf3344a36eb60e723e0764d85251c496e15e4b2d737b56415502b559a1765\",\"urls\":[\"bzzr://68812cb0a1d373d12c6986f5a9314c9bae7891a07a0e301d2317fcf409102f54\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0xc4973487824e5855e78e27d685b387566df52ea4b0854ba60b8703b533de47d4\",\"urls\":[\"bzzr://299d2f2c37a1b0cc8b15927fc516cc7f8a8f48e246512b3b3880bd3e4f0220d4\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]},\"openzeppelin-solidity/contracts/utils/Address.sol\":{\"keccak256\":\"0xf3358e5819ca73357abd6c90bdfffd0474af54364897f6b3e3234c4b71fbe9a1\",\"urls\":[\"bzzr://f7f6da60a184233fd666ac44e6fb2bd51ca6ebdc4867a310d368049aa4e62786\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620013a7380380620013a7833981018060405260208110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b5050600180546001600160a01b0319163317908190556040519194506001600160a01b03169250600091507f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38051620000e4906002906020840190620000ec565b505062000191565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200012f57805160ff19168380011785556200015f565b828001600101855582156200015f579182015b828111156200015f57825182559160200191906001019062000142565b506200016d92915062000171565b5090565b6200018e91905b808211156200016d576000815560010162000178565b90565b61120680620001a16000396000f3fe60806040526004361061011f5760003560e01c80639a4d6f3b116100a0578063f7cdf47c11610064578063f7cdf47c146103e2578063f9ce7813146103f7578063f9f92be414610440578063fe575a8714610473578063ffa1ad74146104a65761011f565b80639a4d6f3b146102d35780639b19251a14610306578063a0821be314610339578063d23b90a51461036c578063f2fde38b146103af5761011f565b80636eacd398116100e75780636eacd3981461020a57806370324b771461023d578063715018a6146102785780638da5cb5b1461028d5780638f32d59b146102be5761011f565b80630483a7f6146101215780631fc6fe8e146101665780633af32abf1461017b5780634c89d726146101c25780634e71e0c8146101f5575b005b34801561012d57600080fd5b506101546004803603602081101561014457600080fd5b50356001600160a01b0316610530565b60408051918252519081900360200190f35b34801561017257600080fd5b50610154610542565b34801561018757600080fd5b506101ae6004803603602081101561019e57600080fd5b50356001600160a01b0316610548565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b50610154600480360360208110156101e557600080fd5b50356001600160a01b0316610569565b34801561020157600080fd5b5061011f61057b565b34801561021657600080fd5b506101546004803603602081101561022d57600080fd5b50356001600160a01b0316610642565b34801561024957600080fd5b506101546004803603604081101561026057600080fd5b506001600160a01b03813581169160200135166106ed565b34801561028457600080fd5b5061011f61070a565b34801561029957600080fd5b506102a26107a3565b604080516001600160a01b039092168252519081900360200190f35b3480156102ca57600080fd5b506101ae6107b2565b3480156102df57600080fd5b50610154600480360360208110156102f657600080fd5b50356001600160a01b03166107c3565b34801561031257600080fd5b5061011f6004803603602081101561032957600080fd5b50356001600160a01b03166107d5565b34801561034557600080fd5b506101546004803603602081101561035c57600080fd5b50356001600160a01b0316610905565b34801561037857600080fd5b5061011f6004803603606081101561038f57600080fd5b506001600160a01b0381358116916020810135909116906040013561093d565b3480156103bb57600080fd5b5061011f600480360360208110156103d257600080fd5b50356001600160a01b0316610ade565b3480156103ee57600080fd5b506102a2610b4f565b34801561040357600080fd5b5061011f6004803603608081101561041a57600080fd5b506001600160a01b03813581169160208101358216916040820135916060013516610b67565b34801561044c57600080fd5b5061011f6004803603602081101561046357600080fd5b50356001600160a01b0316610d3f565b34801561047f57600080fd5b506101ae6004803603602081101561049657600080fd5b50356001600160a01b0316610e49565b3480156104b257600080fd5b506104bb610e66565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104f55781810151838201526020016104dd565b50505050905090810190601f1680156105225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60056020526000908152604090205481565b60035481565b6001600160a01b03811660009081526007602052604090205415155b919050565b60066020526000908152604090205481565b6000546001600160a01b031633146105dd5760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b600080546001546040516001600160a01b039283169392909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600180546001600160a01b03199081166001600160a01b03841617909155169055565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561067157503031610564565b60408051600160e01b6370a0823102815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b1580156106ba57600080fd5b505afa1580156106ce573d6000803e3d6000fd5b505050506040513d60208110156106e457600080fd5b50519050610564565b600460209081526000928352604080842090915290825290205481565b6107126107b2565b6107595760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6001546001600160a01b031690565b6001546001600160a01b0316331490565b60076020526000908152604090205481565b6107dd6107b2565b6108245760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b61082d81610e49565b156108825760408051600160e51b62461bcd02815260206004820152601760248201527f6461726b6e6f646520697320626c61636b6c6973746564000000000000000000604482015290519081900360640190fd5b61088b81610548565b156108e05760408051600160e51b62461bcd02815260206004820152601c60248201527f6461726b6e6f646520616c72656164792077686974656c697374656400000000604482015290519081900360640190fd5b6001600160a01b03166000908152600760205260409020429055600380546001019055565b6001600160a01b0381166000908152600560205260408120546109379061092b84610642565b9063ffffffff610ef116565b92915050565b6109456107b2565b61098c5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600081116109e45760408051600160e51b62461bcd02815260206004820152600e60248201527f696e76616c696420616d6f756e74000000000000000000000000000000000000604482015290519081900360640190fd5b806109ee83610905565b1015610a445760408051600160e51b62461bcd02815260206004820152601d60248201527f696e73756666696369656e7420636f6e74726163742062616c616e6365000000604482015290519081900360640190fd5b6001600160a01b03808416600090815260046020908152604080832093861683529290522054610a7a908263ffffffff610f5116565b6001600160a01b0380851660009081526004602090815260408083209387168352928152828220939093556005909252902054610abd908263ffffffff610f5116565b6001600160a01b039092166000908152600560205260409020919091555050565b610ae66107b2565b610b2d5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b610b6f6107b2565b610bb65760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6001600160a01b03808516600090815260046020908152604080832093871683529290522054821115610c335760408051600160e51b62461bcd02815260206004820152601d60248201527f696e73756666696369656e74206461726b6e6f64652062616c616e6365000000604482015290519081900360640190fd5b6001600160a01b03808516600090815260046020908152604080832093871683529290522054610c69908363ffffffff610ef116565b6001600160a01b0380861660009081526004602090815260408083209388168352928152828220939093556005909252902054610cac908363ffffffff610ef116565b6001600160a01b03841660008181526005602052604090209190915573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610d1f576040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610d19573d6000803e3d6000fd5b50610d39565b610d396001600160a01b038416828463ffffffff610fb516565b50505050565b610d476107b2565b610d8e5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b610d9781610e49565b15610dec5760408051600160e51b62461bcd02815260206004820152601c60248201527f6461726b6e6f646520616c726561647920626c61636b6c697374656400000000604482015290519081900360640190fd5b6001600160a01b0381166000908152600660205260409020429055610e1081610548565b15610e46576001600160a01b038116600090815260076020526040812055600354610e4290600163ffffffff610ef116565b6003555b50565b6001600160a01b0316600090815260066020526040902054151590565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610ee95780601f10610ebe57610100808354040283529160200191610ee9565b820191906000526020600020905b815481529060010190602001808311610ecc57829003601f168201915b505050505081565b600082821115610f4b5760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610fae5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0316600160e01b63a9059cbb0217905261100a90849061100f565b505050565b611021826001600160a01b03166111d4565b6110755760408051600160e51b62461bcd02815260206004820152600f60248201527f746f6b656e206e6f7420666f756e640000000000000000000000000000000000604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106110b35780518252601f199092019160209182019101611094565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611115576040519150601f19603f3d011682016040523d82523d6000602084013e61111a565b606091505b50915091508161116b5760408051600160e51b62461bcd02815260206004820152601160248201526001607a1b701d1bdad95b8818d85b1b0819985a5b195902604482015290519081900360640190fd5b805115610d395780806020019051602081101561118757600080fd5b5051610d395760408051600160e51b62461bcd02815260206004820152601160248201526001607a1b701d1bdad95b8818d85b1b0819985a5b195902604482015290519081900360640190fd5b3b15159056fea165627a7a723058203788d1588fc781d2ed5f553981e0ed257a14d31609de51f6e3666d232cbe5f090029", + "deployedBytecode": "0x60806040526004361061011f5760003560e01c80639a4d6f3b116100a0578063f7cdf47c11610064578063f7cdf47c146103e2578063f9ce7813146103f7578063f9f92be414610440578063fe575a8714610473578063ffa1ad74146104a65761011f565b80639a4d6f3b146102d35780639b19251a14610306578063a0821be314610339578063d23b90a51461036c578063f2fde38b146103af5761011f565b80636eacd398116100e75780636eacd3981461020a57806370324b771461023d578063715018a6146102785780638da5cb5b1461028d5780638f32d59b146102be5761011f565b80630483a7f6146101215780631fc6fe8e146101665780633af32abf1461017b5780634c89d726146101c25780634e71e0c8146101f5575b005b34801561012d57600080fd5b506101546004803603602081101561014457600080fd5b50356001600160a01b0316610530565b60408051918252519081900360200190f35b34801561017257600080fd5b50610154610542565b34801561018757600080fd5b506101ae6004803603602081101561019e57600080fd5b50356001600160a01b0316610548565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b50610154600480360360208110156101e557600080fd5b50356001600160a01b0316610569565b34801561020157600080fd5b5061011f61057b565b34801561021657600080fd5b506101546004803603602081101561022d57600080fd5b50356001600160a01b0316610642565b34801561024957600080fd5b506101546004803603604081101561026057600080fd5b506001600160a01b03813581169160200135166106ed565b34801561028457600080fd5b5061011f61070a565b34801561029957600080fd5b506102a26107a3565b604080516001600160a01b039092168252519081900360200190f35b3480156102ca57600080fd5b506101ae6107b2565b3480156102df57600080fd5b50610154600480360360208110156102f657600080fd5b50356001600160a01b03166107c3565b34801561031257600080fd5b5061011f6004803603602081101561032957600080fd5b50356001600160a01b03166107d5565b34801561034557600080fd5b506101546004803603602081101561035c57600080fd5b50356001600160a01b0316610905565b34801561037857600080fd5b5061011f6004803603606081101561038f57600080fd5b506001600160a01b0381358116916020810135909116906040013561093d565b3480156103bb57600080fd5b5061011f600480360360208110156103d257600080fd5b50356001600160a01b0316610ade565b3480156103ee57600080fd5b506102a2610b4f565b34801561040357600080fd5b5061011f6004803603608081101561041a57600080fd5b506001600160a01b03813581169160208101358216916040820135916060013516610b67565b34801561044c57600080fd5b5061011f6004803603602081101561046357600080fd5b50356001600160a01b0316610d3f565b34801561047f57600080fd5b506101ae6004803603602081101561049657600080fd5b50356001600160a01b0316610e49565b3480156104b257600080fd5b506104bb610e66565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104f55781810151838201526020016104dd565b50505050905090810190601f1680156105225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60056020526000908152604090205481565b60035481565b6001600160a01b03811660009081526007602052604090205415155b919050565b60066020526000908152604090205481565b6000546001600160a01b031633146105dd5760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b600080546001546040516001600160a01b039283169392909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600180546001600160a01b03199081166001600160a01b03841617909155169055565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561067157503031610564565b60408051600160e01b6370a0823102815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b1580156106ba57600080fd5b505afa1580156106ce573d6000803e3d6000fd5b505050506040513d60208110156106e457600080fd5b50519050610564565b600460209081526000928352604080842090915290825290205481565b6107126107b2565b6107595760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6001546001600160a01b031690565b6001546001600160a01b0316331490565b60076020526000908152604090205481565b6107dd6107b2565b6108245760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b61082d81610e49565b156108825760408051600160e51b62461bcd02815260206004820152601760248201527f6461726b6e6f646520697320626c61636b6c6973746564000000000000000000604482015290519081900360640190fd5b61088b81610548565b156108e05760408051600160e51b62461bcd02815260206004820152601c60248201527f6461726b6e6f646520616c72656164792077686974656c697374656400000000604482015290519081900360640190fd5b6001600160a01b03166000908152600760205260409020429055600380546001019055565b6001600160a01b0381166000908152600560205260408120546109379061092b84610642565b9063ffffffff610ef116565b92915050565b6109456107b2565b61098c5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600081116109e45760408051600160e51b62461bcd02815260206004820152600e60248201527f696e76616c696420616d6f756e74000000000000000000000000000000000000604482015290519081900360640190fd5b806109ee83610905565b1015610a445760408051600160e51b62461bcd02815260206004820152601d60248201527f696e73756666696369656e7420636f6e74726163742062616c616e6365000000604482015290519081900360640190fd5b6001600160a01b03808416600090815260046020908152604080832093861683529290522054610a7a908263ffffffff610f5116565b6001600160a01b0380851660009081526004602090815260408083209387168352928152828220939093556005909252902054610abd908263ffffffff610f5116565b6001600160a01b039092166000908152600560205260409020919091555050565b610ae66107b2565b610b2d5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b610b6f6107b2565b610bb65760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6001600160a01b03808516600090815260046020908152604080832093871683529290522054821115610c335760408051600160e51b62461bcd02815260206004820152601d60248201527f696e73756666696369656e74206461726b6e6f64652062616c616e6365000000604482015290519081900360640190fd5b6001600160a01b03808516600090815260046020908152604080832093871683529290522054610c69908363ffffffff610ef116565b6001600160a01b0380861660009081526004602090815260408083209388168352928152828220939093556005909252902054610cac908363ffffffff610ef116565b6001600160a01b03841660008181526005602052604090209190915573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610d1f576040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610d19573d6000803e3d6000fd5b50610d39565b610d396001600160a01b038416828463ffffffff610fb516565b50505050565b610d476107b2565b610d8e5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b610d9781610e49565b15610dec5760408051600160e51b62461bcd02815260206004820152601c60248201527f6461726b6e6f646520616c726561647920626c61636b6c697374656400000000604482015290519081900360640190fd5b6001600160a01b0381166000908152600660205260409020429055610e1081610548565b15610e46576001600160a01b038116600090815260076020526040812055600354610e4290600163ffffffff610ef116565b6003555b50565b6001600160a01b0316600090815260066020526040902054151590565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610ee95780601f10610ebe57610100808354040283529160200191610ee9565b820191906000526020600020905b815481529060010190602001808311610ecc57829003601f168201915b505050505081565b600082821115610f4b5760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610fae5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0316600160e01b63a9059cbb0217905261100a90849061100f565b505050565b611021826001600160a01b03166111d4565b6110755760408051600160e51b62461bcd02815260206004820152600f60248201527f746f6b656e206e6f7420666f756e640000000000000000000000000000000000604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106110b35780518252601f199092019160209182019101611094565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611115576040519150601f19603f3d011682016040523d82523d6000602084013e61111a565b606091505b50915091508161116b5760408051600160e51b62461bcd02815260206004820152601160248201526001607a1b701d1bdad95b8818d85b1b0819985a5b195902604482015290519081900360640190fd5b805115610d395780806020019051602081101561118757600080fd5b5051610d395760408051600160e51b62461bcd02815260206004820152601160248201526001607a1b701d1bdad95b8818d85b1b0819985a5b195902604482015290519081900360640190fd5b3b15159056fea165627a7a723058203788d1588fc781d2ed5f553981e0ed257a14d31609de51f6e3666d232cbe5f090029", + "sourceMap": "559:5552:1:-;;;1561:92;8:9:-1;5:2;;;30:1;27;20:12;5:2;1561:92:1;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1561:92:1;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;;528:6:10;:19;;-1:-1:-1;;;;;;528:19:10;537:10;528:19;;;;;562:40;;1561:92:1;;-1:-1:-1;;;;;;595:6:10;;-1:-1:-1;528:6:10;;-1:-1:-1;562:40:10;;528:6;;562:40;1628:18:1;;;;:7;;:18;;;;;:::i;:::-;;1561:92;559:5552;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;559:5552:1;;;-1:-1:-1;559:5552:1;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "559:5552:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1157:49;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1157:49:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1157:49:1;-1:-1:-1;;;;;1157:49:1;;:::i;:::-;;;;;;;;;;;;;;;;929:38;;8:9:-1;5:2;;;30:1;27;20:12;5:2;929:38:1;;;:::i;2255:126::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2255:126:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2255:126:1;-1:-1:-1;;;;;2255:126:1;;:::i;:::-;;;;;;;;;;;;;;;;;;1271:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1271:52:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1271:52:1;-1:-1:-1;;;;;1271:52:1;;:::i;2146:177:10:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2146:177:10;;;:::i;2574:237:1:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2574:237:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2574:237:1;-1:-1:-1;;;;;2574:237:1;;:::i;1030:71::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1030:71:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1030:71:1;;;;;;;;;;:::i;1668:137:10:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1668:137:10;;;:::i;672:77::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;672:77:10;;;:::i;:::-;;;;-1:-1:-1;;;;;672:77:10;;;;;;;;;;;;;;1224:90;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1224:90:10;;;:::i;1388:52:1:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1388:52:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1388:52:1;-1:-1:-1;;;;;1388:52:1;;:::i;4212:303::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4212:303:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4212:303:1;-1:-1:-1;;;;;4212:303:1;;:::i;3115:144::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3115:144:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3115:144:1;-1:-1:-1;;;;;3115:144:1;;:::i;4852:414::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4852:414:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4852:414:1;;;;;;;;;;;;;;;;;:::i;1955:101:10:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1955:101:10;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1955:101:10;-1:-1:-1;;;;;1955:101:10;;:::i;803:77:1:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;803:77:1;;;:::i;5555:553::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5555:553:1;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;5555:553:1;;;;;;;;;;;;;;;;;;;;;;:::i;3565:464::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3565:464:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3565:464:1;-1:-1:-1;;;;;3565:464:1;;:::i;1951:126::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1951:126:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1951:126:1;-1:-1:-1;;;;;1951:126:1;;:::i;687:21::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;687:21:1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;687:21:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1157:49;;;;;;;;;;;;;:::o;929:38::-;;;;:::o;2255:126::-;-1:-1:-1;;;;;2341:28:1;;2318:4;2341:28;;;:17;:28;;;;;;:33;;2255:126;;;;:::o;1271:52::-;;;;;;;;;;;;;:::o;2146:177:10:-;1081:13;;-1:-1:-1;;;;;1081:13:10;1067:10;:27;1059:61;;;;;-1:-1:-1;;;;;1059:61:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;2238:13;;;;2230:6;2209:43;;-1:-1:-1;;;;;2238:13:10;;;;2230:6;;;;;2209:43;;;2269:13;;;;2260:22;;-1:-1:-1;;;;;;2260:22:10;;;-1:-1:-1;;;;;2269:13:10;;2260:22;;;;2290:26;;;2146:177::o;2574:237:1:-;2633:7;-1:-1:-1;;;;;2656:18:1;;838:42;2656:18;2652:153;;;-1:-1:-1;2705:4:1;2697:21;2690:28;;2652:153;2756:38;;;-1:-1:-1;;;;;2756:38:1;;2788:4;2756:38;;;;;;-1:-1:-1;;;;;2756:23:1;;;;;:38;;;;;;;;;;;;;;:23;:38;;;5:2:-1;;;;30:1;27;20:12;5:2;2756:38:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2756:38:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2756:38:1;;-1:-1:-1;2749:45:1;;1030:71;;;;;;;;;;;;;;;;;;;;;;;;:::o;1668:137:10:-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;1750:6;;1729:40;;1766:1;;-1:-1:-1;;;;;1750:6:10;;1729:40;;1766:1;;1729:40;1779:6;:19;;-1:-1:-1;;;;;;1779:19:10;;;1668:137::o;672:77::-;736:6;;-1:-1:-1;;;;;736:6:10;672:77;:::o;1224:90::-;1301:6;;-1:-1:-1;;;;;1301:6:10;1287:10;:20;;1224:90::o;1388:52:1:-;;;;;;;;;;;;;:::o;4212:303::-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;4288:24:1;4302:9;4288:13;:24::i;:::-;4287:25;4279:61;;;;;-1:-1:-1;;;;;4279:61:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;4359:24;4373:9;4359:13;:24::i;:::-;4358:25;4350:66;;;;;-1:-1:-1;;;;;4350:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4427:28:1;;;;;:17;:28;;;;;4458:15;4427:46;;4483:23;:25;;;;;;4212:303::o;3115:144::-;-1:-1:-1;;;;;3229:22:1;;3178:7;3229:22;;;:14;:22;;;;;;3204:48;;:20;3244:6;3204:12;:20::i;:::-;:24;:48;:24;:48;:::i;:::-;3197:55;3115:144;-1:-1:-1;;3115:144:1:o;4852:414::-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;4985:1:1;4975:7;:11;4967:38;;;;;-1:-1:-1;;;;;4967:38:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;5051:7;5023:24;5040:6;5023:16;:24::i;:::-;:35;;5015:77;;;;;-1:-1:-1;;;;;5015:77:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5141:27:1;;;;;;;:16;:27;;;;;;;;:35;;;;;;;;;;:48;;5181:7;5141:48;:39;:48;:::i;:::-;-1:-1:-1;;;;;5103:27:1;;;;;;;:16;:27;;;;;;;;:35;;;;;;;;;;;:86;;;;5224:14;:22;;;;;;:35;;5251:7;5224:35;:26;:35;:::i;:::-;-1:-1:-1;;;;;5199:22:1;;;;;;;:14;:22;;;;;:60;;;;-1:-1:-1;;4852:414:1:o;1955:101:10:-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;2025:13;:24;;-1:-1:-1;;;;;;2025:24:10;-1:-1:-1;;;;;2025:24:10;;;;;;;;;;1955:101::o;803:77:1:-;838:42;803:77;:::o;5555:553::-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;-1:-1:-1;;;;;5690:27:1;;;;;;;:16;:27;;;;;;;;:35;;;;;;;;;;:46;-1:-1:-1;5690:46:1;5682:88;;;;;-1:-1:-1;;;;;5682:88:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5818:27:1;;;;;;;:16;:27;;;;;;;;:35;;;;;;;;;;:48;;5858:7;5818:48;:39;:48;:::i;:::-;-1:-1:-1;;;;;5780:27:1;;;;;;;:16;:27;;;;;;;;:35;;;;;;;;;;;:86;;;;5901:14;:22;;;;;;:35;;5928:7;5901:35;:26;:35;:::i;:::-;-1:-1:-1;;;;;5876:22:1;;;;;;:14;:22;;;;;:60;;;;838:42;5951:18;5947:155;;;5985:28;;-1:-1:-1;;;;;5985:19:1;;;:28;;;;;6005:7;;5985:28;;;;6005:7;5985:19;:28;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5985:28:1;5947:155;;;6044:47;-1:-1:-1;;;;;6044:26:1;;6071:10;6083:7;6044:47;:26;:47;:::i;:::-;5555:553;;;;:::o;3565:464::-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;3641:24:1;3655:9;3641:13;:24::i;:::-;3640:25;3632:66;;;;;-1:-1:-1;;;;;3632:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3708:28:1;;;;;;:17;:28;;;;;3739:15;3708:46;;3805:24;3726:9;3805:13;:24::i;:::-;3801:222;;;-1:-1:-1;;;;;3845:28:1;;3876:1;3845:28;;;:17;:28;;;;;:32;3982:23;;:30;;4010:1;3982:30;:27;:30;:::i;:::-;3956:23;:56;3801:222;3565:464;:::o;1951:126::-;-1:-1:-1;;;;;2037:28:1;2014:4;2037:28;;;:17;:28;;;;;;:33;;;1951:126::o;687:21::-;;;;;;;;;;;;;;-1:-1:-1;;687:21:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1274:179:29:-;1332:7;1364:1;1359;:6;;1351:49;;;;;-1:-1:-1;;;;;1351:49:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:29;;;1274:179::o;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:29:o;944:174:12:-;1052:58;;;-1:-1:-1;;;;;1052:58:12;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1052:58:12;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;;;179:29;160:49;;1026:85:12;;1045:5;;1026:18;:85::i;:::-;944:174;;;:::o;3398:930::-;3941:27;3949:5;-1:-1:-1;;;;;3941:25:12;;:27::i;:::-;3933:55;;;;;-1:-1:-1;;;;;3933:55:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;4059:12;4073:23;4108:5;-1:-1:-1;;;;;4100:19:12;4120:4;4100:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;4100:25:12;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;4058:67:12;;;;4143:7;4135:37;;;;;-1:-1:-1;;;;;4135:37:12;;;;;;;;;;;;-1:-1:-1;;;;;4135:37:12;;;;;;;;;;;;;;;4187:17;;:21;4183:139;;4270:10;4259:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4259:30:12;4251:60;;;;;-1:-1:-1;;;;;4251:60:12;;;;;;;;;;;;-1:-1:-1;;;;;4251:60:12;;;;;;;;;;;;;;542:413:36;902:20;940:8;;;542:413::o", + "source": "pragma solidity ^0.5.8;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\n\nimport \"../libraries/Claimable.sol\";\nimport \"../libraries/CompatibleERC20Functions.sol\";\nimport \"../DarknodeRegistry/DarknodeRegistry.sol\";\n\n/// @notice DarknodePaymentStore is responsible for tracking black/whitelisted\n/// darknodes as well as the balances which have been allocated to the\n/// darknodes. It is also responsible for holding the tokens to be paid\n/// out to darknodes.\ncontract DarknodePaymentStore is Claimable {\n using SafeMath for uint256;\n using CompatibleERC20Functions for ERC20;\n\n string public VERSION; // Passed in as a constructor parameter.\n\n /// @notice The special address for Ether.\n address constant public ETHEREUM = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n /// @notice The size of the whitelist\n uint256 public darknodeWhitelistLength;\n\n /// @notice Mapping of darknode -> token -> balance\n mapping(address => mapping(address => uint256)) public darknodeBalances;\n\n /// @notice Mapping of token -> lockedAmount\n mapping(address => uint256) public lockedBalances;\n\n /// @notice mapping of darknode -> blacklistTimestamp\n mapping(address => uint256) public darknodeBlacklist;\n\n /// @notice mapping of darknode -> whitelistTimestamp\n mapping(address => uint256) public darknodeWhitelist;\n\n /// @notice The contract constructor.\n ///\n /// @param _VERSION A string defining the contract version.\n constructor(\n string memory _VERSION\n ) public {\n VERSION = _VERSION;\n }\n\n /// @notice Allow direct payments to be made to the DarknodePaymentStore.\n function () external payable {\n }\n\n /// @notice Checks to see if a darknode is blacklisted\n ///\n /// @param _darknode The address of the darknode\n /// @return true if the darknode is blacklisted\n function isBlacklisted(address _darknode) public view returns (bool) {\n return darknodeBlacklist[_darknode] != 0;\n }\n\n /// @notice Checks to see if a darknode is whitelisted\n ///\n /// @param _darknode The address of the darknode\n /// @return true if the darknode is whitelisted\n function isWhitelisted(address _darknode) public view returns (bool) {\n return darknodeWhitelist[_darknode] != 0;\n }\n\n /// @notice Get the total balance of the contract for a particular token\n ///\n /// @param _token The token to check balance of\n /// @return The total balance of the contract\n function totalBalance(address _token) public view returns (uint256) {\n if (_token == ETHEREUM) {\n return address(this).balance;\n } else {\n return ERC20(_token).balanceOf(address(this));\n }\n }\n\n /// @notice Get the available balance of the contract for a particular token\n /// This is the free amount which has not yet been allocated to\n /// darknodes.\n ///\n /// @param _token The token to check balance of\n /// @return The available balance of the contract\n function availableBalance(address _token) public view returns (uint256) {\n return totalBalance(_token).sub(lockedBalances[_token]);\n }\n\n /// @notice Blacklists a darknode from participating in reward allocation.\n /// If the darknode is whitelisted, it is removed from the whitelist\n /// and the number of whitelisted nodes is decreased.\n ///\n /// @param _darknode The address of the darknode to blacklist\n function blacklist(address _darknode) external onlyOwner {\n require(!isBlacklisted(_darknode), \"darknode already blacklisted\");\n darknodeBlacklist[_darknode] = block.timestamp;\n\n // Unwhitelist if necessary\n if (isWhitelisted(_darknode)) {\n darknodeWhitelist[_darknode] = 0;\n // Use SafeMath when subtracting to avoid underflows\n darknodeWhitelistLength = darknodeWhitelistLength.sub(1);\n }\n }\n\n /// @notice Whitelists a darknode allowing it to participate in reward\n /// allocation.\n ///\n /// @param _darknode The address of the darknode to whitelist\n function whitelist(address _darknode) external onlyOwner {\n require(!isBlacklisted(_darknode), \"darknode is blacklisted\");\n require(!isWhitelisted(_darknode), \"darknode already whitelisted\");\n\n darknodeWhitelist[_darknode] = block.timestamp;\n darknodeWhitelistLength++;\n }\n\n /// @notice Increments the amount of funds allocated to a particular\n /// darknode.\n ///\n /// @param _darknode The address of the darknode to increase balance of\n /// @param _token The token which the balance should be incremented\n /// @param _amount The amount that the balance should be incremented by\n function incrementDarknodeBalance(address _darknode, address _token, uint256 _amount) external onlyOwner {\n require(_amount > 0, \"invalid amount\");\n require(availableBalance(_token) >= _amount, \"insufficient contract balance\");\n\n darknodeBalances[_darknode][_token] = darknodeBalances[_darknode][_token].add(_amount);\n lockedBalances[_token] = lockedBalances[_token].add(_amount);\n }\n\n /// @notice Transfers an amount out of balance to a specified address\n ///\n /// @param _darknode The address of the darknode\n /// @param _token Which token to transfer\n /// @param _amount The amount to transfer\n /// @param _recipient The address to withdraw it to\n function transfer(address _darknode, address _token, uint256 _amount, address payable _recipient) external onlyOwner {\n require(darknodeBalances[_darknode][_token] >= _amount, \"insufficient darknode balance\");\n darknodeBalances[_darknode][_token] = darknodeBalances[_darknode][_token].sub(_amount);\n lockedBalances[_token] = lockedBalances[_token].sub(_amount);\n\n if (_token == ETHEREUM) {\n _recipient.transfer(_amount);\n } else {\n ERC20(_token).safeTransfer(_recipient, _amount);\n }\n }\n\n}\n", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePaymentStore.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePaymentStore.sol", + "exportedSymbols": { + "DarknodePaymentStore": [ + 1276 + ] + }, + "id": 1277, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 950, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 951, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 6401, + "src": "25:59:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 952, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 6909, + "src": "85:63:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 953, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 3684, + "src": "150:36:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/CompatibleERC20Functions.sol", + "file": "../libraries/CompatibleERC20Functions.sol", + "id": 954, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 4038, + "src": "187:51:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol", + "file": "../DarknodeRegistry/DarknodeRegistry.sol", + "id": 955, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 2380, + "src": "239:50:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 956, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "592:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 957, + "nodeType": "InheritanceSpecifier", + "src": "592:9:1" + } + ], + "contractDependencies": [ + 3683 + ], + "contractKind": "contract", + "documentation": "@notice DarknodePaymentStore is responsible for tracking black/whitelisted\n darknodes as well as the balances which have been allocated to the\n darknodes. It is also responsible for holding the tokens to be paid\n out to darknodes.", + "fullyImplemented": true, + "id": 1276, + "linearizedBaseContracts": [ + 1276, + 3683 + ], + "name": "DarknodePaymentStore", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 960, + "libraryName": { + "contractScope": null, + "id": 958, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6400, + "src": "614:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6400", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "608:27:1", + "typeName": { + "id": 959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "627:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 963, + "libraryName": { + "contractScope": null, + "id": 961, + "name": "CompatibleERC20Functions", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4037, + "src": "646:24:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CompatibleERC20Functions_$4037", + "typeString": "library CompatibleERC20Functions" + } + }, + "nodeType": "UsingForDirective", + "src": "640:41:1", + "typeName": { + "contractScope": null, + "id": 962, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6908, + "src": "675:5:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + } + }, + { + "constant": false, + "id": 965, + "name": "VERSION", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "687:21:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 964, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "687:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 968, + "name": "ETHEREUM", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "803:77:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 966, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "803:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "838:42:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 970, + "name": "darknodeWhitelistLength", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "929:38:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 969, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "929:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 976, + "name": "darknodeBalances", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "1030:71:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 975, + "keyType": { + "id": 971, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1038:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1030:47:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 974, + "keyType": { + "id": 972, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1057:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1049:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 973, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1068:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 980, + "name": "lockedBalances", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "1157:49:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 979, + "keyType": { + "id": 977, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1165:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1157:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 978, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1176:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 984, + "name": "darknodeBlacklist", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "1271:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 983, + "keyType": { + "id": 981, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1279:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1271:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 982, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1290:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 988, + "name": "darknodeWhitelist", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "1388:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 987, + "keyType": { + "id": 985, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1396:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1388:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 986, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1407:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 997, + "nodeType": "Block", + "src": "1618:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 993, + "name": "VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 965, + "src": "1628:7:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 994, + "name": "_VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 990, + "src": "1638:8:1", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1628:18:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 996, + "nodeType": "ExpressionStatement", + "src": "1628:18:1" + } + ] + }, + "documentation": "@notice The contract constructor.\n\n /// @param _VERSION A string defining the contract version.", + "id": 998, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 990, + "name": "_VERSION", + "nodeType": "VariableDeclaration", + "scope": 998, + "src": "1582:22:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 989, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1582:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1572:38:1" + }, + "returnParameters": { + "id": 992, + "nodeType": "ParameterList", + "parameters": [], + "src": "1618:0:1" + }, + "scope": 1276, + "src": "1561:92:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1001, + "nodeType": "Block", + "src": "1766:7:1", + "statements": [] + }, + "documentation": "@notice Allow direct payments to be made to the DarknodePaymentStore.", + "id": 1002, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 999, + "nodeType": "ParameterList", + "parameters": [], + "src": "1746:2:1" + }, + "returnParameters": { + "id": 1000, + "nodeType": "ParameterList", + "parameters": [], + "src": "1766:0:1" + }, + "scope": 1276, + "src": "1737:36:1", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1015, + "nodeType": "Block", + "src": "2020:57:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1009, + "name": "darknodeBlacklist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 984, + "src": "2037:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1011, + "indexExpression": { + "argumentTypes": null, + "id": 1010, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1004, + "src": "2055:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2037:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2069:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2037:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1008, + "id": 1014, + "nodeType": "Return", + "src": "2030:40:1" + } + ] + }, + "documentation": "@notice Checks to see if a darknode is blacklisted\n\n /// @param _darknode The address of the darknode\n @return true if the darknode is blacklisted", + "id": 1016, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isBlacklisted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1005, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1004, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "1974:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1974:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1973:19:1" + }, + "returnParameters": { + "id": 1008, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1007, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "2014:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1006, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2014:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2013:6:1" + }, + "scope": 1276, + "src": "1951:126:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1029, + "nodeType": "Block", + "src": "2324:57:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1023, + "name": "darknodeWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "2341:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1025, + "indexExpression": { + "argumentTypes": null, + "id": 1024, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "2359:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2341:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2373:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2341:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1022, + "id": 1028, + "nodeType": "Return", + "src": "2334:40:1" + } + ] + }, + "documentation": "@notice Checks to see if a darknode is whitelisted\n\n /// @param _darknode The address of the darknode\n @return true if the darknode is whitelisted", + "id": 1030, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isWhitelisted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1018, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1030, + "src": "2278:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1017, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2278:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2277:19:1" + }, + "returnParameters": { + "id": 1022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1021, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1030, + "src": "2318:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1020, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2318:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2317:6:1" + }, + "scope": 1276, + "src": "2255:126:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1057, + "nodeType": "Block", + "src": "2642:169:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1037, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "2656:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1038, + "name": "ETHEREUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "2666:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2656:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1055, + "nodeType": "Block", + "src": "2735:70:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1051, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7254, + "src": "2788:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 1050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2780:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2780:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1047, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "2762:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1046, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6908, + "src": "2756:5:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$6908_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2756:13:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 6552, + "src": "2756:23:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2756:38:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1036, + "id": 1054, + "nodeType": "Return", + "src": "2749:45:1" + } + ] + }, + "id": 1056, + "nodeType": "IfStatement", + "src": "2652:153:1", + "trueBody": { + "id": 1045, + "nodeType": "Block", + "src": "2676:53:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1041, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7254, + "src": "2705:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2697:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2697:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2697:21:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1036, + "id": 1044, + "nodeType": "Return", + "src": "2690:28:1" + } + ] + } + } + ] + }, + "documentation": "@notice Get the total balance of the contract for a particular token\n\n /// @param _token The token to check balance of\n @return The total balance of the contract", + "id": 1058, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1032, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "2596:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1031, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2596:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2595:16:1" + }, + "returnParameters": { + "id": 1036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1035, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "2633:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2633:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2632:9:1" + }, + "scope": 1276, + "src": "2574:237:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1074, + "nodeType": "Block", + "src": "3187:72:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1069, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "3229:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1071, + "indexExpression": { + "argumentTypes": null, + "id": 1070, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "3244:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3229:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "3217:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1065, + "name": "totalBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "3204:12:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3204:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "3204:24:1", + "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": 1072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3204:48:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1064, + "id": 1073, + "nodeType": "Return", + "src": "3197:55:1" + } + ] + }, + "documentation": "@notice Get the available balance of the contract for a particular token\n This is the free amount which has not yet been allocated to\n darknodes.\n\n /// @param _token The token to check balance of\n @return The available balance of the contract", + "id": 1075, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "availableBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1061, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1060, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 1075, + "src": "3141:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1059, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3141:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3140:16:1" + }, + "returnParameters": { + "id": 1064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1063, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1075, + "src": "3178:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3178:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3177:9:1" + }, + "scope": 1276, + "src": "3115:144:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1115, + "nodeType": "Block", + "src": "3622:407:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3640:25:1", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1084, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "3655:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1083, + "name": "isBlacklisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "3641:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3641:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f646520616c726561647920626c61636b6c6973746564", + "id": 1087, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3667:30:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8bf796bbc77637ef3a3960205a0b11e33d0031551130b1d151519b7ff1fc2596", + "typeString": "literal_string \"darknode already blacklisted\"" + }, + "value": "darknode already blacklisted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8bf796bbc77637ef3a3960205a0b11e33d0031551130b1d151519b7ff1fc2596", + "typeString": "literal_string \"darknode already blacklisted\"" + } + ], + "id": 1082, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3632:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3632:66:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1089, + "nodeType": "ExpressionStatement", + "src": "3632:66:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1090, + "name": "darknodeBlacklist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 984, + "src": "3708:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1092, + "indexExpression": { + "argumentTypes": null, + "id": 1091, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "3726:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3708:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3739:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3739:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3708:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1096, + "nodeType": "ExpressionStatement", + "src": "3708:46:1" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1098, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "3819:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1097, + "name": "isWhitelisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1030, + "src": "3805:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3805:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1114, + "nodeType": "IfStatement", + "src": "3801:222:1", + "trueBody": { + "id": 1113, + "nodeType": "Block", + "src": "3831:192:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1100, + "name": "darknodeWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "3845:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1102, + "indexExpression": { + "argumentTypes": null, + "id": 1101, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "3863:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3845:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3876:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3845:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1105, + "nodeType": "ExpressionStatement", + "src": "3845:32:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1106, + "name": "darknodeWhitelistLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 970, + "src": "3956:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 1109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4010:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 1107, + "name": "darknodeWhitelistLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 970, + "src": "3982:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "3982:27:1", + "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": 1110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3982:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3956:56:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1112, + "nodeType": "ExpressionStatement", + "src": "3956:56:1" + } + ] + } + } + ] + }, + "documentation": "@notice Blacklists a darknode from participating in reward allocation.\n If the darknode is whitelisted, it is removed from the whitelist\n and the number of whitelisted nodes is decreased.\n\n /// @param _darknode The address of the darknode to blacklist", + "id": 1116, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1080, + "modifierName": { + "argumentTypes": null, + "id": 1079, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3612:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3612:9:1" + } + ], + "name": "blacklist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1077, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1116, + "src": "3584:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1076, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3584:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3583:19:1" + }, + "returnParameters": { + "id": 1081, + "nodeType": "ParameterList", + "parameters": [], + "src": "3622:0:1" + }, + "scope": 1276, + "src": "3565:464:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1149, + "nodeType": "Block", + "src": "4269:246:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4287:25:1", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "4302:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "isBlacklisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "4288:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4288:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f646520697320626c61636b6c6973746564", + "id": 1128, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4314:25:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b2595c93a5cd4ee60a0fc73f74d889182038841a2c576dfb52bdc225242aef77", + "typeString": "literal_string \"darknode is blacklisted\"" + }, + "value": "darknode is blacklisted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b2595c93a5cd4ee60a0fc73f74d889182038841a2c576dfb52bdc225242aef77", + "typeString": "literal_string \"darknode is blacklisted\"" + } + ], + "id": 1123, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4279:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4279:61:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1130, + "nodeType": "ExpressionStatement", + "src": "4279:61:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4358:25:1", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1133, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "4373:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1132, + "name": "isWhitelisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1030, + "src": "4359:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4359:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f646520616c72656164792077686974656c6973746564", + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4385:30:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3c82f441bfcf447ccf69d63ea6dfd26e8f4c31df97864b4bd119549a6a1276eb", + "typeString": "literal_string \"darknode already whitelisted\"" + }, + "value": "darknode already whitelisted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3c82f441bfcf447ccf69d63ea6dfd26e8f4c31df97864b4bd119549a6a1276eb", + "typeString": "literal_string \"darknode already whitelisted\"" + } + ], + "id": 1131, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4350:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4350:66:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1138, + "nodeType": "ExpressionStatement", + "src": "4350:66:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1139, + "name": "darknodeWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "4427:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1141, + "indexExpression": { + "argumentTypes": null, + "id": 1140, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "4445:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4427:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1142, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "4458:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4458:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4427:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "nodeType": "ExpressionStatement", + "src": "4427:46:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4483:25:1", + "subExpression": { + "argumentTypes": null, + "id": 1146, + "name": "darknodeWhitelistLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 970, + "src": "4483:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1148, + "nodeType": "ExpressionStatement", + "src": "4483:25:1" + } + ] + }, + "documentation": "@notice Whitelists a darknode allowing it to participate in reward\n allocation.\n\n /// @param _darknode The address of the darknode to whitelist", + "id": 1150, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1121, + "modifierName": { + "argumentTypes": null, + "id": 1120, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "4259:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4259:9:1" + } + ], + "name": "whitelist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1118, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1150, + "src": "4231:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1117, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4231:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4230:19:1" + }, + "returnParameters": { + "id": 1122, + "nodeType": "ParameterList", + "parameters": [], + "src": "4269:0:1" + }, + "scope": 1276, + "src": "4212:303:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1203, + "nodeType": "Block", + "src": "4957:309:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1162, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1156, + "src": "4975:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4985:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4975:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c696420616d6f756e74", + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4988:16:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_428d2b45bb1c86227a8688f1c30f1c359824c9298dfce034ebf8ca193afdf5e7", + "typeString": "literal_string \"invalid amount\"" + }, + "value": "invalid amount" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_428d2b45bb1c86227a8688f1c30f1c359824c9298dfce034ebf8ca193afdf5e7", + "typeString": "literal_string \"invalid amount\"" + } + ], + "id": 1161, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4967:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4967:38:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1167, + "nodeType": "ExpressionStatement", + "src": "4967:38:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1170, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5040:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1169, + "name": "availableBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1075, + "src": "5023:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5023:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1172, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1156, + "src": "5051:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5023:35:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e73756666696369656e7420636f6e74726163742062616c616e6365", + "id": 1174, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5060:31:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d935e7c0470379b3a15e8821deb9bf7c4aa66e96937ceb6b3e245f4dd48b9a8a", + "typeString": "literal_string \"insufficient contract balance\"" + }, + "value": "insufficient contract balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d935e7c0470379b3a15e8821deb9bf7c4aa66e96937ceb6b3e245f4dd48b9a8a", + "typeString": "literal_string \"insufficient contract balance\"" + } + ], + "id": 1168, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5015:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5015:77:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1176, + "nodeType": "ExpressionStatement", + "src": "5015:77:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1177, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5103:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1180, + "indexExpression": { + "argumentTypes": null, + "id": 1178, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1152, + "src": "5120:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5103:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1181, + "indexExpression": { + "argumentTypes": null, + "id": 1179, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5131:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5103:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1156, + "src": "5181:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1182, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5141:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1184, + "indexExpression": { + "argumentTypes": null, + "id": 1183, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1152, + "src": "5158:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5141:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1186, + "indexExpression": { + "argumentTypes": null, + "id": 1185, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5169:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5141:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "5141:39:1", + "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": 1189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5141:48:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5103:86:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1191, + "nodeType": "ExpressionStatement", + "src": "5103:86:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1192, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "5199:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1194, + "indexExpression": { + "argumentTypes": null, + "id": 1193, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5214:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5199:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1199, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1156, + "src": "5251:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1195, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "5224:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1197, + "indexExpression": { + "argumentTypes": null, + "id": 1196, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5239:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5224:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "5224:26:1", + "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": 1200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5224:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5199:60:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1202, + "nodeType": "ExpressionStatement", + "src": "5199:60:1" + } + ] + }, + "documentation": "@notice Increments the amount of funds allocated to a particular\n darknode.\n\n /// @param _darknode The address of the darknode to increase balance of\n @param _token The token which the balance should be incremented\n @param _amount The amount that the balance should be incremented by", + "id": 1204, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1159, + "modifierName": { + "argumentTypes": null, + "id": 1158, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "4947:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4947:9:1" + } + ], + "name": "incrementDarknodeBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1152, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1204, + "src": "4886:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4886:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1154, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 1204, + "src": "4905:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4905:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1156, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1204, + "src": "4921:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4885:52:1" + }, + "returnParameters": { + "id": 1160, + "nodeType": "ParameterList", + "parameters": [], + "src": "4957:0:1" + }, + "scope": 1276, + "src": "4852:414:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1274, + "nodeType": "Block", + "src": "5672:436:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1218, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5690:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1220, + "indexExpression": { + "argumentTypes": null, + "id": 1219, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "5707:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5690:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1222, + "indexExpression": { + "argumentTypes": null, + "id": 1221, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5718:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5690:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1223, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "5729:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5690:46:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e73756666696369656e74206461726b6e6f64652062616c616e6365", + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5738:31:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_de295ef840beb4facbe6f674ee7b43fcfa29fb2fdeef87efb3e03c3633e266fc", + "typeString": "literal_string \"insufficient darknode balance\"" + }, + "value": "insufficient darknode balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_de295ef840beb4facbe6f674ee7b43fcfa29fb2fdeef87efb3e03c3633e266fc", + "typeString": "literal_string \"insufficient darknode balance\"" + } + ], + "id": 1217, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5682:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5682:88:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1227, + "nodeType": "ExpressionStatement", + "src": "5682:88:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1228, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5780:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1231, + "indexExpression": { + "argumentTypes": null, + "id": 1229, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "5797:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5780:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1232, + "indexExpression": { + "argumentTypes": null, + "id": 1230, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5808:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5780:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1239, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "5858:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1233, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5818:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1235, + "indexExpression": { + "argumentTypes": null, + "id": 1234, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "5835:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5818:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1237, + "indexExpression": { + "argumentTypes": null, + "id": 1236, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5846:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5818:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "5818:39:1", + "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": 1240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5818:48:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5780:86:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1242, + "nodeType": "ExpressionStatement", + "src": "5780:86:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1243, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "5876:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1245, + "indexExpression": { + "argumentTypes": null, + "id": 1244, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5891:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5876:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1250, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "5928:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1246, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "5901:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1248, + "indexExpression": { + "argumentTypes": null, + "id": 1247, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5916:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5901:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "5901:26:1", + "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": 1251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5901:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5876:60:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1253, + "nodeType": "ExpressionStatement", + "src": "5876:60:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1254, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5951:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1255, + "name": "ETHEREUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "5961:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5951:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1272, + "nodeType": "Block", + "src": "6030:72:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1268, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "6071:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1269, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "6083:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1265, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "6050:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1264, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6908, + "src": "6044:5:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$6908_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 1266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6044:13:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 1267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3780, + "src": "6044:26:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7168_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$7168_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6044:47:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1271, + "nodeType": "ExpressionStatement", + "src": "6044:47:1" + } + ] + }, + "id": 1273, + "nodeType": "IfStatement", + "src": "5947:155:1", + "trueBody": { + "id": 1263, + "nodeType": "Block", + "src": "5971:53:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1260, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "6005:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1257, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "5985:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5985:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5985:28:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1262, + "nodeType": "ExpressionStatement", + "src": "5985:28:1" + } + ] + } + } + ] + }, + "documentation": "@notice Transfers an amount out of balance to a specified address\n\n /// @param _darknode The address of the darknode\n @param _token Which token to transfer\n @param _amount The amount to transfer\n @param _recipient The address to withdraw it to", + "id": 1275, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1215, + "modifierName": { + "argumentTypes": null, + "id": 1214, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5662:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5662:9:1" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1206, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "5573:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5573:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1208, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "5592:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1207, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5592:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1210, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "5608:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5608:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1212, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "5625:26:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5625:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5572:80:1" + }, + "returnParameters": { + "id": 1216, + "nodeType": "ParameterList", + "parameters": [], + "src": "5672:0:1" + }, + "scope": 1276, + "src": "5555:553:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 1277, + "src": "559:5552:1" + } + ], + "src": "0:6112:1" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodePayment/DarknodePaymentStore.sol", + "exportedSymbols": { + "DarknodePaymentStore": [ + 1276 + ] + }, + "id": 1277, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 950, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 951, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 6401, + "src": "25:59:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 952, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 6909, + "src": "85:63:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 953, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 3684, + "src": "150:36:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/CompatibleERC20Functions.sol", + "file": "../libraries/CompatibleERC20Functions.sol", + "id": 954, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 4038, + "src": "187:51:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol", + "file": "../DarknodeRegistry/DarknodeRegistry.sol", + "id": 955, + "nodeType": "ImportDirective", + "scope": 1277, + "sourceUnit": 2380, + "src": "239:50:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 956, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "592:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 957, + "nodeType": "InheritanceSpecifier", + "src": "592:9:1" + } + ], + "contractDependencies": [ + 3683 + ], + "contractKind": "contract", + "documentation": "@notice DarknodePaymentStore is responsible for tracking black/whitelisted\n darknodes as well as the balances which have been allocated to the\n darknodes. It is also responsible for holding the tokens to be paid\n out to darknodes.", + "fullyImplemented": true, + "id": 1276, + "linearizedBaseContracts": [ + 1276, + 3683 + ], + "name": "DarknodePaymentStore", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 960, + "libraryName": { + "contractScope": null, + "id": 958, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6400, + "src": "614:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6400", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "608:27:1", + "typeName": { + "id": 959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "627:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 963, + "libraryName": { + "contractScope": null, + "id": 961, + "name": "CompatibleERC20Functions", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4037, + "src": "646:24:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CompatibleERC20Functions_$4037", + "typeString": "library CompatibleERC20Functions" + } + }, + "nodeType": "UsingForDirective", + "src": "640:41:1", + "typeName": { + "contractScope": null, + "id": 962, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6908, + "src": "675:5:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + } + }, + { + "constant": false, + "id": 965, + "name": "VERSION", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "687:21:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 964, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "687:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 968, + "name": "ETHEREUM", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "803:77:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 966, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "803:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "838:42:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 970, + "name": "darknodeWhitelistLength", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "929:38:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 969, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "929:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 976, + "name": "darknodeBalances", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "1030:71:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 975, + "keyType": { + "id": 971, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1038:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1030:47:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 974, + "keyType": { + "id": 972, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1057:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1049:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 973, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1068:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 980, + "name": "lockedBalances", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "1157:49:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 979, + "keyType": { + "id": 977, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1165:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1157:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 978, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1176:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 984, + "name": "darknodeBlacklist", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "1271:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 983, + "keyType": { + "id": 981, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1279:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1271:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 982, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1290:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 988, + "name": "darknodeWhitelist", + "nodeType": "VariableDeclaration", + "scope": 1276, + "src": "1388:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 987, + "keyType": { + "id": 985, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1396:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1388:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 986, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1407:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 997, + "nodeType": "Block", + "src": "1618:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 993, + "name": "VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 965, + "src": "1628:7:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 994, + "name": "_VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 990, + "src": "1638:8:1", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1628:18:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 996, + "nodeType": "ExpressionStatement", + "src": "1628:18:1" + } + ] + }, + "documentation": "@notice The contract constructor.\n\n /// @param _VERSION A string defining the contract version.", + "id": 998, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 990, + "name": "_VERSION", + "nodeType": "VariableDeclaration", + "scope": 998, + "src": "1582:22:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 989, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1582:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1572:38:1" + }, + "returnParameters": { + "id": 992, + "nodeType": "ParameterList", + "parameters": [], + "src": "1618:0:1" + }, + "scope": 1276, + "src": "1561:92:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1001, + "nodeType": "Block", + "src": "1766:7:1", + "statements": [] + }, + "documentation": "@notice Allow direct payments to be made to the DarknodePaymentStore.", + "id": 1002, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 999, + "nodeType": "ParameterList", + "parameters": [], + "src": "1746:2:1" + }, + "returnParameters": { + "id": 1000, + "nodeType": "ParameterList", + "parameters": [], + "src": "1766:0:1" + }, + "scope": 1276, + "src": "1737:36:1", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1015, + "nodeType": "Block", + "src": "2020:57:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1009, + "name": "darknodeBlacklist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 984, + "src": "2037:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1011, + "indexExpression": { + "argumentTypes": null, + "id": 1010, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1004, + "src": "2055:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2037:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2069:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2037:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1008, + "id": 1014, + "nodeType": "Return", + "src": "2030:40:1" + } + ] + }, + "documentation": "@notice Checks to see if a darknode is blacklisted\n\n /// @param _darknode The address of the darknode\n @return true if the darknode is blacklisted", + "id": 1016, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isBlacklisted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1005, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1004, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "1974:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1974:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1973:19:1" + }, + "returnParameters": { + "id": 1008, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1007, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "2014:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1006, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2014:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2013:6:1" + }, + "scope": 1276, + "src": "1951:126:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1029, + "nodeType": "Block", + "src": "2324:57:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1023, + "name": "darknodeWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "2341:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1025, + "indexExpression": { + "argumentTypes": null, + "id": 1024, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1018, + "src": "2359:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2341:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2373:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2341:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1022, + "id": 1028, + "nodeType": "Return", + "src": "2334:40:1" + } + ] + }, + "documentation": "@notice Checks to see if a darknode is whitelisted\n\n /// @param _darknode The address of the darknode\n @return true if the darknode is whitelisted", + "id": 1030, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isWhitelisted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1018, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1030, + "src": "2278:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1017, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2278:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2277:19:1" + }, + "returnParameters": { + "id": 1022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1021, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1030, + "src": "2318:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1020, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2318:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2317:6:1" + }, + "scope": 1276, + "src": "2255:126:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1057, + "nodeType": "Block", + "src": "2642:169:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1037, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "2656:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1038, + "name": "ETHEREUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "2666:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2656:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1055, + "nodeType": "Block", + "src": "2735:70:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1051, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7254, + "src": "2788:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 1050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2780:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2780:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1047, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "2762:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1046, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6908, + "src": "2756:5:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$6908_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2756:13:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 6552, + "src": "2756:23:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2756:38:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1036, + "id": 1054, + "nodeType": "Return", + "src": "2749:45:1" + } + ] + }, + "id": 1056, + "nodeType": "IfStatement", + "src": "2652:153:1", + "trueBody": { + "id": 1045, + "nodeType": "Block", + "src": "2676:53:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1041, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7254, + "src": "2705:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodePaymentStore_$1276", + "typeString": "contract DarknodePaymentStore" + } + ], + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2697:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2697:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2697:21:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1036, + "id": 1044, + "nodeType": "Return", + "src": "2690:28:1" + } + ] + } + } + ] + }, + "documentation": "@notice Get the total balance of the contract for a particular token\n\n /// @param _token The token to check balance of\n @return The total balance of the contract", + "id": 1058, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1032, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "2596:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1031, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2596:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2595:16:1" + }, + "returnParameters": { + "id": 1036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1035, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "2633:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2633:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2632:9:1" + }, + "scope": 1276, + "src": "2574:237:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1074, + "nodeType": "Block", + "src": "3187:72:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1069, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "3229:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1071, + "indexExpression": { + "argumentTypes": null, + "id": 1070, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "3244:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3229:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "3217:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1065, + "name": "totalBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "3204:12:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3204:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "3204:24:1", + "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": 1072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3204:48:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1064, + "id": 1073, + "nodeType": "Return", + "src": "3197:55:1" + } + ] + }, + "documentation": "@notice Get the available balance of the contract for a particular token\n This is the free amount which has not yet been allocated to\n darknodes.\n\n /// @param _token The token to check balance of\n @return The available balance of the contract", + "id": 1075, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "availableBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1061, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1060, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 1075, + "src": "3141:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1059, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3141:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3140:16:1" + }, + "returnParameters": { + "id": 1064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1063, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1075, + "src": "3178:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3178:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3177:9:1" + }, + "scope": 1276, + "src": "3115:144:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1115, + "nodeType": "Block", + "src": "3622:407:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3640:25:1", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1084, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "3655:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1083, + "name": "isBlacklisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "3641:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3641:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f646520616c726561647920626c61636b6c6973746564", + "id": 1087, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3667:30:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8bf796bbc77637ef3a3960205a0b11e33d0031551130b1d151519b7ff1fc2596", + "typeString": "literal_string \"darknode already blacklisted\"" + }, + "value": "darknode already blacklisted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8bf796bbc77637ef3a3960205a0b11e33d0031551130b1d151519b7ff1fc2596", + "typeString": "literal_string \"darknode already blacklisted\"" + } + ], + "id": 1082, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3632:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3632:66:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1089, + "nodeType": "ExpressionStatement", + "src": "3632:66:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1090, + "name": "darknodeBlacklist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 984, + "src": "3708:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1092, + "indexExpression": { + "argumentTypes": null, + "id": 1091, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "3726:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3708:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3739:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3739:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3708:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1096, + "nodeType": "ExpressionStatement", + "src": "3708:46:1" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1098, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "3819:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1097, + "name": "isWhitelisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1030, + "src": "3805:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3805:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1114, + "nodeType": "IfStatement", + "src": "3801:222:1", + "trueBody": { + "id": 1113, + "nodeType": "Block", + "src": "3831:192:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1100, + "name": "darknodeWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "3845:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1102, + "indexExpression": { + "argumentTypes": null, + "id": 1101, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "3863:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3845:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3876:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3845:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1105, + "nodeType": "ExpressionStatement", + "src": "3845:32:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1106, + "name": "darknodeWhitelistLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 970, + "src": "3956:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 1109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4010:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 1107, + "name": "darknodeWhitelistLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 970, + "src": "3982:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "3982:27:1", + "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": 1110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3982:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3956:56:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1112, + "nodeType": "ExpressionStatement", + "src": "3956:56:1" + } + ] + } + } + ] + }, + "documentation": "@notice Blacklists a darknode from participating in reward allocation.\n If the darknode is whitelisted, it is removed from the whitelist\n and the number of whitelisted nodes is decreased.\n\n /// @param _darknode The address of the darknode to blacklist", + "id": 1116, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1080, + "modifierName": { + "argumentTypes": null, + "id": 1079, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3612:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3612:9:1" + } + ], + "name": "blacklist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1077, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1116, + "src": "3584:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1076, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3584:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3583:19:1" + }, + "returnParameters": { + "id": 1081, + "nodeType": "ParameterList", + "parameters": [], + "src": "3622:0:1" + }, + "scope": 1276, + "src": "3565:464:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1149, + "nodeType": "Block", + "src": "4269:246:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4287:25:1", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "4302:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "isBlacklisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "4288:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4288:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f646520697320626c61636b6c6973746564", + "id": 1128, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4314:25:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b2595c93a5cd4ee60a0fc73f74d889182038841a2c576dfb52bdc225242aef77", + "typeString": "literal_string \"darknode is blacklisted\"" + }, + "value": "darknode is blacklisted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b2595c93a5cd4ee60a0fc73f74d889182038841a2c576dfb52bdc225242aef77", + "typeString": "literal_string \"darknode is blacklisted\"" + } + ], + "id": 1123, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4279:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4279:61:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1130, + "nodeType": "ExpressionStatement", + "src": "4279:61:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4358:25:1", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1133, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "4373:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1132, + "name": "isWhitelisted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1030, + "src": "4359:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4359:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461726b6e6f646520616c72656164792077686974656c6973746564", + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4385:30:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3c82f441bfcf447ccf69d63ea6dfd26e8f4c31df97864b4bd119549a6a1276eb", + "typeString": "literal_string \"darknode already whitelisted\"" + }, + "value": "darknode already whitelisted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3c82f441bfcf447ccf69d63ea6dfd26e8f4c31df97864b4bd119549a6a1276eb", + "typeString": "literal_string \"darknode already whitelisted\"" + } + ], + "id": 1131, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4350:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4350:66:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1138, + "nodeType": "ExpressionStatement", + "src": "4350:66:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1139, + "name": "darknodeWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "4427:17:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1141, + "indexExpression": { + "argumentTypes": null, + "id": 1140, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "4445:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4427:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1142, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "4458:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4458:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4427:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "nodeType": "ExpressionStatement", + "src": "4427:46:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4483:25:1", + "subExpression": { + "argumentTypes": null, + "id": 1146, + "name": "darknodeWhitelistLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 970, + "src": "4483:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1148, + "nodeType": "ExpressionStatement", + "src": "4483:25:1" + } + ] + }, + "documentation": "@notice Whitelists a darknode allowing it to participate in reward\n allocation.\n\n /// @param _darknode The address of the darknode to whitelist", + "id": 1150, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1121, + "modifierName": { + "argumentTypes": null, + "id": 1120, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "4259:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4259:9:1" + } + ], + "name": "whitelist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1118, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1150, + "src": "4231:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1117, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4231:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4230:19:1" + }, + "returnParameters": { + "id": 1122, + "nodeType": "ParameterList", + "parameters": [], + "src": "4269:0:1" + }, + "scope": 1276, + "src": "4212:303:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1203, + "nodeType": "Block", + "src": "4957:309:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1162, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1156, + "src": "4975:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4985:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4975:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c696420616d6f756e74", + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4988:16:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_428d2b45bb1c86227a8688f1c30f1c359824c9298dfce034ebf8ca193afdf5e7", + "typeString": "literal_string \"invalid amount\"" + }, + "value": "invalid amount" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_428d2b45bb1c86227a8688f1c30f1c359824c9298dfce034ebf8ca193afdf5e7", + "typeString": "literal_string \"invalid amount\"" + } + ], + "id": 1161, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4967:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4967:38:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1167, + "nodeType": "ExpressionStatement", + "src": "4967:38:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1170, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5040:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1169, + "name": "availableBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1075, + "src": "5023:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5023:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1172, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1156, + "src": "5051:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5023:35:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e73756666696369656e7420636f6e74726163742062616c616e6365", + "id": 1174, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5060:31:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d935e7c0470379b3a15e8821deb9bf7c4aa66e96937ceb6b3e245f4dd48b9a8a", + "typeString": "literal_string \"insufficient contract balance\"" + }, + "value": "insufficient contract balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d935e7c0470379b3a15e8821deb9bf7c4aa66e96937ceb6b3e245f4dd48b9a8a", + "typeString": "literal_string \"insufficient contract balance\"" + } + ], + "id": 1168, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5015:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5015:77:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1176, + "nodeType": "ExpressionStatement", + "src": "5015:77:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1177, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5103:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1180, + "indexExpression": { + "argumentTypes": null, + "id": 1178, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1152, + "src": "5120:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5103:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1181, + "indexExpression": { + "argumentTypes": null, + "id": 1179, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5131:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5103:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1156, + "src": "5181:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1182, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5141:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1184, + "indexExpression": { + "argumentTypes": null, + "id": 1183, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1152, + "src": "5158:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5141:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1186, + "indexExpression": { + "argumentTypes": null, + "id": 1185, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5169:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5141:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "5141:39:1", + "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": 1189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5141:48:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5103:86:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1191, + "nodeType": "ExpressionStatement", + "src": "5103:86:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1192, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "5199:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1194, + "indexExpression": { + "argumentTypes": null, + "id": 1193, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5214:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5199:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1199, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1156, + "src": "5251:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1195, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "5224:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1197, + "indexExpression": { + "argumentTypes": null, + "id": 1196, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1154, + "src": "5239:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5224:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "5224:26:1", + "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": 1200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5224:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5199:60:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1202, + "nodeType": "ExpressionStatement", + "src": "5199:60:1" + } + ] + }, + "documentation": "@notice Increments the amount of funds allocated to a particular\n darknode.\n\n /// @param _darknode The address of the darknode to increase balance of\n @param _token The token which the balance should be incremented\n @param _amount The amount that the balance should be incremented by", + "id": 1204, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1159, + "modifierName": { + "argumentTypes": null, + "id": 1158, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "4947:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4947:9:1" + } + ], + "name": "incrementDarknodeBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1152, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1204, + "src": "4886:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4886:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1154, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 1204, + "src": "4905:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4905:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1156, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1204, + "src": "4921:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4885:52:1" + }, + "returnParameters": { + "id": 1160, + "nodeType": "ParameterList", + "parameters": [], + "src": "4957:0:1" + }, + "scope": 1276, + "src": "4852:414:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1274, + "nodeType": "Block", + "src": "5672:436:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1218, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5690:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1220, + "indexExpression": { + "argumentTypes": null, + "id": 1219, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "5707:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5690:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1222, + "indexExpression": { + "argumentTypes": null, + "id": 1221, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5718:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5690:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1223, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "5729:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5690:46:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e73756666696369656e74206461726b6e6f64652062616c616e6365", + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5738:31:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_de295ef840beb4facbe6f674ee7b43fcfa29fb2fdeef87efb3e03c3633e266fc", + "typeString": "literal_string \"insufficient darknode balance\"" + }, + "value": "insufficient darknode balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_de295ef840beb4facbe6f674ee7b43fcfa29fb2fdeef87efb3e03c3633e266fc", + "typeString": "literal_string \"insufficient darknode balance\"" + } + ], + "id": 1217, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5682:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5682:88:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1227, + "nodeType": "ExpressionStatement", + "src": "5682:88:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1228, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5780:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1231, + "indexExpression": { + "argumentTypes": null, + "id": 1229, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "5797:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5780:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1232, + "indexExpression": { + "argumentTypes": null, + "id": 1230, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5808:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5780:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1239, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "5858:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1233, + "name": "darknodeBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "5818:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1235, + "indexExpression": { + "argumentTypes": null, + "id": 1234, + "name": "_darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "5835:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5818:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1237, + "indexExpression": { + "argumentTypes": null, + "id": 1236, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5846:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5818:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "5818:39:1", + "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": 1240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5818:48:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5780:86:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1242, + "nodeType": "ExpressionStatement", + "src": "5780:86:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 1252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1243, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "5876:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1245, + "indexExpression": { + "argumentTypes": null, + "id": 1244, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5891:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5876:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1250, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "5928:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1246, + "name": "lockedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "5901:14:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1248, + "indexExpression": { + "argumentTypes": null, + "id": 1247, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5916:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5901:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "5901:26:1", + "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": 1251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5901:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5876:60:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1253, + "nodeType": "ExpressionStatement", + "src": "5876:60:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1254, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5951:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1255, + "name": "ETHEREUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "5961:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5951:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1272, + "nodeType": "Block", + "src": "6030:72:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1268, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "6071:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1269, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "6083:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1265, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "6050:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1264, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6908, + "src": "6044:5:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$6908_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 1266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6044:13:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 1267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3780, + "src": "6044:26:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7168_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$7168_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6044:47:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1271, + "nodeType": "ExpressionStatement", + "src": "6044:47:1" + } + ] + }, + "id": 1273, + "nodeType": "IfStatement", + "src": "5947:155:1", + "trueBody": { + "id": 1263, + "nodeType": "Block", + "src": "5971:53:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1260, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "6005:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1257, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "5985:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5985:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5985:28:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1262, + "nodeType": "ExpressionStatement", + "src": "5985:28:1" + } + ] + } + } + ] + }, + "documentation": "@notice Transfers an amount out of balance to a specified address\n\n /// @param _darknode The address of the darknode\n @param _token Which token to transfer\n @param _amount The amount to transfer\n @param _recipient The address to withdraw it to", + "id": 1275, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1215, + "modifierName": { + "argumentTypes": null, + "id": 1214, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5662:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5662:9:1" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1206, + "name": "_darknode", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "5573:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5573:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1208, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "5592:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1207, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5592:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1210, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "5608:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5608:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1212, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "5625:26:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5625:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5572:80:1" + }, + "returnParameters": { + "id": 1216, + "nodeType": "ParameterList", + "parameters": [], + "src": "5672:0:1" + }, + "scope": 1276, + "src": "5555:553:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 1277, + "src": "559:5552:1" + } + ], + "src": "0:6112:1" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + } + }, + "links": {}, + "address": "0x6341DF1012E862f766Fcd72e0fCAAc5a3839CFef", + "transactionHash": "0x1a79f958154b41a287331bc1996e70f29022cd700b14bd463b480fc111962bc4" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:19:33.389Z", + "devdoc": { + "methods": { + "availableBalance(address)": { + "params": { + "_token": "The token to check balance of" + }, + "return": "The available balance of the contract" + }, + "blacklist(address)": { + "params": { + "_darknode": "The address of the darknode to blacklist" + } + }, + "claimOwnership()": { + "details": "Allows the pendingOwner address to finalize the transfer." + }, + "constructor": { + "params": { + "_VERSION": "A string defining the contract version." + } + }, + "incrementDarknodeBalance(address,address,uint256)": { + "params": { + "_amount": "The amount that the balance should be incremented by", + "_darknode": "The address of the darknode to increase balance of", + "_token": "The token which the balance should be incremented" + } + }, + "isBlacklisted(address)": { + "params": { + "_darknode": "The address of the darknode" + }, + "return": "true if the darknode is blacklisted" + }, + "isOwner()": { + "return": "true if `msg.sender` is the owner of the contract." + }, + "isWhitelisted(address)": { + "params": { + "_darknode": "The address of the darknode" + }, + "return": "true if the darknode is whitelisted" + }, + "owner()": { + "return": "the address of the owner." + }, + "renounceOwnership()": { + "details": "Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore." + }, + "totalBalance(address)": { + "params": { + "_token": "The token to check balance of" + }, + "return": "The total balance of the contract" + }, + "transfer(address,address,uint256,address)": { + "params": { + "_amount": "The amount to transfer", + "_darknode": "The address of the darknode", + "_recipient": "The address to withdraw it to", + "_token": "Which token to transfer" + } + }, + "transferOwnership(address)": { + "details": "Allows the current owner to set the pendingOwner address.", + "params": { + "newOwner": "The address to transfer ownership to." + } + }, + "whitelist(address)": { + "params": { + "_darknode": "The address of the darknode to whitelist" + } + } + } + }, + "userdoc": { + "methods": { + "availableBalance(address)": { + "notice": "Get the available balance of the contract for a particular token This is the free amount which has not yet been allocated to darknodes. " + }, + "blacklist(address)": { + "notice": "Blacklists a darknode from participating in reward allocation. If the darknode is whitelisted, it is removed from the whitelist and the number of whitelisted nodes is decreased. " + }, + "constructor": "The contract constructor. ", + "incrementDarknodeBalance(address,address,uint256)": { + "notice": "Increments the amount of funds allocated to a particular darknode. " + }, + "isBlacklisted(address)": { + "notice": "Checks to see if a darknode is blacklisted " + }, + "isWhitelisted(address)": { + "notice": "Checks to see if a darknode is whitelisted " + }, + "renounceOwnership()": { + "notice": "Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "totalBalance(address)": { + "notice": "Get the total balance of the contract for a particular token " + }, + "transfer(address,address,uint256,address)": { + "notice": "Transfers an amount out of balance to a specified address " + }, + "whitelist(address)": { + "notice": "Whitelists a darknode allowing it to participate in reward allocation. " + } + }, + "notice": "DarknodePaymentStore is responsible for tracking black/whitelisted darknodes as well as the balances which have been allocated to the darknodes. It is also responsible for holding the tokens to be paid out to darknodes." + } +} \ No newline at end of file diff --git a/build/devnet/DarknodeRegistry.json b/build/devnet/DarknodeRegistry.json new file mode 100644 index 00000000..7d22f2ef --- /dev/null +++ b/build/devnet/DarknodeRegistry.json @@ -0,0 +1,29977 @@ +{ + "contractName": "DarknodeRegistry", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "numDarknodesNextEpoch", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "numDarknodes", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "nextSlasher", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "nextMinimumEpochInterval", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "minimumEpochInterval", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "previousEpoch", + "outputs": [ + { + "name": "epochhash", + "type": "uint256" + }, + { + "name": "blocknumber", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "nextMinimumBond", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "nextMinimumPodSize", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "numDarknodesPreviousEpoch", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "currentEpoch", + "outputs": [ + { + "name": "epochhash", + "type": "uint256" + }, + { + "name": "blocknumber", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ren", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "store", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "minimumBond", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "slasher", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "minimumPodSize", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_VERSION", + "type": "string" + }, + { + "name": "_renAddress", + "type": "address" + }, + { + "name": "_storeAddress", + "type": "address" + }, + { + "name": "_minimumBond", + "type": "uint256" + }, + { + "name": "_minimumPodSize", + "type": "uint256" + }, + { + "name": "_minimumEpochInterval", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknodeID", + "type": "address" + }, + { + "indexed": false, + "name": "_bond", + "type": "uint256" + } + ], + "name": "LogDarknodeRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknodeID", + "type": "address" + } + ], + "name": "LogDarknodeDeregistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + } + ], + "name": "LogDarknodeOwnerRefunded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "epochhash", + "type": "uint256" + } + ], + "name": "LogNewEpoch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "previousMinimumBond", + "type": "uint256" + }, + { + "indexed": false, + "name": "nextMinimumBond", + "type": "uint256" + } + ], + "name": "LogMinimumBondUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "previousMinimumPodSize", + "type": "uint256" + }, + { + "indexed": false, + "name": "nextMinimumPodSize", + "type": "uint256" + } + ], + "name": "LogMinimumPodSizeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "previousMinimumEpochInterval", + "type": "uint256" + }, + { + "indexed": false, + "name": "nextMinimumEpochInterval", + "type": "uint256" + } + ], + "name": "LogMinimumEpochIntervalUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "previousSlasher", + "type": "address" + }, + { + "indexed": false, + "name": "nextSlasher", + "type": "address" + } + ], + "name": "LogSlasherUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + }, + { + "name": "_publicKey", + "type": "bytes" + } + ], + "name": "register", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "deregister", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "epoch", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferStoreOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "claimStoreOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nextMinimumBond", + "type": "uint256" + } + ], + "name": "updateMinimumBond", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nextMinimumPodSize", + "type": "uint256" + } + ], + "name": "updateMinimumPodSize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nextMinimumEpochInterval", + "type": "uint256" + } + ], + "name": "updateMinimumEpochInterval", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_slasher", + "type": "address" + } + ], + "name": "updateSlasher", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_prover", + "type": "address" + }, + { + "name": "_challenger1", + "type": "address" + }, + { + "name": "_challenger2", + "type": "address" + } + ], + "name": "slash", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "refund", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "getDarknodeOwner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "getDarknodeBond", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "getDarknodePublicKey", + "outputs": [ + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_start", + "type": "address" + }, + { + "name": "_count", + "type": "uint256" + } + ], + "name": "getDarknodes", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_start", + "type": "address" + }, + { + "name": "_count", + "type": "uint256" + } + ], + "name": "getPreviousDarknodes", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "isPendingRegistration", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "isPendingDeregistration", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "isDeregistered", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "isDeregisterable", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "isRefunded", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "isRefundable", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "isRegistered", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + } + ], + "name": "isRegisteredInPreviousEpoch", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isPendingRegistration\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numDarknodesNextEpoch\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_nextMinimumBond\",\"type\":\"uint256\"}],\"name\":\"updateMinimumBond\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numDarknodes\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"getDarknodeOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextSlasher\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"},{\"name\":\"_publicKey\",\"type\":\"bytes\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isPendingDeregistration\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_start\",\"type\":\"address\"},{\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getPreviousDarknodes\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextMinimumEpochInterval\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumEpochInterval\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_prover\",\"type\":\"address\"},{\"name\":\"_challenger1\",\"type\":\"address\"},{\"name\":\"_challenger2\",\"type\":\"address\"}],\"name\":\"slash\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRefundable\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"previousEpoch\",\"outputs\":[{\"name\":\"epochhash\",\"type\":\"uint256\"},{\"name\":\"blocknumber\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextMinimumBond\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_nextMinimumEpochInterval\",\"type\":\"uint256\"}],\"name\":\"updateMinimumEpochInterval\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimStoreOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextMinimumPodSize\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numDarknodesPreviousEpoch\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"name\":\"epochhash\",\"type\":\"uint256\"},{\"name\":\"blocknumber\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRegisteredInPreviousEpoch\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isDeregistered\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_nextMinimumPodSize\",\"type\":\"uint256\"}],\"name\":\"updateMinimumPodSize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"deregister\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"getDarknodePublicKey\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ren\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"epoch\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"store\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumBond\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"slasher\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_slasher\",\"type\":\"address\"}],\"name\":\"updateSlasher\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"getDarknodeBond\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferStoreOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRegistered\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumPodSize\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isDeregisterable\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_start\",\"type\":\"address\"},{\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getDarknodes\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"isRefunded\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_VERSION\",\"type\":\"string\"},{\"name\":\"_renAddress\",\"type\":\"address\"},{\"name\":\"_storeAddress\",\"type\":\"address\"},{\"name\":\"_minimumBond\",\"type\":\"uint256\"},{\"name\":\"_minimumPodSize\",\"type\":\"uint256\"},{\"name\":\"_minimumEpochInterval\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_darknodeID\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_bond\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_darknodeID\",\"type\":\"address\"}],\"name\":\"LogDarknodeDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LogDarknodeOwnerRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"epochhash\",\"type\":\"uint256\"}],\"name\":\"LogNewEpoch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"previousMinimumBond\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nextMinimumBond\",\"type\":\"uint256\"}],\"name\":\"LogMinimumBondUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"previousMinimumPodSize\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nextMinimumPodSize\",\"type\":\"uint256\"}],\"name\":\"LogMinimumPodSizeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"previousMinimumEpochInterval\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nextMinimumEpochInterval\",\"type\":\"uint256\"}],\"name\":\"LogMinimumEpochIntervalUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"previousSlasher\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"nextSlasher\",\"type\":\"address\"}],\"name\":\"LogSlasherUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"params\":{\"_VERSION\":\"A string defining the contract version.\",\"_minimumBond\":\"The minimum bond amount that can be submitted by a Darknode.\",\"_minimumEpochInterval\":\"The minimum number of blocks between epochs.\",\"_minimumPodSize\":\"The minimum size of a Darknode pod.\",\"_renAddress\":\"The address of the RenToken contract.\",\"_storeAddress\":\"The address of the DarknodeRegistryStore contract.\"}},\"deregister(address)\":{\"params\":{\"_darknodeID\":\"The darknode ID that will be deregistered. The caller of this method store.darknodeRegisteredAt(_darknodeID) must be\"}},\"getDarknodeBond(address)\":{\"params\":{\"_darknodeID\":\"The ID of the darknode to retrieve the bond for.\"}},\"getDarknodeOwner(address)\":{\"params\":{\"_darknodeID\":\"The ID of the darknode to retrieve the owner for.\"}},\"getDarknodePublicKey(address)\":{\"params\":{\"_darknodeID\":\"The ID of the darknode to retrieve the public key for.\"}},\"getDarknodes(address,uint256)\":{\"params\":{\"_count\":\"The number of darknodes to retrieve starting from _start. If _count is 0, all of the darknodes from _start are retrieved. If _count is more than the remaining number of registered darknodes, the rest of the list will contain 0x0s.\",\"_start\":\"A darknode ID used as an offset for the list. If _start is 0x0, the first dark node will be used. _start won't be included it is not registered for the epoch.\"}},\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"isPendingRegistration(address)\":{\"params\":{\"_darknodeID\":\"The ID of the darknode to return\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"refund(address)\":{\"params\":{\"_darknodeID\":\"The darknode ID that will be refunded. The caller of this method must be the owner of this darknode.\"}},\"register(address,bytes)\":{\"params\":{\"_darknodeID\":\"The darknode ID that will be registered.\",\"_publicKey\":\"The public key of the darknode. It is stored to allow other darknodes and traders to encrypt messages to the trader.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"slash(address,address,address)\":{\"params\":{\"_challenger1\":\"The first of the two darknodes who submitted the challenge\",\"_challenger2\":\"The second of the two darknodes who submitted the challenge\",\"_prover\":\"The guilty prover whose bond is being slashed\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"transferStoreOwnership(address)\":{\"params\":{\"_newOwner\":\"The address to transfer the ownership to.\"}},\"updateMinimumBond(uint256)\":{\"params\":{\"_nextMinimumBond\":\"The minimum bond amount that can be submitted by a darknode.\"}},\"updateMinimumEpochInterval(uint256)\":{\"params\":{\"_nextMinimumEpochInterval\":\"The minimum number of blocks between epochs.\"}},\"updateMinimumPodSize(uint256)\":{\"params\":{\"_nextMinimumPodSize\":\"The minimum size of a pod.\"}},\"updateSlasher(address)\":{\"params\":{\"_slasher\":\"The new slasher address.\"}}}},\"userdoc\":{\"methods\":{\"claimStoreOwnership()\":{\"notice\":\"Claims ownership of the store passed in to the constructor. `transferStoreOwnership` must have previously been called when transferring from another Darknode Registry.\"},\"constructor\":\"The contract constructor. \",\"deregister(address)\":{\"notice\":\"Deregister a darknode. The darknode will not be deregistered until the end of the epoch. After another epoch, the bond can be refunded by calling the refund method.\"},\"epoch()\":{\"notice\":\"Progress the epoch if it is possible to do so. This captures the current timestamp and current blockhash and overrides the current epoch.\"},\"getDarknodeBond(address)\":{\"notice\":\"Retrieves the bond amount of a darknode in 10^-18 REN.\"},\"getDarknodeOwner(address)\":{\"notice\":\"Retrieves the address of the account that registered a darknode.\"},\"getDarknodePublicKey(address)\":{\"notice\":\"Retrieves the encryption public key of the darknode.\"},\"getDarknodes(address,uint256)\":{\"notice\":\"Retrieves a list of darknodes which are registered for the current epoch.\"},\"getPreviousDarknodes(address,uint256)\":{\"notice\":\"Retrieves a list of darknodes which were registered for the previous epoch. See `getDarknodes` for the parameter documentation.\"},\"isDeregisterable(address)\":{\"notice\":\"Returns if a darknode can be deregistered. This is true if the darknodes is in the registered state and has not attempted to deregister yet.\"},\"isDeregistered(address)\":{\"notice\":\"Returns if a darknode is in the deregistered state.\"},\"isPendingDeregistration(address)\":{\"notice\":\"Returns if a darknode is in the pending deregistered state. In this state a darknode is still considered registered.\"},\"isPendingRegistration(address)\":{\"notice\":\"Returns whether a darknode is scheduled to become registered at next epoch.\"},\"isRefundable(address)\":{\"notice\":\"Returns if a darknode is refundable. This is true for darknodes that have been in the deregistered state for one full epoch.\"},\"isRefunded(address)\":{\"notice\":\"Returns if a darknode is in the refunded state. This is true for darknodes that have never been registered, or darknodes that have been deregistered and refunded.\"},\"isRegistered(address)\":{\"notice\":\"Returns if a darknode is in the registered state.\"},\"isRegisteredInPreviousEpoch(address)\":{\"notice\":\"Returns if a darknode was in the registered state last epoch.\"},\"refund(address)\":{\"notice\":\"Refund the bond of a deregistered darknode. This will make the darknode available for registration again. Anyone can call this function but the bond will always be refunded to the darknode owner. \"},\"register(address,bytes)\":{\"notice\":\"Register a darknode and transfer the bond to this contract. Before registering, the bond transfer must be approved in the REN contract. The caller must provide a public encryption key for the darknode. The darknode will remain pending registration until the next epoch. Only after this period can the darknode be deregistered. The caller of this method will be stored as the owner of the darknode. \"},\"slash(address,address,address)\":{\"notice\":\"Allow the DarknodeSlasher contract to slash half of a darknode's bond and deregister it. The bond is distributed as follows: 1/2 is kept by the guilty prover 1/8 is rewarded to the first challenger 1/8 is rewarded to the second challenger 1/4 becomes unassigned\"},\"transferStoreOwnership(address)\":{\"notice\":\"Allows the contract owner to initiate an ownership transfer of the DarknodeRegistryStore. \"},\"updateMinimumBond(uint256)\":{\"notice\":\"Allows the contract owner to update the minimum bond.\"},\"updateMinimumEpochInterval(uint256)\":{\"notice\":\"Allows the contract owner to update the minimum epoch interval.\"},\"updateMinimumPodSize(uint256)\":{\"notice\":\"Allows the contract owner to update the minimum pod size.\"},\"updateSlasher(address)\":{\"notice\":\"Allow the contract owner to update the DarknodeSlasher contract address.\"}},\"notice\":\"DarknodeRegistry is responsible for the registration and deregistration of Darknodes.\"}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol\":\"DarknodeRegistry\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol\":{\"keccak256\":\"0xe2c22dc48cac917fa2890d5a6b6ed0e86ecf273c0d2762bdf490347012145480\",\"urls\":[\"bzzr://5cf4705abd3d66528c43d1e47f9d56e3e0e35403196762e50d15905bbb539527\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol\":{\"keccak256\":\"0x423b0630cad633c8385e457c0762a8d4b2a5028ee2e89af3f112d5f2d3a04022\",\"urls\":[\"bzzr://de7a014c67223932f191f05238df1a37fa3d325dad943787b3506f072af8e444\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol\":{\"keccak256\":\"0x815e7571a0fd9b61f8f8bf693e7891ab78bbf36b20781012ac64c12f56ef36c5\",\"urls\":[\"bzzr://8e02714dc3b3bf491d533506859802a0756b444ba1b06b6ff64184a723f8697b\"]},\"/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol\":{\"keccak256\":\"0x574c593875a7afc210e709573a4d46d6ad6ea60d348ade04692149aae68a85da\",\"urls\":[\"bzzr://6216d6c45babda33bf82905fd7384368d9529b6e572f435c2a217bd7634467e9\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/LinkedList.sol\":{\"keccak256\":\"0x318273ca74f037e14739675b74e3538fa6d08ff412869f1931aacd351d35bdcc\",\"urls\":[\"bzzr://2174bf7bb80a3ed2d366ac0041168e2478c5b0a65b9a8aeaf99a0058e3021f53\"]},\"openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb\",\"urls\":[\"bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad\"]},\"openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0xf6826c684d51ca28db5293ce11a54c5cca1c757b6cd32b87613833c65086f995\",\"urls\":[\"bzzr://01b2756ab5b41b1d7ccadfeac53fbdce9c889263f1e011329c300c5fa3fda65f\"]},\"openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x609f8cb524cd6b502624c79c099ec2fc6f23eef57b5c38e28efd82490875f37e\",\"urls\":[\"bzzr://46ee461a64298ef418bd100df1301355f4dc9ffeb06fe7a39aaf98d45c0bf988\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xf79fb10e8235770eb4aea7249034076a3cc9f9119ad944fc48705bae9c9d20dc\",\"urls\":[\"bzzr://d12a11272051eb6586de8f7e0a82c04a98c9984ce8b2a6cf1ee439f65aba29a9\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa5ebf3344a36eb60e723e0764d85251c496e15e4b2d737b56415502b559a1765\",\"urls\":[\"bzzr://68812cb0a1d373d12c6986f5a9314c9bae7891a07a0e301d2317fcf409102f54\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0xc4973487824e5855e78e27d685b387566df52ea4b0854ba60b8703b533de47d4\",\"urls\":[\"bzzr://299d2f2c37a1b0cc8b15927fc516cc7f8a8f48e246512b3b3880bd3e4f0220d4\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200296c3803806200296c833981018060405260c08110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b505060208201516040808401516060850151608086015160a090960151600080546001600160a01b0319163317808255945196995094975091959094909391926001600160a01b031691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a385516200010490600190602089019062000188565b50601080546001600160a01b039586166001600160a01b031991821617909155600f805496909516951694909417909255600581905560085560068190556009556007819055600a555060408051808201909152436000198101408083526020909201819052600b91909155600c556000600281905560038190556004556200022d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001cb57805160ff1916838001178555620001fb565b82800160010185558215620001fb579182015b82811115620001fb578251825591602001919060010190620001de565b50620002099291506200020d565b5090565b6200022a91905b8082111562000209576000815560010162000214565b90565b61272f806200023d6000396000f3fe608060405234801561001057600080fd5b50600436106102745760003560e01c80638020fc1f11610151578063b3139d38116100c3578063e187892511610087578063e18789251461073e578063ec5325c114610764578063f2fde38b14610790578063fa89401a146107b6578063ffa1ad74146107dc578063ffc9152e146107e457610274565b8063b3139d381461069e578063ba0f5b20146106c4578063c2250a99146106ea578063c3c5a54714610710578063c7dbc2be1461073657610274565b80638da5cb5b116101155780638da5cb5b1461066e5780638f32d59b14610676578063900cf0cf1461067e578063975057e714610686578063aa7517e11461068e578063b13442711461069657610274565b80638020fc1f1461056257806380a0c4611461058857806384ac33ec146105a557806384d2688c146105cb5780638a9b40671461066657610274565b8063563bf264116101ea5780636fd689e8116101ae5780636fd689e814610514578063702c25ee1461051c578063715018a61461052457806371740d161461052c57806376671808146105345780637be266da1461053c57610274565b8063563bf264146104705780635aebd1cb146104a85780635cdaab48146104ce57806360a22fe4146104ef57806363b851b9146104f757610274565b806321a2ad3a1161023c57806321a2ad3a1461033657806324b8fbf61461033e578063303ee989146103be57806343846074146103e4578063455dc46d1461046057806355cacda51461046857610274565b8063040fa051146102795780630847e9fa146102b35780630ff9aafe146102cd5780631460e603146102ec5780631cedf8a3146102f4575b600080fd5b61029f6004803603602081101561028f57600080fd5b50356001600160a01b031661080a565b604080519115158252519081900360200190f35b6102bb6108a1565b60408051918252519081900360200190f35b6102ea600480360360208110156102e357600080fd5b50356108a7565b005b6102bb6108f6565b61031a6004803603602081101561030a57600080fd5b50356001600160a01b03166108fc565b604080516001600160a01b039092168252519081900360200190f35b61031a610982565b6102ea6004803603604081101561035457600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561037f57600080fd5b82018360208201111561039157600080fd5b803590602001918460018302840111640100000000831117156103b357600080fd5b509092509050610991565b61029f600480360360208110156103d457600080fd5b50356001600160a01b0316610c12565b610410600480360360408110156103fa57600080fd5b506001600160a01b038135169060200135610c63565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561044c578181015183820152602001610434565b505050509050019250505060405180910390f35b6102bb610c84565b6102bb610c8a565b6102ea6004803603606081101561048657600080fd5b506001600160a01b038135811691602081013582169160409091013516610c90565b61029f600480360360208110156104be57600080fd5b50356001600160a01b03166110b6565b6104d661114f565b6040805192835260208301919091528051918290030190f35b6102bb611158565b6102ea6004803603602081101561050d57600080fd5b503561115e565b6102ea6111ad565b6102bb611261565b6102ea611267565b6102bb6112fb565b6104d6611301565b61029f6004803603602081101561055257600080fd5b50356001600160a01b031661130a565b61029f6004803603602081101561057857600080fd5b50356001600160a01b031661132f565b6102ea6004803603602081101561059e57600080fd5b50356113c3565b6102ea600480360360208110156105bb57600080fd5b50356001600160a01b0316611412565b6105f1600480360360208110156105e157600080fd5b50356001600160a01b0316611559565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561062b578181015183820152602001610613565b50505050905090810190601f1680156106585780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61031a61163b565b61031a61164a565b61029f611659565b6102ea61166a565b61031a61191d565b6102bb61192c565b61031a611932565b6102ea600480360360208110156106b457600080fd5b50356001600160a01b0316611941565b6102bb600480360360208110156106da57600080fd5b50356001600160a01b0316611a0b565b6102ea6004803603602081101561070057600080fd5b50356001600160a01b0316611a5f565b61029f6004803603602081101561072657600080fd5b50356001600160a01b0316611b0e565b6102bb611b33565b61029f6004803603602081101561075457600080fd5b50356001600160a01b0316611b39565b6104106004803603604081101561077a57600080fd5b506001600160a01b038135169060200135611bcf565b6102ea600480360360208110156107a657600080fd5b50356001600160a01b0316611be8565b6102ea600480360360208110156107cc57600080fd5b50356001600160a01b0316611c3e565b6105f1611f11565b61029f600480360360208110156107fa57600080fd5b50356001600160a01b0316611f9e565b60105460408051600160e21b6338b5f1930281526001600160a01b03848116600483015291516000938493169163e2d7c64c916024808301926020929190829003018186803b15801561085c57600080fd5b505afa158015610870573d6000803e3d6000fd5b505050506040513d602081101561088657600080fd5b50519050801580159061089a5750600c5481115b9392505050565b60035481565b6108af611659565b6108f15760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b600855565b60025481565b60105460408051600160e01b63a30788150281526001600160a01b0384811660048301529151600093929092169163a307881591602480820192602092909190829003018186803b15801561095057600080fd5b505afa158015610964573d6000803e3d6000fd5b505050506040513d602081101561097a57600080fd5b505192915050565b6012546001600160a01b031681565b8261099b81611f9e565b6109d957604051600160e51b62461bcd02815260040180806020018281038252602481526020018061266f6024913960400191505060405180910390fd5b600554600f5460105460408051600160e01b6323b872dd0281523360048201526001600160a01b03928316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b158015610a3e57600080fd5b505af1158015610a52573d6000803e3d6000fd5b505050506040513d6020811015610a6857600080fd5b5051610abe5760408051600160e51b62461bcd02815260206004820152601460248201527f626f6e64207472616e73666572206661696c6564000000000000000000000000604482015290519081900360640190fd5b601054600754600c546001600160a01b039092169163a85ef579918891339186918a918a91610af29163ffffffff6120b016565b60006040518863ffffffff1660e01b815260040180886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001868152602001806020018481526020018381526020018281038252868682818152602001925080828437600081840152601f19601f82011690508083019250505098505050505050505050600060405180830381600087803b158015610b9c57600080fd5b505af1158015610bb0573d6000803e3d6000fd5b5050600354610bc992509050600163ffffffff6120b016565b6003556040805182815290516001600160a01b038716917fd2819ba4c736158371edf0be38fd8d1fc435609832e392f118c4c79160e5bd7b919081900360200190a25050505050565b60105460408051600160e11b62c985b70281526001600160a01b0384811660048301529151600093849316916301930b6e916024808301926020929190829003018186803b15801561085c57600080fd5b60608180610c7057506004545b610c7c8482600161210d565b949350505050565b600a5481565b60075481565b6011546001600160a01b03163314610cf25760408051600160e51b62461bcd02815260206004820152600f60248201527f6d75737420626520736c61736865720000000000000000000000000000000000604482015290519081900360640190fd5b60105460408051600160e01b63cad413570281526001600160a01b0386811660048301529151600093600293169163cad41357916024808301926020929190829003018186803b158015610d4557600080fd5b505afa158015610d59573d6000803e3d6000fd5b505050506040513d6020811015610d6f57600080fd5b505181610d7857fe5b049050600060048260105460408051600160e21b633ef100bf0281526001600160a01b038a81166004830152602482018890529151949093049450169163fbc402fc9160448082019260009290919082900301818387803b158015610ddc57600080fd5b505af1158015610df0573d6000803e3d6000fd5b50505050610dfd85611b39565b15610e0b57610e0b85612348565b600f5460105460408051600160e01b63a30788150281526001600160a01b03888116600483015291519382169363a9059cbb939092169163a307881591602480820192602092909190829003018186803b158015610e6857600080fd5b505afa158015610e7c573d6000803e3d6000fd5b505050506040513d6020811015610e9257600080fd5b50516040805163ffffffff841660e01b81526001600160a01b039092166004830152602482018590525160448083019260209291908290030181600087803b158015610edd57600080fd5b505af1158015610ef1573d6000803e3d6000fd5b505050506040513d6020811015610f0757600080fd5b5051610f5d5760408051600160e51b62461bcd02815260206004820152601660248201527f726577617264207472616e73666572206661696c656400000000000000000000604482015290519081900360640190fd5b600f5460105460408051600160e01b63a30788150281526001600160a01b03878116600483015291519382169363a9059cbb939092169163a307881591602480820192602092909190829003018186803b158015610fba57600080fd5b505afa158015610fce573d6000803e3d6000fd5b505050506040513d6020811015610fe457600080fd5b50516040805163ffffffff841660e01b81526001600160a01b039092166004830152602482018590525160448083019260209291908290030181600087803b15801561102f57600080fd5b505af1158015611043573d6000803e3d6000fd5b505050506040513d602081101561105957600080fd5b50516110af5760408051600160e51b62461bcd02815260206004820152601660248201527f726577617264207472616e73666572206661696c656400000000000000000000604482015290519081900360640190fd5b5050505050565b60006110c18261132f565b80156111495750600e5460105460408051600160e11b62c985b70281526001600160a01b038681166004830152915191909216916301930b6e916024808301926020929190829003018186803b15801561111a57600080fd5b505afa15801561112e573d6000803e3d6000fd5b505050506040513d602081101561114457600080fd5b505111155b92915050565b600d54600e5482565b60085481565b611166611659565b6111a85760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b600a55565b6111b5611659565b6111f75760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b601060009054906101000a90046001600160a01b03166001600160a01b0316634e71e0c86040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561124757600080fd5b505af115801561125b573d6000803e3d6000fd5b50505050565b60095481565b61126f611659565b6112b15760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60045481565b600b54600c5482565b60408051808201909152600d548152600e54602082015260009061114990839061242a565b60105460408051600160e11b62c985b70281526001600160a01b0384811660048301529151600093849316916301930b6e916024808301926020929190829003018186803b15801561138057600080fd5b505afa158015611394573d6000803e3d6000fd5b505050506040513d60208110156113aa57600080fd5b50519050801580159061089a5750600c54101592915050565b6113cb611659565b61140d5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b600955565b8061141c81611b39565b6114705760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206465726567697374657261626c6500000000000000000000604482015290519081900360640190fd5b60105460408051600160e01b63a30788150281526001600160a01b038086166004830152915185933393169163a3078815916024808301926020929190829003018186803b1580156114c157600080fd5b505afa1580156114d5573d6000803e3d6000fd5b505050506040513d60208110156114eb57600080fd5b50516001600160a01b03161461154b5760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206461726b6e6f6465206f776e657200000000000000000000604482015290519081900360640190fd5b61155483612348565b505050565b60105460408051600160e41b630ee594a50281526001600160a01b0384811660048301529151606093929092169163ee594a5091602480820192600092909190829003018186803b1580156115ad57600080fd5b505afa1580156115c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156115ea57600080fd5b81019080805164010000000081111561160257600080fd5b8201602081018481111561161557600080fd5b815164010000000081118282018710171561162f57600080fd5b50909695505050505050565b600f546001600160a01b031681565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b600e546116e15761167961164a565b6001600160a01b0316336001600160a01b0316146116e15760408051600160e51b62461bcd02815260206004820152601d60248201527f6e6f7420617574686f72697a6564202866697273742065706f63687329000000604482015290519081900360640190fd5b600754600c546116f69163ffffffff6120b016565b43101561174d5760408051600160e51b62461bcd02815260206004820152601d60248201527f65706f636820696e74657276616c20686173206e6f7420706173736564000000604482015290519081900360640190fd5b600b8054600d55600c8054600e556040805180820190915243600019810140808352602090920181905292819055919055600280546004556003549055600554600854146117d957600854600581905560408051828152602081019290925280517f7c77c94944e9e4e5b0d46f1297127d060020792687cd743401d782346c68f6559281900390910190a15b6006546009541461182857600954600681905560408051828152602081019290925280517f6d520e46e5714982ddf8cb6216bcb3e1c1d5b79d337afc305335f819394f5d6a9281900390910190a15b600754600a541461187757600a54600781905560408051828152602081019290925280517fb218cde2730b79a0667ddf869466ee66a12ef56fe65fa4986a590f8a7108c9de9281900390910190a15b6011546012546001600160a01b039081169116146118ef57601254601180546001600160a01b0319166001600160a01b039283169081179182905560408051929093168252602082015281517f933228a1c3ba8fadd3ce47a9db5b898be647f89af99ba7c1b9a655f59ea306c8929181900390910190a15b60405181907faf2fc4796f2932ce294c3684deffe5098d3ef65dc2dd64efa80ef94eed88b01e90600090a250565b6010546001600160a01b031681565b60055481565b6011546001600160a01b031681565b611949611659565b61198b5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b6001600160a01b0381166119e95760408051600160e51b62461bcd02815260206004820152601760248201527f696e76616c696420736c61736865722061646472657373000000000000000000604482015290519081900360640190fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b60105460408051600160e01b63cad413570281526001600160a01b0384811660048301529151600093929092169163cad4135791602480820192602092909190829003018186803b15801561095057600080fd5b611a67611659565b611aa95760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b60105460408051600160e01b63f2fde38b0281526001600160a01b0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b158015611afa57600080fd5b505af11580156110af573d6000803e3d6000fd5b60408051808201909152600b548152600c54602082015260009061114990839061242a565b60065481565b60105460408051600160e11b62c985b70281526001600160a01b0384811660048301529151600093849316916301930b6e916024808301926020929190829003018186803b158015611b8a57600080fd5b505afa158015611b9e573d6000803e3d6000fd5b505050506040513d6020811015611bb457600080fd5b50519050611bc183611b0e565b801561089a57501592915050565b60608180611bdc57506002545b610c7c8482600061210d565b611bf0611659565b611c325760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b611c3b8161256b565b50565b80611c48816110b6565b611c8657604051600160e51b62461bcd02815260040180806020018281038252602b8152602001806126b9602b913960400191505060405180910390fd5b60105460408051600160e01b63a30788150281526001600160a01b0385811660048301529151600093929092169163a307881591602480820192602092909190829003018186803b158015611cda57600080fd5b505afa158015611cee573d6000803e3d6000fd5b505050506040513d6020811015611d0457600080fd5b505160105460408051600160e01b63cad413570281526001600160a01b0387811660048301529151939450600093919092169163cad41357916024808301926020929190829003018186803b158015611d5c57600080fd5b505afa158015611d70573d6000803e3d6000fd5b505050506040513d6020811015611d8657600080fd5b505160105460408051600160e11b6320da21c90281526001600160a01b03888116600483015291519394509116916341b443929160248082019260009290919082900301818387803b158015611ddb57600080fd5b505af1158015611def573d6000803e3d6000fd5b5050600f5460408051600160e01b63a9059cbb0281526001600160a01b03878116600483015260248201879052915191909216935063a9059cbb925060448083019260209291908290030181600087803b158015611e4c57600080fd5b505af1158015611e60573d6000803e3d6000fd5b505050506040513d6020811015611e7657600080fd5b5051611ecc5760408051600160e51b62461bcd02815260206004820152601460248201527f626f6e64207472616e73666572206661696c6564000000000000000000000000604482015290519081900360640190fd5b6040805182815290516001600160a01b038416917f96ab9e56c79eee4a72db6e2879cbfbecdba5c65b411f4861824e66b89df19764919081900360200190a250505050565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015611f965780601f10611f6b57610100808354040283529160200191611f96565b820191906000526020600020905b815481529060010190602001808311611f7957829003601f168201915b505050505081565b60105460408051600160e21b6338b5f1930281526001600160a01b03848116600483015291516000938493169163e2d7c64c916024808301926020929190829003018186803b158015611ff057600080fd5b505afa158015612004573d6000803e3d6000fd5b505050506040513d602081101561201a57600080fd5b505160105460408051600160e11b62c985b70281526001600160a01b038781166004830152915193945060009391909216916301930b6e916024808301926020929190829003018186803b15801561207157600080fd5b505afa158015612085573d6000803e3d6000fd5b505050506040513d602081101561209b57600080fd5b5051905081158015610c7c5750159392505050565b60008282018381101561089a5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6060828061211a57506002545b606081604051908082528060200260200182016040528015612146578160200160208202803883390190505b5090506000866001600160a01b0381166121d757601060009054906101000a90046001600160a01b03166001600160a01b0316631bce6ff36040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a857600080fd5b505afa1580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b505190505b8382101561162f576001600160a01b0381166121f25761162f565b6000861561220a576122038261130a565b9050612216565b61221382611b0e565b90505b806122a05760105460408051600160e11b6355b9f18b0281526001600160a01b0385811660048301529151919092169163ab73e316916024808301926020929190829003018186803b15801561226b57600080fd5b505afa15801561227f573d6000803e3d6000fd5b505050506040513d602081101561229557600080fd5b505191506121d79050565b818484815181106122ad57fe5b6001600160a01b0392831660209182029290920181019190915260105460408051600160e11b6355b9f18b02815286851660048201529051919093169263ab73e316926024808301939192829003018186803b15801561230c57600080fd5b505afa158015612320573d6000803e3d6000fd5b505050506040513d602081101561233657600080fd5b50516001939093019291506121d79050565b601054600754600c546001600160a01b0390921691633ac39d4b9184916123749163ffffffff6120b016565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156123c357600080fd5b505af11580156123d7573d6000803e3d6000fd5b50506003546123f092509050600163ffffffff61260e16565b6003556040516001600160a01b038216907f2dc89de5703d2c341a22ebfc7c4d3f197e5e1f0c19bc2e1135f387163cb927e490600090a250565b60105460408051600160e21b6338b5f1930281526001600160a01b03858116600483015291516000938493169163e2d7c64c916024808301926020929190829003018186803b15801561247c57600080fd5b505afa158015612490573d6000803e3d6000fd5b505050506040513d60208110156124a657600080fd5b505160105460408051600160e11b62c985b70281526001600160a01b038881166004830152915193945060009391909216916301930b6e916024808301926020929190829003018186803b1580156124fd57600080fd5b505afa158015612511573d6000803e3d6000fd5b505050506040513d602081101561252757600080fd5b5051905060008215801590612540575084602001518311155b905060008215806125545750856020015183115b90508180156125605750805b979650505050505050565b6001600160a01b0381166125b357604051600160e51b62461bcd0281526004018080602001828103825260268152602001806126936026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828211156126685760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe6d75737420626520726566756e646564206f72206e6576657220726567697374657265644f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573736d7573742062652064657265676973746572656420666f72206174206c65617374206f6e652065706f63684f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a165627a7a72305820bab9bc785683948abe894b52a6d8c5b82d299fe93f8343f8a65874c30c9cfecb0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102745760003560e01c80638020fc1f11610151578063b3139d38116100c3578063e187892511610087578063e18789251461073e578063ec5325c114610764578063f2fde38b14610790578063fa89401a146107b6578063ffa1ad74146107dc578063ffc9152e146107e457610274565b8063b3139d381461069e578063ba0f5b20146106c4578063c2250a99146106ea578063c3c5a54714610710578063c7dbc2be1461073657610274565b80638da5cb5b116101155780638da5cb5b1461066e5780638f32d59b14610676578063900cf0cf1461067e578063975057e714610686578063aa7517e11461068e578063b13442711461069657610274565b80638020fc1f1461056257806380a0c4611461058857806384ac33ec146105a557806384d2688c146105cb5780638a9b40671461066657610274565b8063563bf264116101ea5780636fd689e8116101ae5780636fd689e814610514578063702c25ee1461051c578063715018a61461052457806371740d161461052c57806376671808146105345780637be266da1461053c57610274565b8063563bf264146104705780635aebd1cb146104a85780635cdaab48146104ce57806360a22fe4146104ef57806363b851b9146104f757610274565b806321a2ad3a1161023c57806321a2ad3a1461033657806324b8fbf61461033e578063303ee989146103be57806343846074146103e4578063455dc46d1461046057806355cacda51461046857610274565b8063040fa051146102795780630847e9fa146102b35780630ff9aafe146102cd5780631460e603146102ec5780631cedf8a3146102f4575b600080fd5b61029f6004803603602081101561028f57600080fd5b50356001600160a01b031661080a565b604080519115158252519081900360200190f35b6102bb6108a1565b60408051918252519081900360200190f35b6102ea600480360360208110156102e357600080fd5b50356108a7565b005b6102bb6108f6565b61031a6004803603602081101561030a57600080fd5b50356001600160a01b03166108fc565b604080516001600160a01b039092168252519081900360200190f35b61031a610982565b6102ea6004803603604081101561035457600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561037f57600080fd5b82018360208201111561039157600080fd5b803590602001918460018302840111640100000000831117156103b357600080fd5b509092509050610991565b61029f600480360360208110156103d457600080fd5b50356001600160a01b0316610c12565b610410600480360360408110156103fa57600080fd5b506001600160a01b038135169060200135610c63565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561044c578181015183820152602001610434565b505050509050019250505060405180910390f35b6102bb610c84565b6102bb610c8a565b6102ea6004803603606081101561048657600080fd5b506001600160a01b038135811691602081013582169160409091013516610c90565b61029f600480360360208110156104be57600080fd5b50356001600160a01b03166110b6565b6104d661114f565b6040805192835260208301919091528051918290030190f35b6102bb611158565b6102ea6004803603602081101561050d57600080fd5b503561115e565b6102ea6111ad565b6102bb611261565b6102ea611267565b6102bb6112fb565b6104d6611301565b61029f6004803603602081101561055257600080fd5b50356001600160a01b031661130a565b61029f6004803603602081101561057857600080fd5b50356001600160a01b031661132f565b6102ea6004803603602081101561059e57600080fd5b50356113c3565b6102ea600480360360208110156105bb57600080fd5b50356001600160a01b0316611412565b6105f1600480360360208110156105e157600080fd5b50356001600160a01b0316611559565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561062b578181015183820152602001610613565b50505050905090810190601f1680156106585780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61031a61163b565b61031a61164a565b61029f611659565b6102ea61166a565b61031a61191d565b6102bb61192c565b61031a611932565b6102ea600480360360208110156106b457600080fd5b50356001600160a01b0316611941565b6102bb600480360360208110156106da57600080fd5b50356001600160a01b0316611a0b565b6102ea6004803603602081101561070057600080fd5b50356001600160a01b0316611a5f565b61029f6004803603602081101561072657600080fd5b50356001600160a01b0316611b0e565b6102bb611b33565b61029f6004803603602081101561075457600080fd5b50356001600160a01b0316611b39565b6104106004803603604081101561077a57600080fd5b506001600160a01b038135169060200135611bcf565b6102ea600480360360208110156107a657600080fd5b50356001600160a01b0316611be8565b6102ea600480360360208110156107cc57600080fd5b50356001600160a01b0316611c3e565b6105f1611f11565b61029f600480360360208110156107fa57600080fd5b50356001600160a01b0316611f9e565b60105460408051600160e21b6338b5f1930281526001600160a01b03848116600483015291516000938493169163e2d7c64c916024808301926020929190829003018186803b15801561085c57600080fd5b505afa158015610870573d6000803e3d6000fd5b505050506040513d602081101561088657600080fd5b50519050801580159061089a5750600c5481115b9392505050565b60035481565b6108af611659565b6108f15760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b600855565b60025481565b60105460408051600160e01b63a30788150281526001600160a01b0384811660048301529151600093929092169163a307881591602480820192602092909190829003018186803b15801561095057600080fd5b505afa158015610964573d6000803e3d6000fd5b505050506040513d602081101561097a57600080fd5b505192915050565b6012546001600160a01b031681565b8261099b81611f9e565b6109d957604051600160e51b62461bcd02815260040180806020018281038252602481526020018061266f6024913960400191505060405180910390fd5b600554600f5460105460408051600160e01b6323b872dd0281523360048201526001600160a01b03928316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b158015610a3e57600080fd5b505af1158015610a52573d6000803e3d6000fd5b505050506040513d6020811015610a6857600080fd5b5051610abe5760408051600160e51b62461bcd02815260206004820152601460248201527f626f6e64207472616e73666572206661696c6564000000000000000000000000604482015290519081900360640190fd5b601054600754600c546001600160a01b039092169163a85ef579918891339186918a918a91610af29163ffffffff6120b016565b60006040518863ffffffff1660e01b815260040180886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001868152602001806020018481526020018381526020018281038252868682818152602001925080828437600081840152601f19601f82011690508083019250505098505050505050505050600060405180830381600087803b158015610b9c57600080fd5b505af1158015610bb0573d6000803e3d6000fd5b5050600354610bc992509050600163ffffffff6120b016565b6003556040805182815290516001600160a01b038716917fd2819ba4c736158371edf0be38fd8d1fc435609832e392f118c4c79160e5bd7b919081900360200190a25050505050565b60105460408051600160e11b62c985b70281526001600160a01b0384811660048301529151600093849316916301930b6e916024808301926020929190829003018186803b15801561085c57600080fd5b60608180610c7057506004545b610c7c8482600161210d565b949350505050565b600a5481565b60075481565b6011546001600160a01b03163314610cf25760408051600160e51b62461bcd02815260206004820152600f60248201527f6d75737420626520736c61736865720000000000000000000000000000000000604482015290519081900360640190fd5b60105460408051600160e01b63cad413570281526001600160a01b0386811660048301529151600093600293169163cad41357916024808301926020929190829003018186803b158015610d4557600080fd5b505afa158015610d59573d6000803e3d6000fd5b505050506040513d6020811015610d6f57600080fd5b505181610d7857fe5b049050600060048260105460408051600160e21b633ef100bf0281526001600160a01b038a81166004830152602482018890529151949093049450169163fbc402fc9160448082019260009290919082900301818387803b158015610ddc57600080fd5b505af1158015610df0573d6000803e3d6000fd5b50505050610dfd85611b39565b15610e0b57610e0b85612348565b600f5460105460408051600160e01b63a30788150281526001600160a01b03888116600483015291519382169363a9059cbb939092169163a307881591602480820192602092909190829003018186803b158015610e6857600080fd5b505afa158015610e7c573d6000803e3d6000fd5b505050506040513d6020811015610e9257600080fd5b50516040805163ffffffff841660e01b81526001600160a01b039092166004830152602482018590525160448083019260209291908290030181600087803b158015610edd57600080fd5b505af1158015610ef1573d6000803e3d6000fd5b505050506040513d6020811015610f0757600080fd5b5051610f5d5760408051600160e51b62461bcd02815260206004820152601660248201527f726577617264207472616e73666572206661696c656400000000000000000000604482015290519081900360640190fd5b600f5460105460408051600160e01b63a30788150281526001600160a01b03878116600483015291519382169363a9059cbb939092169163a307881591602480820192602092909190829003018186803b158015610fba57600080fd5b505afa158015610fce573d6000803e3d6000fd5b505050506040513d6020811015610fe457600080fd5b50516040805163ffffffff841660e01b81526001600160a01b039092166004830152602482018590525160448083019260209291908290030181600087803b15801561102f57600080fd5b505af1158015611043573d6000803e3d6000fd5b505050506040513d602081101561105957600080fd5b50516110af5760408051600160e51b62461bcd02815260206004820152601660248201527f726577617264207472616e73666572206661696c656400000000000000000000604482015290519081900360640190fd5b5050505050565b60006110c18261132f565b80156111495750600e5460105460408051600160e11b62c985b70281526001600160a01b038681166004830152915191909216916301930b6e916024808301926020929190829003018186803b15801561111a57600080fd5b505afa15801561112e573d6000803e3d6000fd5b505050506040513d602081101561114457600080fd5b505111155b92915050565b600d54600e5482565b60085481565b611166611659565b6111a85760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b600a55565b6111b5611659565b6111f75760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b601060009054906101000a90046001600160a01b03166001600160a01b0316634e71e0c86040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561124757600080fd5b505af115801561125b573d6000803e3d6000fd5b50505050565b60095481565b61126f611659565b6112b15760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60045481565b600b54600c5482565b60408051808201909152600d548152600e54602082015260009061114990839061242a565b60105460408051600160e11b62c985b70281526001600160a01b0384811660048301529151600093849316916301930b6e916024808301926020929190829003018186803b15801561138057600080fd5b505afa158015611394573d6000803e3d6000fd5b505050506040513d60208110156113aa57600080fd5b50519050801580159061089a5750600c54101592915050565b6113cb611659565b61140d5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b600955565b8061141c81611b39565b6114705760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206465726567697374657261626c6500000000000000000000604482015290519081900360640190fd5b60105460408051600160e01b63a30788150281526001600160a01b038086166004830152915185933393169163a3078815916024808301926020929190829003018186803b1580156114c157600080fd5b505afa1580156114d5573d6000803e3d6000fd5b505050506040513d60208110156114eb57600080fd5b50516001600160a01b03161461154b5760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206461726b6e6f6465206f776e657200000000000000000000604482015290519081900360640190fd5b61155483612348565b505050565b60105460408051600160e41b630ee594a50281526001600160a01b0384811660048301529151606093929092169163ee594a5091602480820192600092909190829003018186803b1580156115ad57600080fd5b505afa1580156115c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156115ea57600080fd5b81019080805164010000000081111561160257600080fd5b8201602081018481111561161557600080fd5b815164010000000081118282018710171561162f57600080fd5b50909695505050505050565b600f546001600160a01b031681565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b600e546116e15761167961164a565b6001600160a01b0316336001600160a01b0316146116e15760408051600160e51b62461bcd02815260206004820152601d60248201527f6e6f7420617574686f72697a6564202866697273742065706f63687329000000604482015290519081900360640190fd5b600754600c546116f69163ffffffff6120b016565b43101561174d5760408051600160e51b62461bcd02815260206004820152601d60248201527f65706f636820696e74657276616c20686173206e6f7420706173736564000000604482015290519081900360640190fd5b600b8054600d55600c8054600e556040805180820190915243600019810140808352602090920181905292819055919055600280546004556003549055600554600854146117d957600854600581905560408051828152602081019290925280517f7c77c94944e9e4e5b0d46f1297127d060020792687cd743401d782346c68f6559281900390910190a15b6006546009541461182857600954600681905560408051828152602081019290925280517f6d520e46e5714982ddf8cb6216bcb3e1c1d5b79d337afc305335f819394f5d6a9281900390910190a15b600754600a541461187757600a54600781905560408051828152602081019290925280517fb218cde2730b79a0667ddf869466ee66a12ef56fe65fa4986a590f8a7108c9de9281900390910190a15b6011546012546001600160a01b039081169116146118ef57601254601180546001600160a01b0319166001600160a01b039283169081179182905560408051929093168252602082015281517f933228a1c3ba8fadd3ce47a9db5b898be647f89af99ba7c1b9a655f59ea306c8929181900390910190a15b60405181907faf2fc4796f2932ce294c3684deffe5098d3ef65dc2dd64efa80ef94eed88b01e90600090a250565b6010546001600160a01b031681565b60055481565b6011546001600160a01b031681565b611949611659565b61198b5760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b6001600160a01b0381166119e95760408051600160e51b62461bcd02815260206004820152601760248201527f696e76616c696420736c61736865722061646472657373000000000000000000604482015290519081900360640190fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b60105460408051600160e01b63cad413570281526001600160a01b0384811660048301529151600093929092169163cad4135791602480820192602092909190829003018186803b15801561095057600080fd5b611a67611659565b611aa95760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b60105460408051600160e01b63f2fde38b0281526001600160a01b0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b158015611afa57600080fd5b505af11580156110af573d6000803e3d6000fd5b60408051808201909152600b548152600c54602082015260009061114990839061242a565b60065481565b60105460408051600160e11b62c985b70281526001600160a01b0384811660048301529151600093849316916301930b6e916024808301926020929190829003018186803b158015611b8a57600080fd5b505afa158015611b9e573d6000803e3d6000fd5b505050506040513d6020811015611bb457600080fd5b50519050611bc183611b0e565b801561089a57501592915050565b60608180611bdc57506002545b610c7c8482600061210d565b611bf0611659565b611c325760408051600160e51b62461bcd02815260206004820181905260248201526000805160206126e4833981519152604482015290519081900360640190fd5b611c3b8161256b565b50565b80611c48816110b6565b611c8657604051600160e51b62461bcd02815260040180806020018281038252602b8152602001806126b9602b913960400191505060405180910390fd5b60105460408051600160e01b63a30788150281526001600160a01b0385811660048301529151600093929092169163a307881591602480820192602092909190829003018186803b158015611cda57600080fd5b505afa158015611cee573d6000803e3d6000fd5b505050506040513d6020811015611d0457600080fd5b505160105460408051600160e01b63cad413570281526001600160a01b0387811660048301529151939450600093919092169163cad41357916024808301926020929190829003018186803b158015611d5c57600080fd5b505afa158015611d70573d6000803e3d6000fd5b505050506040513d6020811015611d8657600080fd5b505160105460408051600160e11b6320da21c90281526001600160a01b03888116600483015291519394509116916341b443929160248082019260009290919082900301818387803b158015611ddb57600080fd5b505af1158015611def573d6000803e3d6000fd5b5050600f5460408051600160e01b63a9059cbb0281526001600160a01b03878116600483015260248201879052915191909216935063a9059cbb925060448083019260209291908290030181600087803b158015611e4c57600080fd5b505af1158015611e60573d6000803e3d6000fd5b505050506040513d6020811015611e7657600080fd5b5051611ecc5760408051600160e51b62461bcd02815260206004820152601460248201527f626f6e64207472616e73666572206661696c6564000000000000000000000000604482015290519081900360640190fd5b6040805182815290516001600160a01b038416917f96ab9e56c79eee4a72db6e2879cbfbecdba5c65b411f4861824e66b89df19764919081900360200190a250505050565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015611f965780601f10611f6b57610100808354040283529160200191611f96565b820191906000526020600020905b815481529060010190602001808311611f7957829003601f168201915b505050505081565b60105460408051600160e21b6338b5f1930281526001600160a01b03848116600483015291516000938493169163e2d7c64c916024808301926020929190829003018186803b158015611ff057600080fd5b505afa158015612004573d6000803e3d6000fd5b505050506040513d602081101561201a57600080fd5b505160105460408051600160e11b62c985b70281526001600160a01b038781166004830152915193945060009391909216916301930b6e916024808301926020929190829003018186803b15801561207157600080fd5b505afa158015612085573d6000803e3d6000fd5b505050506040513d602081101561209b57600080fd5b5051905081158015610c7c5750159392505050565b60008282018381101561089a5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6060828061211a57506002545b606081604051908082528060200260200182016040528015612146578160200160208202803883390190505b5090506000866001600160a01b0381166121d757601060009054906101000a90046001600160a01b03166001600160a01b0316631bce6ff36040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a857600080fd5b505afa1580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b505190505b8382101561162f576001600160a01b0381166121f25761162f565b6000861561220a576122038261130a565b9050612216565b61221382611b0e565b90505b806122a05760105460408051600160e11b6355b9f18b0281526001600160a01b0385811660048301529151919092169163ab73e316916024808301926020929190829003018186803b15801561226b57600080fd5b505afa15801561227f573d6000803e3d6000fd5b505050506040513d602081101561229557600080fd5b505191506121d79050565b818484815181106122ad57fe5b6001600160a01b0392831660209182029290920181019190915260105460408051600160e11b6355b9f18b02815286851660048201529051919093169263ab73e316926024808301939192829003018186803b15801561230c57600080fd5b505afa158015612320573d6000803e3d6000fd5b505050506040513d602081101561233657600080fd5b50516001939093019291506121d79050565b601054600754600c546001600160a01b0390921691633ac39d4b9184916123749163ffffffff6120b016565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156123c357600080fd5b505af11580156123d7573d6000803e3d6000fd5b50506003546123f092509050600163ffffffff61260e16565b6003556040516001600160a01b038216907f2dc89de5703d2c341a22ebfc7c4d3f197e5e1f0c19bc2e1135f387163cb927e490600090a250565b60105460408051600160e21b6338b5f1930281526001600160a01b03858116600483015291516000938493169163e2d7c64c916024808301926020929190829003018186803b15801561247c57600080fd5b505afa158015612490573d6000803e3d6000fd5b505050506040513d60208110156124a657600080fd5b505160105460408051600160e11b62c985b70281526001600160a01b038881166004830152915193945060009391909216916301930b6e916024808301926020929190829003018186803b1580156124fd57600080fd5b505afa158015612511573d6000803e3d6000fd5b505050506040513d602081101561252757600080fd5b5051905060008215801590612540575084602001518311155b905060008215806125545750856020015183115b90508180156125605750805b979650505050505050565b6001600160a01b0381166125b357604051600160e51b62461bcd0281526004018080602001828103825260268152602001806126936026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828211156126685760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe6d75737420626520726566756e646564206f72206e6576657220726567697374657265644f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573736d7573742062652064657265676973746572656420666f72206174206c65617374206f6e652065706f63684f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a165627a7a72305820bab9bc785683948abe894b52a6d8c5b82d299fe93f8343f8a65874c30c9cfecb0029", + "sourceMap": "375:21223:2:-;;;4670:847;8:9:-1;5:2;;;30:1;27;20:12;5:2;4670:847:2;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;4670:847:2;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;;4670:847:2;;;;;;;;;;;;;;;;;;;;;;657:6:30;:19;;-1:-1:-1;;;;;;657:19:30;666:10;657:19;;;;691:40;;4670:847:2;;-1:-1:-1;4670:847:2;;-1:-1:-1;4670:847:2;;;;;;;;-1:-1:-1;;;;;724:6:30;;657;691:40;;657:6;;691:40;4914:18:2;;;;:7;;:18;;;;;:::i;:::-;-1:-1:-1;4943:5:2;:21;;-1:-1:-1;;;;;4943:21:2;;;-1:-1:-1;;;;;;4943:21:2;;;;;;;4974:3;:17;;;;;;;;;;;;;;;5002:11;:26;;;5038:15;:29;5078:14;:32;;;-1:-1:-1;5120:35:2;-1:-1:-1;5166:44:2;;;-1:-1:-1;5220:47:2;-1:-1:-1;5293:117:2;;;;;;;;;5342:12;-1:-1:-1;;5342:16:2;;5332:27;5293:117;;;;;;;;;;-1:-1:-1;5278:132:2;;;;;;4943:5;-1:-1:-1;5420:16:2;;;-1:-1:-1;5446:25:2;;;-1:-1:-1;5481:29:2;375:21223;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;375:21223:2;;;-1:-1:-1;375:21223:2;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "375:21223:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;375:21223:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16094:237;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16094:237:2;-1:-1:-1;;;;;16094:237:2;;:::i;:::-;;;;;;;;;;;;;;;;;;859:36;;;:::i;:::-;;;;;;;;;;;;;;;;10190:161;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10190:161:2;;:::i;:::-;;826:27;;;:::i;13858:143::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13858:143:2;-1:-1:-1;;;;;13858:143:2;;:::i;:::-;;;;-1:-1:-1;;;;;13858:143:2;;;;;;;;;;;;;;1798:34;;;:::i;6211:739::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;6211:739:2;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;6211:739:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6211:739:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;6211:739:2;;-1:-1:-1;6211:739:2;-1:-1:-1;6211:739:2;:::i;16478:247::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16478:247:2;-1:-1:-1;;;;;16478:247:2;;:::i;15643:285::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;15643:285:2;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;15643:285:2;;;;;;;;;;;;;;;;;1345:39;;;:::i;1064:35::-;;;:::i;11947:812::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;11947:812:2;;;;;;;;;;;;;;;;;;;:::i;18229:195::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;18229:195:2;-1:-1:-1;;;;;18229:195:2;;:::i;1461:26::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1270:30;;;:::i;10838:197::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10838:197:2;;:::i;9917:89::-;;;:::i;1306:33::-;;;:::i;1599:137:30:-;;;:::i;901:40:2:-;;;:::i;1430:25::-;;;:::i;18720:156::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;18720:156:2;-1:-1:-1;;;;;18720:156:2;;:::i;16799:237::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16799:237:2;-1:-1:-1;;;;;16799:237:2;;:::i;10493:173::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10493:173:2;;:::i;7355:161::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7355:161:2;-1:-1:-1;;;;;7355:161:2;;:::i;14444:148::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;14444:148:2;-1:-1:-1;;;;;14444:148:2;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;14444:148:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1556:19;;;:::i;814:77:30:-;;;:::i;1165:90::-;;;:::i;7692:1710:2:-;;;:::i;1653:34::-;;;:::i;997:26::-;;;:::i;1762:30::-;;;:::i;11187:184::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11187:184:2;-1:-1:-1;;;;;11187:184:2;;:::i;14154:133::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;14154:133:2;-1:-1:-1;;;;;14154:133:2;;:::i;9590:121::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9590:121:2;-1:-1:-1;;;;;9590:121:2;;:::i;18496:140::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;18496:140:2;-1:-1:-1;;;;;18496:140:2;;:::i;1029:29::-;;;:::i;17215:378::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17215:378:2;-1:-1:-1;;;;;17215:378:2;;:::i;15220:265::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;15220:265:2;;;;;;;;:::i;1885:107:30:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1885:107:30;-1:-1:-1;;;;;1885:107:30;;:::i;13144:550:2:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13144:550:2;-1:-1:-1;;;;;13144:550:2;;:::i;451:21::-;;;:::i;17794:280::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17794:280:2;-1:-1:-1;;;;;17794:280:2;;:::i;16094:237::-;16208:5;;:39;;;-1:-1:-1;;;;;16208:39:2;;-1:-1:-1;;;;;16208:39:2;;;;;;;;;16169:4;;;;16208:5;;:26;;:39;;;;;;;;;;;;;;:5;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;16208:39:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16208:39:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16208:39:2;;-1:-1:-1;16264:17:2;;;;;:60;;-1:-1:-1;16300:24:2;;16285:39;;16264:60;16257:67;16094:237;-1:-1:-1;;;16094:237:2:o;859:36::-;;;;:::o;10190:161::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;10310:15:2;:34;10190:161::o;826:27::-;;;;:::o;13858:143::-;13962:5;;:32;;;-1:-1:-1;;;;;13962:32:2;;-1:-1:-1;;;;;13962:32:2;;;;;;;;;13928:15;;13962:5;;;;;:19;;:32;;;;;;;;;;;;;;;:5;:32;;;5:2:-1;;;;30:1;27;20:12;5:2;13962:32:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13962:32:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13962:32:2;;13858:143;-1:-1:-1;;13858:143:2:o;1798:34::-;;;-1:-1:-1;;;;;1798:34:2;;:::o;6211:739::-;6299:11;3434:23;3445:11;3434:10;:23::i;:::-;3426:72;;;;-1:-1:-1;;;;;3426:72:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6401:11;;6465:3;;6502:5;;6465:50;;;-1:-1:-1;;;;;6465:50:2;;6482:10;6465:50;;;;-1:-1:-1;;;;;6502:5:2;;;6465:50;;;;;;;;;;;;:3;;;;;:16;;:50;;;;;;;;;;;;;;6386:12;6465:3;:50;;;5:2:-1;;;;30:1;27;20:12;5:2;6465:50:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6465:50:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6465:50:2;6457:83;;;;;-1:-1:-1;;;;;6457:83:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;6598:5;;6752:20;;6723:24;;-1:-1:-1;;;;;6598:5:2;;;;:20;;6632:11;;6657:10;;6681:4;;6699:10;;;;6723:50;;;:28;:50;:::i;:::-;6787:1;6598:200;;;;;;;;;;;;;-1:-1:-1;;;;;6598:200:2;-1:-1:-1;;;;;6598:200:2;;;;;;-1:-1:-1;;;;;6598:200:2;-1:-1:-1;;;;;6598:200:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;6598:200:2;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6598:200:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;6833:21:2;;:28;;-1:-1:-1;6833:21:2;-1:-1:-1;6859:1:2;6833:28;:25;:28;:::i;:::-;6809:21;:52;6903:40;;;;;;;;-1:-1:-1;;;;;6903:40:2;;;;;;;;;;;;;3508:1;6211:739;;;;:::o;16478:247::-;16596:5;;:41;;;-1:-1:-1;;;;;16596:41:2;;-1:-1:-1;;;;;16596:41:2;;;;;;;;;16555:4;;;;16596:5;;:28;;:41;;;;;;;;;;;;;;:5;:41;;;5:2:-1;;;;30:1;27;20:12;15643:285:2;15728:16;15772:6;15792:10;15788:74;;-1:-1:-1;15826:25:2;;15788:74;15878:43;15901:6;15909:5;15916:4;15878:22;:43::i;:::-;15871:50;15643:285;-1:-1:-1;;;;15643:285:2:o;1345:39::-;;;;:::o;1064:35::-;;;;:::o;11947:812::-;4077:7;;-1:-1:-1;;;;;4077:7:2;4089:10;4069:30;4061:58;;;;;-1:-1:-1;;;;;4061:58:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;12092:5;;:27;;;-1:-1:-1;;;;;12092:27:2;;-1:-1:-1;;;;;12092:27:2;;;;;;;;;12074:15;;12122:1;;12092:5;;:18;;:27;;;;;;;;;;;;;;:5;:27;;;5:2:-1;;;;30:1;27;20:12;5:2;12092:27:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12092:27:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12092:27:2;:31;;;;;;;-1:-1:-1;12133:14:2;12160:1;12092:31;12227:5;;:42;;;-1:-1:-1;;;;;12227:42:2;;-1:-1:-1;;;;;12227:42:2;;;;;;;;;;;;;;;12150:11;;;;;-1:-1:-1;12227:5:2;;:24;;:42;;;;;:5;;:42;;;;;;;;:5;;:42;;;5:2:-1;;;;30:1;27;20:12;5:2;12227:42:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12227:42:2;;;;12356:25;12373:7;12356:16;:25::i;:::-;12352:83;;;12397:27;12416:7;12397:18;:27::i;:::-;12570:3;;12583:5;;:33;;;-1:-1:-1;;;;;12583:33:2;;-1:-1:-1;;;;;12583:33:2;;;;;;;;;12570:3;;;;:12;;12583:5;;;;:19;;:33;;;;;;;;;;;;;;;:5;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;12583:33:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12583:33:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12583:33:2;12570:55;;;;;;;;;;-1:-1:-1;;;;;12570:55:2;;;;;;;;;;;;;;;;;;;12583:33;;12570:55;;;;;;;-1:-1:-1;12570:55:2;;;;5:2:-1;;;;30:1;27;20:12;5:2;12570:55:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12570:55:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12570:55:2;12562:90;;;;;-1:-1:-1;;;;;12562:90:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;12670:3;;12683:5;;:33;;;-1:-1:-1;;;;;12683:33:2;;-1:-1:-1;;;;;12683:33:2;;;;;;;;;12670:3;;;;:12;;12683:5;;;;:19;;:33;;;;;;;;;;;;;;;:5;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;12683:33:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12683:33:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12683:33:2;12670:55;;;;;;;;;;-1:-1:-1;;;;;12670:55:2;;;;;;;;;;;;;;;;;;;12683:33;;12670:55;;;;;;;-1:-1:-1;12670:55:2;;;;5:2:-1;;;;30:1;27;20:12;5:2;12670:55:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12670:55:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12670:55:2;12662:90;;;;;-1:-1:-1;;;;;12662:90:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;4129:1;;11947:812;;;:::o;18229:195::-;18293:4;18316:27;18331:11;18316:14;:27::i;:::-;:101;;;;-1:-1:-1;18392:25:2;;18347:5;;:41;;;-1:-1:-1;;;;;18347:41:2;;-1:-1:-1;;;;;18347:41:2;;;;;;;;;:5;;;;;:28;;:41;;;;;;;;;;;;;;:5;:41;;;5:2:-1;;;;30:1;27;20:12;5:2;18347:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;18347:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;18347:41:2;:70;;18316:101;18309:108;18229:195;-1:-1:-1;;18229:195:2:o;1461:26::-;;;;;;:::o;1270:30::-;;;;:::o;10838:197::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;10976:24:2;:52;10838:197::o;9917:89::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;9977:5:2;;;;;;;;;-1:-1:-1;;;;;9977:5:2;-1:-1:-1;;;;;9977:20:2;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9977:22:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9977:22:2;;;;9917:89::o;1306:33::-;;;;:::o;1599:137:30:-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;1697:1;1681:6;;1660:40;;-1:-1:-1;;;;;1681:6:30;;;;1660:40;;1697:1;;1660:40;1727:1;1710:19;;-1:-1:-1;;;;;;1710:19:30;;;1599:137::o;901:40:2:-;;;;:::o;1430:25::-;;;;;;:::o;18720:156::-;18822:47;;;;;;;;;18855:13;18822:47;;;;;;;;;18799:4;;18822:47;;18842:11;;18822:19;:47::i;16799:237::-;16906:5;;:41;;;-1:-1:-1;;;;;16906:41:2;;-1:-1:-1;;;;;16906:41:2;;;;;;;;;16865:4;;;;16906:5;;:28;;:41;;;;;;;;;;;;;;:5;:41;;;5:2:-1;;;;30:1;27;20:12;5:2;16906:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16906:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16906:41:2;;-1:-1:-1;16964:19:2;;;;;:65;;-1:-1:-1;17005:24:2;;-1:-1:-1;16987:42:2;;16799:237;-1:-1:-1;;16799:237:2:o;10493:173::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;10619:18:2;:40;10493:173::o;7355:161::-;7424:11;3899:29;3916:11;3899:16;:29::i;:::-;3891:64;;;;;-1:-1:-1;;;;;3891:64:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;3225:5;;:32;;;-1:-1:-1;;;;;3225:32:2;;-1:-1:-1;;;;;3225:32:2;;;;;;;;;7455:11;;3261:10;;3225:5;;:19;;:32;;;;;;;;;;;;;;:5;:32;;;5:2:-1;;;;30:1;27;20:12;5:2;3225:32:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3225:32:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3225:32:2;-1:-1:-1;;;;;3225:46:2;;3217:81;;;;;-1:-1:-1;;;;;3217:81:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;7478:31;7497:11;7478:18;:31::i;:::-;3965:1;7355:161;;:::o;14444:148::-;14549:5;;:36;;;-1:-1:-1;;;;;14549:36:2;;-1:-1:-1;;;;;14549:36:2;;;;;;;;;14518:12;;14549:5;;;;;:23;;:36;;;;;:5;;:36;;;;;;;;:5;:36;;;5:2:-1;;;;30:1;27;20:12;5:2;14549:36:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14549:36:2;;;;;;39:16:-1;36:1;17:17;2:54;101:4;14549:36:2;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;14549:36:2;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;14549:36:2;;14444:148;-1:-1:-1;;;;;;14444:148:2:o;1556:19::-;;;-1:-1:-1;;;;;1556:19:2;;:::o;814:77:30:-;852:7;878:6;-1:-1:-1;;;;;878:6:30;814:77;:::o;1165:90::-;1205:4;1242:6;-1:-1:-1;;;;;1242:6:30;1228:10;:20;;1165:90::o;7692:1710:2:-;7732:25;;7728:199;;7875:7;:5;:7::i;:::-;-1:-1:-1;;;;;7861:21:2;:10;-1:-1:-1;;;;;7861:21:2;;7853:63;;;;;-1:-1:-1;;;;;7853:63:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;8044:20;;8015:24;;:50;;;:28;:50;:::i;:::-;7999:12;:66;;7991:108;;;;;-1:-1:-1;;;;;7991:108:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;8239:12;8223:28;;:13;:28;;;;;;8276:90;;;;;;;;;8147:12;-1:-1:-1;;8147:16:2;;8137:27;8276:90;;;;;;;;;;8261:105;;;;;;;-1:-1:-1;8448:12:2;;8420:25;:40;-1:-1:-1;8485:21:2;8470:36;;8615:11;;-1:-1:-1;8596:15:2;:30;8592:160;;8656:15;;8642:11;:29;;;8690:51;;;;;;;;;;;;;;;;;;;;;;;;;8592:160;8787:14;;8765:18;;:36;8761:181;;8834:18;;8817:14;:35;;;8871:60;;;;;;;;;;;;;;;;;;;;;;;;;8761:181;8983:20;;8955:24;;:48;8951:223;;9042:24;;9019:20;:47;;;9085:78;;;;;;;;;;;;;;;;;;;;;;;;;8951:223;9202:7;;9187:11;;-1:-1:-1;;;;;9187:11:2;;;9202:7;;9187:22;9183:150;;9235:11;;9225:7;:21;;-1:-1:-1;;;;;;9225:21:2;-1:-1:-1;;;;;9235:11:2;;;9225:21;;;;;;;9265:57;;;9291:7;;;;9265:57;;;;;;;;;;;;;;;;;;;9183:150;9373:22;;9385:9;;9373:22;;;;;7692:1710;:::o;1653:34::-;;;-1:-1:-1;;;;;1653:34:2;;:::o;997:26::-;;;;:::o;1762:30::-;;;-1:-1:-1;;;;;1762:30:2;;:::o;11187:184::-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;-1:-1:-1;;;;;11273:31:2;;11265:67;;;;;-1:-1:-1;;;;;11265:67:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;11342:11;:22;;-1:-1:-1;;;;;;11342:22:2;-1:-1:-1;;;;;11342:22:2;;;;;;;;;;11187:184::o;14154:133::-;14249:5;;:31;;;-1:-1:-1;;;;;14249:31:2;;-1:-1:-1;;;;;14249:31:2;;;;;;;;;14223:7;;14249:5;;;;;:18;;:31;;;;;;;;;;;;;;;:5;:31;;;5:2:-1;;;;30:1;27;20:12;9590:121:2;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;9670:5:2;;:34;;;-1:-1:-1;;;;;9670:34:2;;-1:-1:-1;;;;;9670:34:2;;;;;;;;;:5;;;;;:23;;:34;;;;;:5;;:34;;;;;;;:5;;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;9670:34:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;18496:140:2;18583:46;;;;;;;;;18616:12;18583:46;;;;;;;;;18560:4;;18583:46;;18603:11;;18583:19;:46::i;1029:29::-;;;;:::o;17215:378::-;17324:5;;:41;;;-1:-1:-1;;;;;17324:41:2;;-1:-1:-1;;;;;17324:41:2;;;;;;;;;17283:4;;;;17324:5;;:28;;:41;;;;;;;;;;;;;;:5;:41;;;5:2:-1;;;;30:1;27;20:12;5:2;17324:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;17324:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17324:41:2;;-1:-1:-1;17538:25:2;17551:11;17538:12;:25::i;:::-;:48;;;;-1:-1:-1;17567:19:2;;17215:378;-1:-1:-1;;17215:378:2:o;15220:265::-;15297:16;15341:6;15361:10;15357:61;;-1:-1:-1;15395:12:2;;15357:61;15434:44;15457:6;15465:5;15472;15434:22;:44::i;1885:107:30:-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:30;;;;;;;;;;;;;;;1957:28;1976:8;1957:18;:28::i;:::-;1885:107;:::o;13144:550:2:-;13205:11;3634:25;3647:11;3634:12;:25::i;:::-;3626:81;;;;-1:-1:-1;;;;;3626:81:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13252:5;;:32;;;-1:-1:-1;;;;;13252:32:2;;-1:-1:-1;;;;;13252:32:2;;;;;;;;;13228:21;;13252:5;;;;;:19;;:32;;;;;;;;;;;;;;;:5;:32;;;5:2:-1;;;;30:1;27;20:12;5:2;13252:32:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13252:32:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13252:32:2;13348:5;;:31;;;-1:-1:-1;;;;;13348:31:2;;-1:-1:-1;;;;;13348:31:2;;;;;;;;;13252:32;;-1:-1:-1;13331:14:2;;13348:5;;;;;:18;;:31;;;;;13252:32;;13348:31;;;;;;;:5;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;13348:31:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13348:31:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13348:31:2;13438:5;;:33;;;-1:-1:-1;;;;;13438:33:2;;-1:-1:-1;;;;;13438:33:2;;;;;;;;;13348:31;;-1:-1:-1;13438:5:2;;;:20;;:33;;;;;:5;;:33;;;;;;;;:5;;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;13438:33:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;13538:3:2;;:35;;;-1:-1:-1;;;;;13538:35:2;;-1:-1:-1;;;;;13538:35:2;;;;;;;;;;;;;;;:3;;;;;-1:-1:-1;13538:12:2;;-1:-1:-1;13538:35:2;;;;;;;;;;;;;;:3;;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;13538:35:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13538:35:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13538:35:2;13530:68;;;;;-1:-1:-1;;;;;13530:68:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;13640:47;;;;;;;;-1:-1:-1;;;;;13640:47:2;;;;;;;;;;;;;3717:1;;13144:550;;:::o;451:21::-;;;;;;;;;;;;;;;-1:-1:-1;;451:21:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;17794:280::-;17895:5;;:39;;;-1:-1:-1;;;;;17895:39:2;;-1:-1:-1;;;;;17895:39:2;;;;;;;;;17856:4;;;;17895:5;;:26;;:39;;;;;;;;;;;;;;:5;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;17895:39:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;17895:39:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17895:39:2;17969:5;;:41;;;-1:-1:-1;;;;;17969:41:2;;-1:-1:-1;;;;;17969:41:2;;;;;;;;;17895:39;;-1:-1:-1;17944:22:2;;17969:5;;;;;:28;;:41;;;;;17895:39;;17969:41;;;;;;;:5;:41;;;5:2:-1;;;;30:1;27;20:12;5:2;17969:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;17969:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17969:41:2;;-1:-1:-1;18027:17:2;;:40;;;;-1:-1:-1;18048:19:2;;18020:47;-1:-1:-1;;;17794:280:2:o;834:176:29:-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:29;;;;;;;;;;;;;;;;;;;;;;;;;;;20005:1165:2;20115:16;20159:6;20179:10;20175:61;;-1:-1:-1;20213:12:2;;20175:61;20246:22;20285:5;20271:20;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;20271:20:2;-1:-1:-1;20246:45:2;-1:-1:-1;20351:9:2;20389:6;-1:-1:-1;;;;;20409:18:2;;20405:69;;20450:5;;;;;;;;;-1:-1:-1;;;;;20450:5:2;-1:-1:-1;;;;;20450:11:2;;:13;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;20450:13:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;20450:13:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20450:13:2;;-1:-1:-1;20405:69:2;20565:5;20561:1;:9;20554:588;;;-1:-1:-1;;;;;20590:18:2;;20586:62;;20628:5;;20586:62;20729:16;20763:17;20759:174;;;20814:33;20842:4;20814:27;:33::i;:::-;20800:47;;20759:174;;;20900:18;20913:4;20900:12;:18::i;:::-;20886:32;;20759:174;20951:11;20946:100;;20989:5;;:16;;;-1:-1:-1;;;;;20989:16:2;;-1:-1:-1;;;;;20989:16:2;;;;;;;;;:5;;;;;:10;;:16;;;;;;;;;;;;;;:5;:16;;;5:2:-1;;;;30:1;27;20:12;5:2;20989:16:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;20989:16:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20989:16:2;;-1:-1:-1;21023:8:2;;-1:-1:-1;21023:8:2;20946:100;21070:4;21059:5;21065:1;21059:8;;;;;;;;-1:-1:-1;;;;;21059:15:2;;;:8;;;;;;;;;;:15;;;;21095:5;;:16;;;-1:-1:-1;;;;;21095:16:2;;;;;;;;;;;:5;;;;;:10;;:16;;;;;21059:8;;21095:16;;;;;:5;:16;;;5:2:-1;;;;30:1;27;20:12;5:2;21095:16:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;21095:16:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21095:16:2;21130:1;21125:6;;;;;21095:16;-1:-1:-1;20554:588:2;;-1:-1:-1;20554:588:2;21236:360;21351:5;;21428:20;;21399:24;;-1:-1:-1;;;;;21351:5:2;;;;:34;;21386:11;;21399:50;;;:28;:50;:::i;:::-;21351:99;;;;;;;;;;;;;-1:-1:-1;;;;;21351:99:2;-1:-1:-1;;;;;21351:99:2;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;21351:99:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;21484:21:2;;:28;;-1:-1:-1;21484:21:2;-1:-1:-1;21510:1:2;21484:28;:25;:28;:::i;:::-;21460:21;:52;21553:36;;-1:-1:-1;;;;;21553:36:2;;;;;;;;21236:360;:::o;19082:608::-;19214:5;;:39;;;-1:-1:-1;;;;;19214:39:2;;-1:-1:-1;;;;;19214:39:2;;;;;;;;;19175:4;;;;19214:5;;:26;;:39;;;;;;;;;;;;;;:5;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;19214:39:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;19214:39:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;19214:39:2;19288:5;;:41;;;-1:-1:-1;;;;;19288:41:2;;-1:-1:-1;;;;;19288:41:2;;;;;;;;;19214:39;;-1:-1:-1;19263:22:2;;19288:5;;;;;:28;;:41;;;;;19214:39;;19288:41;;;;;;;:5;:41;;;5:2:-1;;;;30:1;27;20:12;5:2;19288:41:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;19288:41:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;19288:41:2;;-1:-1:-1;19339:15:2;19357:17;;;;;:55;;;19394:6;:18;;;19378:12;:34;;19357:55;19339:73;-1:-1:-1;19422:20:2;19445:19;;;:58;;;19485:6;:18;;;19468:14;:35;19445:58;19422:81;;19654:10;:29;;;;;19668:15;19654:29;19647:36;19082:608;-1:-1:-1;;;;;;;19082:608:2:o;2093:225:30:-;-1:-1:-1;;;;;2166:22:30;;2158:73;;;;-1:-1:-1;;;;;2158:73:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2267:6;;;2246:38;;-1:-1:-1;;;;;2246:38:30;;;;2267:6;;;2246:38;;;2294:6;:17;;-1:-1:-1;;;;;;2294:17:30;-1:-1:-1;;;;;2294:17:30;;;;;;;;;;2093:225::o;1274:179:29:-;1332:7;1364:1;1359;:6;;1351:49;;;;;-1:-1:-1;;;;;1351:49:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:29;;;1274:179::o", + "source": "pragma solidity ^0.5.8;\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\n\nimport \"../RenToken/RenToken.sol\";\nimport \"../DarknodeSlasher/DarknodeSlasher.sol\";\nimport \"./DarknodeRegistryStore.sol\";\n\n/// @notice DarknodeRegistry is responsible for the registration and\n/// deregistration of Darknodes.\ncontract DarknodeRegistry is Ownable {\n using SafeMath for uint256;\n\n string public VERSION; // Passed in as a constructor parameter.\n\n /// @notice Darknode pods are shuffled after a fixed number of blocks.\n /// An Epoch stores an epoch hash used as an (insecure) RNG seed, and the\n /// blocknumber which restricts when the next epoch can be called.\n struct Epoch {\n uint256 epochhash;\n uint256 blocknumber;\n }\n\n uint256 public numDarknodes;\n uint256 public numDarknodesNextEpoch;\n uint256 public numDarknodesPreviousEpoch;\n\n /// Variables used to parameterize behavior.\n uint256 public minimumBond;\n uint256 public minimumPodSize;\n uint256 public minimumEpochInterval;\n\n /// When one of the above variables is modified, it is only updated when the\n /// next epoch is called. These variables store the values for the next epoch.\n uint256 public nextMinimumBond;\n uint256 public nextMinimumPodSize;\n uint256 public nextMinimumEpochInterval;\n\n /// The current and previous epoch\n Epoch public currentEpoch;\n Epoch public previousEpoch;\n\n /// Republic ERC20 token contract used to transfer bonds.\n RenToken public ren;\n\n /// Darknode Registry Store is the storage contract for darknodes.\n DarknodeRegistryStore public store;\n\n /// Darknode Slasher allows darknodes to vote on bond slashing.\n DarknodeSlasher public slasher;\n DarknodeSlasher public nextSlasher;\n\n /// @notice Emitted when a darknode is registered.\n /// @param _darknodeID The darknode ID that was registered.\n /// @param _bond The amount of REN that was transferred as bond.\n event LogDarknodeRegistered(address indexed _darknodeID, uint256 _bond);\n\n /// @notice Emitted when a darknode is deregistered.\n /// @param _darknodeID The darknode ID that was deregistered.\n event LogDarknodeDeregistered(address indexed _darknodeID);\n\n /// @notice Emitted when a refund has been made.\n /// @param _owner The address that was refunded.\n /// @param _amount The amount of REN that was refunded.\n event LogDarknodeOwnerRefunded(address indexed _owner, uint256 _amount);\n\n /// @notice Emitted when a new epoch has begun.\n event LogNewEpoch(uint256 indexed epochhash);\n\n /// @notice Emitted when a constructor parameter has been updated.\n event LogMinimumBondUpdated(uint256 previousMinimumBond, uint256 nextMinimumBond);\n event LogMinimumPodSizeUpdated(uint256 previousMinimumPodSize, uint256 nextMinimumPodSize);\n event LogMinimumEpochIntervalUpdated(uint256 previousMinimumEpochInterval, uint256 nextMinimumEpochInterval);\n event LogSlasherUpdated(address previousSlasher, address nextSlasher);\n\n /// @notice Only allow the owner that registered the darknode to pass.\n modifier onlyDarknodeOwner(address _darknodeID) {\n require(store.darknodeOwner(_darknodeID) == msg.sender, \"must be darknode owner\");\n _;\n }\n\n /// @notice Only allow unregistered darknodes.\n modifier onlyRefunded(address _darknodeID) {\n require(isRefunded(_darknodeID), \"must be refunded or never registered\");\n _;\n }\n\n /// @notice Only allow refundable darknodes.\n modifier onlyRefundable(address _darknodeID) {\n require(isRefundable(_darknodeID), \"must be deregistered for at least one epoch\");\n _;\n }\n\n /// @notice Only allowed registered nodes without a pending deregistration to\n /// deregister\n modifier onlyDeregisterable(address _darknodeID) {\n require(isDeregisterable(_darknodeID), \"must be deregisterable\");\n _;\n }\n\n /// @notice Only allow the Slasher contract.\n modifier onlySlasher() {\n require(address(slasher) == msg.sender, \"must be slasher\");\n _;\n }\n\n /// @notice The contract constructor.\n ///\n /// @param _VERSION A string defining the contract version.\n /// @param _renAddress The address of the RenToken contract.\n /// @param _storeAddress The address of the DarknodeRegistryStore contract.\n /// @param _minimumBond The minimum bond amount that can be submitted by a\n /// Darknode.\n /// @param _minimumPodSize The minimum size of a Darknode pod.\n /// @param _minimumEpochInterval The minimum number of blocks between\n /// epochs.\n constructor(\n string memory _VERSION,\n RenToken _renAddress,\n DarknodeRegistryStore _storeAddress,\n uint256 _minimumBond,\n uint256 _minimumPodSize,\n uint256 _minimumEpochInterval\n ) public {\n VERSION = _VERSION;\n\n store = _storeAddress;\n ren = _renAddress;\n\n minimumBond = _minimumBond;\n nextMinimumBond = minimumBond;\n\n minimumPodSize = _minimumPodSize;\n nextMinimumPodSize = minimumPodSize;\n\n minimumEpochInterval = _minimumEpochInterval;\n nextMinimumEpochInterval = minimumEpochInterval;\n\n currentEpoch = Epoch({\n epochhash: uint256(blockhash(block.number - 1)),\n blocknumber: block.number\n });\n numDarknodes = 0;\n numDarknodesNextEpoch = 0;\n numDarknodesPreviousEpoch = 0;\n }\n\n /// @notice Register a darknode and transfer the bond to this contract.\n /// Before registering, the bond transfer must be approved in the REN\n /// contract. The caller must provide a public encryption key for the\n /// darknode. The darknode will remain pending registration until the next\n /// epoch. Only after this period can the darknode be deregistered. The\n /// caller of this method will be stored as the owner of the darknode.\n ///\n /// @param _darknodeID The darknode ID that will be registered.\n /// @param _publicKey The public key of the darknode. It is stored to allow\n /// other darknodes and traders to encrypt messages to the trader.\n function register(address _darknodeID, bytes calldata _publicKey) external onlyRefunded(_darknodeID) {\n // Use the current minimum bond as the darknode's bond.\n uint256 bond = minimumBond;\n\n // Transfer bond to store\n require(ren.transferFrom(msg.sender, address(store), bond), \"bond transfer failed\");\n\n // Flag this darknode for registration\n store.appendDarknode(\n _darknodeID,\n msg.sender,\n bond,\n _publicKey,\n currentEpoch.blocknumber.add(minimumEpochInterval),\n 0\n );\n\n numDarknodesNextEpoch = numDarknodesNextEpoch.add(1);\n\n // Emit an event.\n emit LogDarknodeRegistered(_darknodeID, bond);\n }\n\n /// @notice Deregister a darknode. The darknode will not be deregistered\n /// until the end of the epoch. After another epoch, the bond can be\n /// refunded by calling the refund method.\n /// @param _darknodeID The darknode ID that will be deregistered. The caller\n /// of this method store.darknodeRegisteredAt(_darknodeID) must be\n // the owner of this darknode.\n function deregister(address _darknodeID) external onlyDeregisterable(_darknodeID) onlyDarknodeOwner(_darknodeID) {\n deregisterDarknode(_darknodeID);\n }\n\n /// @notice Progress the epoch if it is possible to do so. This captures\n /// the current timestamp and current blockhash and overrides the current\n /// epoch.\n function epoch() external {\n if (previousEpoch.blocknumber == 0) {\n // The first epoch must be called by the owner of the contract\n require(msg.sender == owner(), \"not authorized (first epochs)\");\n }\n\n // Require that the epoch interval has passed\n require(block.number >= currentEpoch.blocknumber.add(minimumEpochInterval), \"epoch interval has not passed\");\n uint256 epochhash = uint256(blockhash(block.number - 1));\n\n // Update the epoch hash and timestamp\n previousEpoch = currentEpoch;\n currentEpoch = Epoch({\n epochhash: epochhash,\n blocknumber: block.number\n });\n\n // Update the registry information\n numDarknodesPreviousEpoch = numDarknodes;\n numDarknodes = numDarknodesNextEpoch;\n\n // If any update functions have been called, update the values now\n if (nextMinimumBond != minimumBond) {\n minimumBond = nextMinimumBond;\n emit LogMinimumBondUpdated(minimumBond, nextMinimumBond);\n }\n if (nextMinimumPodSize != minimumPodSize) {\n minimumPodSize = nextMinimumPodSize;\n emit LogMinimumPodSizeUpdated(minimumPodSize, nextMinimumPodSize);\n }\n if (nextMinimumEpochInterval != minimumEpochInterval) {\n minimumEpochInterval = nextMinimumEpochInterval;\n emit LogMinimumEpochIntervalUpdated(minimumEpochInterval, nextMinimumEpochInterval);\n }\n if (nextSlasher != slasher) {\n slasher = nextSlasher;\n emit LogSlasherUpdated(address(slasher), address(nextSlasher));\n }\n\n // Emit an event\n emit LogNewEpoch(epochhash);\n }\n\n /// @notice Allows the contract owner to initiate an ownership transfer of\n /// the DarknodeRegistryStore. \n /// @param _newOwner The address to transfer the ownership to.\n function transferStoreOwnership(address _newOwner) external onlyOwner {\n store.transferOwnership(_newOwner);\n }\n\n /// @notice Claims ownership of the store passed in to the constructor.\n /// `transferStoreOwnership` must have previously been called when\n /// transferring from another Darknode Registry.\n function claimStoreOwnership() external onlyOwner {\n store.claimOwnership();\n }\n\n /// @notice Allows the contract owner to update the minimum bond.\n /// @param _nextMinimumBond The minimum bond amount that can be submitted by\n /// a darknode.\n function updateMinimumBond(uint256 _nextMinimumBond) external onlyOwner {\n // Will be updated next epoch\n nextMinimumBond = _nextMinimumBond;\n }\n\n /// @notice Allows the contract owner to update the minimum pod size.\n /// @param _nextMinimumPodSize The minimum size of a pod.\n function updateMinimumPodSize(uint256 _nextMinimumPodSize) external onlyOwner {\n // Will be updated next epoch\n nextMinimumPodSize = _nextMinimumPodSize;\n }\n\n /// @notice Allows the contract owner to update the minimum epoch interval.\n /// @param _nextMinimumEpochInterval The minimum number of blocks between epochs.\n function updateMinimumEpochInterval(uint256 _nextMinimumEpochInterval) external onlyOwner {\n // Will be updated next epoch\n nextMinimumEpochInterval = _nextMinimumEpochInterval;\n }\n\n /// @notice Allow the contract owner to update the DarknodeSlasher contract\n /// address.\n /// @param _slasher The new slasher address.\n function updateSlasher(DarknodeSlasher _slasher) external onlyOwner {\n require(address(_slasher) != address(0), \"invalid slasher address\");\n nextSlasher = _slasher;\n }\n\n /// @notice Allow the DarknodeSlasher contract to slash half of a darknode's\n /// bond and deregister it. The bond is distributed as follows:\n /// 1/2 is kept by the guilty prover\n /// 1/8 is rewarded to the first challenger\n /// 1/8 is rewarded to the second challenger\n /// 1/4 becomes unassigned\n /// @param _prover The guilty prover whose bond is being slashed\n /// @param _challenger1 The first of the two darknodes who submitted the challenge\n /// @param _challenger2 The second of the two darknodes who submitted the challenge\n function slash(address _prover, address _challenger1, address _challenger2)\n external\n onlySlasher\n {\n uint256 penalty = store.darknodeBond(_prover) / 2;\n uint256 reward = penalty / 4;\n\n // Slash the bond of the failed prover in half\n store.updateDarknodeBond(_prover, penalty);\n\n // If the darknode has not been deregistered then deregister it\n if (isDeregisterable(_prover)) {\n deregisterDarknode(_prover);\n }\n\n // Reward the challengers with less than the penalty so that it is not\n // worth challenging yourself\n require(ren.transfer(store.darknodeOwner(_challenger1), reward), \"reward transfer failed\");\n require(ren.transfer(store.darknodeOwner(_challenger2), reward), \"reward transfer failed\");\n }\n\n /// @notice Refund the bond of a deregistered darknode. This will make the\n /// darknode available for registration again. Anyone can call this function\n /// but the bond will always be refunded to the darknode owner.\n ///\n /// @param _darknodeID The darknode ID that will be refunded. The caller\n /// of this method must be the owner of this darknode.\n function refund(address _darknodeID) external onlyRefundable(_darknodeID) {\n address darknodeOwner = store.darknodeOwner(_darknodeID);\n\n // Remember the bond amount\n uint256 amount = store.darknodeBond(_darknodeID);\n\n // Erase the darknode from the registry\n store.removeDarknode(_darknodeID);\n\n // Refund the owner by transferring REN\n require(ren.transfer(darknodeOwner, amount), \"bond transfer failed\");\n\n // Emit an event.\n emit LogDarknodeOwnerRefunded(darknodeOwner, amount);\n }\n\n /// @notice Retrieves the address of the account that registered a darknode.\n /// @param _darknodeID The ID of the darknode to retrieve the owner for.\n function getDarknodeOwner(address _darknodeID) external view returns (address payable) {\n return store.darknodeOwner(_darknodeID);\n }\n\n /// @notice Retrieves the bond amount of a darknode in 10^-18 REN.\n /// @param _darknodeID The ID of the darknode to retrieve the bond for.\n function getDarknodeBond(address _darknodeID) external view returns (uint256) {\n return store.darknodeBond(_darknodeID);\n }\n\n /// @notice Retrieves the encryption public key of the darknode.\n /// @param _darknodeID The ID of the darknode to retrieve the public key for.\n function getDarknodePublicKey(address _darknodeID) external view returns (bytes memory) {\n return store.darknodePublicKey(_darknodeID);\n }\n\n /// @notice Retrieves a list of darknodes which are registered for the\n /// current epoch.\n /// @param _start A darknode ID used as an offset for the list. If _start is\n /// 0x0, the first dark node will be used. _start won't be\n /// included it is not registered for the epoch.\n /// @param _count The number of darknodes to retrieve starting from _start.\n /// If _count is 0, all of the darknodes from _start are\n /// retrieved. If _count is more than the remaining number of\n /// registered darknodes, the rest of the list will contain\n /// 0x0s.\n function getDarknodes(address _start, uint256 _count) external view returns (address[] memory) {\n uint256 count = _count;\n if (count == 0) {\n count = numDarknodes;\n }\n return getDarknodesFromEpochs(_start, count, false);\n }\n\n /// @notice Retrieves a list of darknodes which were registered for the\n /// previous epoch. See `getDarknodes` for the parameter documentation.\n function getPreviousDarknodes(address _start, uint256 _count) external view returns (address[] memory) {\n uint256 count = _count;\n if (count == 0) {\n count = numDarknodesPreviousEpoch;\n }\n return getDarknodesFromEpochs(_start, count, true);\n }\n\n /// @notice Returns whether a darknode is scheduled to become registered\n /// at next epoch.\n /// @param _darknodeID The ID of the darknode to return\n function isPendingRegistration(address _darknodeID) external view returns (bool) {\n uint256 registeredAt = store.darknodeRegisteredAt(_darknodeID);\n return registeredAt != 0 && registeredAt > currentEpoch.blocknumber;\n }\n\n /// @notice Returns if a darknode is in the pending deregistered state. In\n /// this state a darknode is still considered registered.\n function isPendingDeregistration(address _darknodeID) external view returns (bool) {\n uint256 deregisteredAt = store.darknodeDeregisteredAt(_darknodeID);\n return deregisteredAt != 0 && deregisteredAt > currentEpoch.blocknumber;\n }\n\n /// @notice Returns if a darknode is in the deregistered state.\n function isDeregistered(address _darknodeID) public view returns (bool) {\n uint256 deregisteredAt = store.darknodeDeregisteredAt(_darknodeID);\n return deregisteredAt != 0 && deregisteredAt <= currentEpoch.blocknumber;\n }\n\n /// @notice Returns if a darknode can be deregistered. This is true if the\n /// darknodes is in the registered state and has not attempted to\n /// deregister yet.\n function isDeregisterable(address _darknodeID) public view returns (bool) {\n uint256 deregisteredAt = store.darknodeDeregisteredAt(_darknodeID);\n // The Darknode is currently in the registered state and has not been\n // transitioned to the pending deregistration, or deregistered, state\n return isRegistered(_darknodeID) && deregisteredAt == 0;\n }\n\n /// @notice Returns if a darknode is in the refunded state. This is true\n /// for darknodes that have never been registered, or darknodes that have\n /// been deregistered and refunded.\n function isRefunded(address _darknodeID) public view returns (bool) {\n uint256 registeredAt = store.darknodeRegisteredAt(_darknodeID);\n uint256 deregisteredAt = store.darknodeDeregisteredAt(_darknodeID);\n return registeredAt == 0 && deregisteredAt == 0;\n }\n\n /// @notice Returns if a darknode is refundable. This is true for darknodes\n /// that have been in the deregistered state for one full epoch.\n function isRefundable(address _darknodeID) public view returns (bool) {\n return isDeregistered(_darknodeID) && store.darknodeDeregisteredAt(_darknodeID) <= previousEpoch.blocknumber;\n }\n\n /// @notice Returns if a darknode is in the registered state.\n function isRegistered(address _darknodeID) public view returns (bool) {\n return isRegisteredInEpoch(_darknodeID, currentEpoch);\n }\n\n /// @notice Returns if a darknode was in the registered state last epoch.\n function isRegisteredInPreviousEpoch(address _darknodeID) public view returns (bool) {\n return isRegisteredInEpoch(_darknodeID, previousEpoch);\n }\n\n /// @notice Returns if a darknode was in the registered state for a given\n /// epoch.\n /// @param _darknodeID The ID of the darknode\n /// @param _epoch One of currentEpoch, previousEpoch\n function isRegisteredInEpoch(address _darknodeID, Epoch memory _epoch) private view returns (bool) {\n uint256 registeredAt = store.darknodeRegisteredAt(_darknodeID);\n uint256 deregisteredAt = store.darknodeDeregisteredAt(_darknodeID);\n bool registered = registeredAt != 0 && registeredAt <= _epoch.blocknumber;\n bool notDeregistered = deregisteredAt == 0 || deregisteredAt > _epoch.blocknumber;\n // The Darknode has been registered and has not yet been deregistered,\n // although it might be pending deregistration\n return registered && notDeregistered;\n }\n\n /// @notice Returns a list of darknodes registered for either the current\n /// or the previous epoch. See `getDarknodes` for documentation on the\n /// parameters `_start` and `_count`.\n /// @param _usePreviousEpoch If true, use the previous epoch, otherwise use\n /// the current epoch.\n function getDarknodesFromEpochs(address _start, uint256 _count, bool _usePreviousEpoch) private view returns (address[] memory) {\n uint256 count = _count;\n if (count == 0) {\n count = numDarknodes;\n }\n\n address[] memory nodes = new address[](count);\n\n // Begin with the first node in the list\n uint256 n = 0;\n address next = _start;\n if (next == address(0)) {\n next = store.begin();\n }\n\n // Iterate until all registered Darknodes have been collected\n while (n < count) {\n if (next == address(0)) {\n break;\n }\n // Only include Darknodes that are currently registered\n bool includeNext;\n if (_usePreviousEpoch) {\n includeNext = isRegisteredInPreviousEpoch(next);\n } else {\n includeNext = isRegistered(next);\n }\n if (!includeNext) {\n next = store.next(next);\n continue;\n }\n nodes[n] = next;\n next = store.next(next);\n n += 1;\n }\n return nodes;\n }\n\n /// Private function called by `deregister` and `slash`\n function deregisterDarknode(address _darknodeID) private {\n // Flag the darknode for deregistration\n store.updateDarknodeDeregisteredAt(_darknodeID, currentEpoch.blocknumber.add(minimumEpochInterval));\n numDarknodesNextEpoch = numDarknodesNextEpoch.sub(1);\n\n // Emit an event\n emit LogDarknodeDeregistered(_darknodeID);\n }\n}\n", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol", + "exportedSymbols": { + "DarknodeRegistry": [ + 2379 + ] + }, + "id": 2380, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1278, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 1279, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 6512, + "src": "25:63:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 1280, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 6401, + "src": "89:59:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol", + "file": "../RenToken/RenToken.sol", + "id": 1281, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 2797, + "src": "150:34:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol", + "file": "../DarknodeSlasher/DarknodeSlasher.sol", + "id": 1282, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 2711, + "src": "185:48:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol", + "file": "./DarknodeRegistryStore.sol", + "id": 1283, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 2672, + "src": "234:37:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1284, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6511, + "src": "404:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$6511", + "typeString": "contract Ownable" + } + }, + "id": 1285, + "nodeType": "InheritanceSpecifier", + "src": "404:7:2" + } + ], + "contractDependencies": [ + 6511 + ], + "contractKind": "contract", + "documentation": "@notice DarknodeRegistry is responsible for the registration and\n deregistration of Darknodes.", + "fullyImplemented": true, + "id": 2379, + "linearizedBaseContracts": [ + 2379, + 6511 + ], + "name": "DarknodeRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1288, + "libraryName": { + "contractScope": null, + "id": 1286, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6400, + "src": "424:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6400", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "418:27:2", + "typeName": { + "id": 1287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "437:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 1290, + "name": "VERSION", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "451:21:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 1289, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "451:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "DarknodeRegistry.Epoch", + "id": 1295, + "members": [ + { + "constant": false, + "id": 1292, + "name": "epochhash", + "nodeType": "VariableDeclaration", + "scope": 1295, + "src": "767:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1294, + "name": "blocknumber", + "nodeType": "VariableDeclaration", + "scope": 1295, + "src": "794:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1293, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "794:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Epoch", + "nodeType": "StructDefinition", + "scope": 2379, + "src": "744:76:2", + "visibility": "public" + }, + { + "constant": false, + "id": 1297, + "name": "numDarknodes", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "826:27:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1296, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "826:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1299, + "name": "numDarknodesNextEpoch", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "859:36:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "859:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1301, + "name": "numDarknodesPreviousEpoch", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "901:40:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "901:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1303, + "name": "minimumBond", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "997:26:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "997:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1305, + "name": "minimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1029:29:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1304, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1029:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1307, + "name": "minimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1064:35:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1064:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1309, + "name": "nextMinimumBond", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1270:30:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1308, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1270:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1311, + "name": "nextMinimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1306:33:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1306:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1313, + "name": "nextMinimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1345:39:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1345:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1315, + "name": "currentEpoch", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1430:25:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch" + }, + "typeName": { + "contractScope": null, + "id": 1314, + "name": "Epoch", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1295, + "src": "1430:5:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage_ptr", + "typeString": "struct DarknodeRegistry.Epoch" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1317, + "name": "previousEpoch", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1461:26:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch" + }, + "typeName": { + "contractScope": null, + "id": 1316, + "name": "Epoch", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1295, + "src": "1461:5:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage_ptr", + "typeString": "struct DarknodeRegistry.Epoch" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1319, + "name": "ren", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1556:19:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + }, + "typeName": { + "contractScope": null, + "id": 1318, + "name": "RenToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2796, + "src": "1556:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1321, + "name": "store", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1653:34:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + }, + "typeName": { + "contractScope": null, + "id": 1320, + "name": "DarknodeRegistryStore", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2671, + "src": "1653:21:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1323, + "name": "slasher", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1762:30:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + }, + "typeName": { + "contractScope": null, + "id": 1322, + "name": "DarknodeSlasher", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2710, + "src": "1762:15:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1325, + "name": "nextSlasher", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1798:34:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + }, + "typeName": { + "contractScope": null, + "id": 1324, + "name": "DarknodeSlasher", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2710, + "src": "1798:15:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode is registered.\n @param _darknodeID The darknode ID that was registered.\n @param _bond The amount of REN that was transferred as bond.", + "id": 1331, + "name": "LogDarknodeRegistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 1330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1327, + "indexed": true, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1331, + "src": "2055:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1329, + "indexed": false, + "name": "_bond", + "nodeType": "VariableDeclaration", + "scope": 1331, + "src": "2084:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1328, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2084:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2054:44:2" + }, + "src": "2027:72:2" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode is deregistered.\n @param _darknodeID The darknode ID that was deregistered.", + "id": 1335, + "name": "LogDarknodeDeregistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1333, + "indexed": true, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1335, + "src": "2258:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1332, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2258:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2257:29:2" + }, + "src": "2228:59:2" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a refund has been made.\n @param _owner The address that was refunded.\n @param _amount The amount of REN that was refunded.", + "id": 1341, + "name": "LogDarknodeOwnerRefunded", + "nodeType": "EventDefinition", + "parameters": { + "id": 1340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1337, + "indexed": true, + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 1341, + "src": "2490:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2490:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1339, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1341, + "src": "2514:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2514:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2489:41:2" + }, + "src": "2459:72:2" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a new epoch has begun.", + "id": 1345, + "name": "LogNewEpoch", + "nodeType": "EventDefinition", + "parameters": { + "id": 1344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1343, + "indexed": true, + "name": "epochhash", + "nodeType": "VariableDeclaration", + "scope": 1345, + "src": "2607:25:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2607:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2606:27:2" + }, + "src": "2589:45:2" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a constructor parameter has been updated.", + "id": 1351, + "name": "LogMinimumBondUpdated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1347, + "indexed": false, + "name": "previousMinimumBond", + "nodeType": "VariableDeclaration", + "scope": 1351, + "src": "2739:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1346, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2739:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1349, + "indexed": false, + "name": "nextMinimumBond", + "nodeType": "VariableDeclaration", + "scope": 1351, + "src": "2768:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2768:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2738:54:2" + }, + "src": "2711:82:2" + }, + { + "anonymous": false, + "documentation": null, + "id": 1357, + "name": "LogMinimumPodSizeUpdated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1353, + "indexed": false, + "name": "previousMinimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 1357, + "src": "2829:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1352, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2829:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1355, + "indexed": false, + "name": "nextMinimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 1357, + "src": "2861:26:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2861:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2828:60:2" + }, + "src": "2798:91:2" + }, + { + "anonymous": false, + "documentation": null, + "id": 1363, + "name": "LogMinimumEpochIntervalUpdated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1359, + "indexed": false, + "name": "previousMinimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 1363, + "src": "2931:36:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2931:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1361, + "indexed": false, + "name": "nextMinimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 1363, + "src": "2969:32:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1360, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2969:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2930:72:2" + }, + "src": "2894:109:2" + }, + { + "anonymous": false, + "documentation": null, + "id": 1369, + "name": "LogSlasherUpdated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1368, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1365, + "indexed": false, + "name": "previousSlasher", + "nodeType": "VariableDeclaration", + "scope": 1369, + "src": "3032:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1364, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3032:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1367, + "indexed": false, + "name": "nextSlasher", + "nodeType": "VariableDeclaration", + "scope": 1369, + "src": "3057:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1366, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3057:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3031:46:2" + }, + "src": "3008:70:2" + }, + { + "body": { + "id": 1385, + "nodeType": "Block", + "src": "3207:109:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1376, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1371, + "src": "3245:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1374, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "3225:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "3225:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3225:32:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1378, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "3261:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3261:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3225:46:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206461726b6e6f6465206f776e6572", + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3273:24:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_831f12230b75eb89b16a9643851b495cabcf2cc09c176ca1a6f98ca413f7a341", + "typeString": "literal_string \"must be darknode owner\"" + }, + "value": "must be darknode owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_831f12230b75eb89b16a9643851b495cabcf2cc09c176ca1a6f98ca413f7a341", + "typeString": "literal_string \"must be darknode owner\"" + } + ], + "id": 1373, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3217:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3217:81:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1383, + "nodeType": "ExpressionStatement", + "src": "3217:81:2" + }, + { + "id": 1384, + "nodeType": "PlaceholderStatement", + "src": "3308:1:2" + } + ] + }, + "documentation": "@notice Only allow the owner that registered the darknode to pass.", + "id": 1386, + "name": "onlyDarknodeOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1372, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1371, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1386, + "src": "3186:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3186:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3185:21:2" + }, + "src": "3159:157:2", + "visibility": "internal" + }, + { + "body": { + "id": 1398, + "nodeType": "Block", + "src": "3416:100:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1392, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1388, + "src": "3445:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1391, + "name": "isRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "3434:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3434:23:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d75737420626520726566756e646564206f72206e657665722072656769737465726564", + "id": 1394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3459:38:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_149ca671aef3cc8634c748e8de5c177049eb721378103c16e11a6afd3213db7b", + "typeString": "literal_string \"must be refunded or never registered\"" + }, + "value": "must be refunded or never registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_149ca671aef3cc8634c748e8de5c177049eb721378103c16e11a6afd3213db7b", + "typeString": "literal_string \"must be refunded or never registered\"" + } + ], + "id": 1390, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3426:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3426:72:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1396, + "nodeType": "ExpressionStatement", + "src": "3426:72:2" + }, + { + "id": 1397, + "nodeType": "PlaceholderStatement", + "src": "3508:1:2" + } + ] + }, + "documentation": "@notice Only allow unregistered darknodes.", + "id": 1399, + "name": "onlyRefunded", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1388, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1399, + "src": "3395:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3395:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3394:21:2" + }, + "src": "3373:143:2", + "visibility": "internal" + }, + { + "body": { + "id": 1411, + "nodeType": "Block", + "src": "3616:109:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1405, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1401, + "src": "3647:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1404, + "name": "isRefundable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2154, + "src": "3634:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3634:25:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d7573742062652064657265676973746572656420666f72206174206c65617374206f6e652065706f6368", + "id": 1407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3661:45:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ad5b476938769c593e29df585d22f106bae979def8bfff763442542e2fb97c7", + "typeString": "literal_string \"must be deregistered for at least one epoch\"" + }, + "value": "must be deregistered for at least one epoch" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3ad5b476938769c593e29df585d22f106bae979def8bfff763442542e2fb97c7", + "typeString": "literal_string \"must be deregistered for at least one epoch\"" + } + ], + "id": 1403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3626:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3626:81:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1409, + "nodeType": "ExpressionStatement", + "src": "3626:81:2" + }, + { + "id": 1410, + "nodeType": "PlaceholderStatement", + "src": "3717:1:2" + } + ] + }, + "documentation": "@notice Only allow refundable darknodes.", + "id": 1412, + "name": "onlyRefundable", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1401, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1412, + "src": "3595:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3595:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3594:21:2" + }, + "src": "3571:154:2", + "visibility": "internal" + }, + { + "body": { + "id": 1424, + "nodeType": "Block", + "src": "3881:92:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1418, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1414, + "src": "3916:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1417, + "name": "isDeregisterable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2104, + "src": "3899:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3899:29:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206465726567697374657261626c65", + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3930:24:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ca73111039bd6419843e4c0e5ab9c6f6d6f96c0339a4d266c0ef9fad587b157c", + "typeString": "literal_string \"must be deregisterable\"" + }, + "value": "must be deregisterable" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ca73111039bd6419843e4c0e5ab9c6f6d6f96c0339a4d266c0ef9fad587b157c", + "typeString": "literal_string \"must be deregisterable\"" + } + ], + "id": 1416, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3891:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3891:64:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1422, + "nodeType": "ExpressionStatement", + "src": "3891:64:2" + }, + { + "id": 1423, + "nodeType": "PlaceholderStatement", + "src": "3965:1:2" + } + ] + }, + "documentation": "@notice Only allowed registered nodes without a pending deregistration to\n deregister", + "id": 1425, + "name": "onlyDeregisterable", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1414, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1425, + "src": "3860:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3860:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3859:21:2" + }, + "src": "3832:141:2", + "visibility": "internal" + }, + { + "body": { + "id": 1438, + "nodeType": "Block", + "src": "4051:86:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1429, + "name": "slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "4077:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + ], + "id": 1428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4069:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4069:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1431, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4089:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4089:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4069:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d75737420626520736c6173686572", + "id": 1434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4101:17:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bc240e18317024af31d37af20ea09ca37fa45f27d1cc2454389fa60d0d22b21a", + "typeString": "literal_string \"must be slasher\"" + }, + "value": "must be slasher" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bc240e18317024af31d37af20ea09ca37fa45f27d1cc2454389fa60d0d22b21a", + "typeString": "literal_string \"must be slasher\"" + } + ], + "id": 1427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4061:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4061:58:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1436, + "nodeType": "ExpressionStatement", + "src": "4061:58:2" + }, + { + "id": 1437, + "nodeType": "PlaceholderStatement", + "src": "4129:1:2" + } + ] + }, + "documentation": "@notice Only allow the Slasher contract.", + "id": 1439, + "name": "onlySlasher", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1426, + "nodeType": "ParameterList", + "parameters": [], + "src": "4048:2:2" + }, + "src": "4028:109:2", + "visibility": "internal" + }, + { + "body": { + "id": 1517, + "nodeType": "Block", + "src": "4904:613:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1454, + "name": "VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1290, + "src": "4914:7:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1455, + "name": "_VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "4924:8:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4914:18:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 1457, + "nodeType": "ExpressionStatement", + "src": "4914:18:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1458, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "4943:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1459, + "name": "_storeAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1445, + "src": "4951:13:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "src": "4943:21:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1461, + "nodeType": "ExpressionStatement", + "src": "4943:21:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1462, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "4974:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1463, + "name": "_renAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "4980:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "src": "4974:17:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1465, + "nodeType": "ExpressionStatement", + "src": "4974:17:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1466, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "5002:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1467, + "name": "_minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1447, + "src": "5016:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5002:26:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1469, + "nodeType": "ExpressionStatement", + "src": "5002:26:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1470, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "5038:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1471, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "5056:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5038:29:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1473, + "nodeType": "ExpressionStatement", + "src": "5038:29:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1474, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "5078:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1475, + "name": "_minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "5095:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5078:32:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1477, + "nodeType": "ExpressionStatement", + "src": "5078:32:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1478, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "5120:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1479, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "5141:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5120:35:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1481, + "nodeType": "ExpressionStatement", + "src": "5120:35:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1482, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "5166:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1483, + "name": "_minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1451, + "src": "5189:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5166:44:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1485, + "nodeType": "ExpressionStatement", + "src": "5166:44:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1486, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "5220:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1487, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "5247:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5220:47:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1489, + "nodeType": "ExpressionStatement", + "src": "5220:47:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1490, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "5278:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1494, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "5342:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5342:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1496, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5357:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5342:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1493, + "name": "blockhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7193, + "src": "5332:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5332:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5324:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5324:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1500, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "5387:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5387:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1491, + "name": "Epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "5293:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Epoch_$1295_storage_ptr_$", + "typeString": "type(struct DarknodeRegistry.Epoch storage pointer)" + } + }, + "id": 1502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "epochhash", + "blocknumber" + ], + "nodeType": "FunctionCall", + "src": "5293:117:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory", + "typeString": "struct DarknodeRegistry.Epoch memory" + } + }, + "src": "5278:132:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1504, + "nodeType": "ExpressionStatement", + "src": "5278:132:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1505, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "5420:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5435:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5420:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1508, + "nodeType": "ExpressionStatement", + "src": "5420:16:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1509, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "5446:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1510, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5470:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5446:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1512, + "nodeType": "ExpressionStatement", + "src": "5446:25:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1513, + "name": "numDarknodesPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "5481:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5509:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5481:29:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1516, + "nodeType": "ExpressionStatement", + "src": "5481:29:2" + } + ] + }, + "documentation": "@notice The contract constructor.\n\n /// @param _VERSION A string defining the contract version.\n @param _renAddress The address of the RenToken contract.\n @param _storeAddress The address of the DarknodeRegistryStore contract.\n @param _minimumBond The minimum bond amount that can be submitted by a\n Darknode.\n @param _minimumPodSize The minimum size of a Darknode pod.\n @param _minimumEpochInterval The minimum number of blocks between\n epochs.", + "id": 1518, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1441, + "name": "_VERSION", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4691:22:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1440, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4691:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1443, + "name": "_renAddress", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4723:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + }, + "typeName": { + "contractScope": null, + "id": 1442, + "name": "RenToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2796, + "src": "4723:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1445, + "name": "_storeAddress", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4753:35:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + }, + "typeName": { + "contractScope": null, + "id": 1444, + "name": "DarknodeRegistryStore", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2671, + "src": "4753:21:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1447, + "name": "_minimumBond", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4798:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1446, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4798:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1449, + "name": "_minimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4828:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1448, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4828:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1451, + "name": "_minimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4861:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4861:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4681:215:2" + }, + "returnParameters": { + "id": 1453, + "nodeType": "ParameterList", + "parameters": [], + "src": "4904:0:2" + }, + "scope": 2379, + "src": "4670:847:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1573, + "nodeType": "Block", + "src": "6312:638:2", + "statements": [ + { + "assignments": [ + 1529 + ], + "declarations": [ + { + "constant": false, + "id": 1529, + "name": "bond", + "nodeType": "VariableDeclaration", + "scope": 1573, + "src": "6386:12:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1528, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6386:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1531, + "initialValue": { + "argumentTypes": null, + "id": 1530, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "6401:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6386:26:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1535, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "6482:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6482:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1538, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "6502:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + ], + "id": 1537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6494:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6494:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1540, + "name": "bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1529, + "src": "6510:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1533, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "6465:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 7044, + "src": "6465:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6465:50:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64207472616e73666572206661696c6564", + "id": 1542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6517:22:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + }, + "value": "bond transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + } + ], + "id": 1532, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "6457:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6457:83:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1544, + "nodeType": "ExpressionStatement", + "src": "6457:83:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1548, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "6632:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1549, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "6657:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6657:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1551, + "name": "bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1529, + "src": "6681:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1552, + "name": "_publicKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "6699:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1556, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "6752:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1553, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "6723:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "6723:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "6723:28:2", + "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": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6723:50:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6787:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "argumentTypes": null, + "id": 1545, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "6598:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "appendDarknode", + "nodeType": "MemberAccess", + "referencedDeclaration": 2468, + "src": "6598:20:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_payable_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address payable,uint256,bytes memory,uint256,uint256) external" + } + }, + "id": 1559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6598:200:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1560, + "nodeType": "ExpressionStatement", + "src": "6598:200:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1561, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "6809:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6859:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 1562, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "6833:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "6833:25:2", + "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": 1565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6833:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6809:52:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1567, + "nodeType": "ExpressionStatement", + "src": "6809:52:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1569, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "6925:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1570, + "name": "bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1529, + "src": "6938:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1568, + "name": "LogDarknodeRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "6903:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6903:40:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1572, + "nodeType": "EmitStatement", + "src": "6898:45:2" + } + ] + }, + "documentation": "@notice Register a darknode and transfer the bond to this contract.\n Before registering, the bond transfer must be approved in the REN\n contract. The caller must provide a public encryption key for the\n darknode. The darknode will remain pending registration until the next\n epoch. Only after this period can the darknode be deregistered. The\n caller of this method will be stored as the owner of the darknode.\n\n /// @param _darknodeID The darknode ID that will be registered.\n @param _publicKey The public key of the darknode. It is stored to allow\n other darknodes and traders to encrypt messages to the trader.", + "id": 1574, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1525, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "6299:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1526, + "modifierName": { + "argumentTypes": null, + "id": 1524, + "name": "onlyRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1399, + "src": "6286:12:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6286:25:2" + } + ], + "name": "register", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1523, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1520, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1574, + "src": "6229:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6229:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1522, + "name": "_publicKey", + "nodeType": "VariableDeclaration", + "scope": 1574, + "src": "6250:25:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1521, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6250:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6228:48:2" + }, + "returnParameters": { + "id": 1527, + "nodeType": "ParameterList", + "parameters": [], + "src": "6312:0:2" + }, + "scope": 2379, + "src": "6211:739:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1589, + "nodeType": "Block", + "src": "7468:48:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1586, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1576, + "src": "7497:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1585, + "name": "deregisterDarknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2378, + "src": "7478:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7478:31:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1588, + "nodeType": "ExpressionStatement", + "src": "7478:31:2" + } + ] + }, + "documentation": "@notice Deregister a darknode. The darknode will not be deregistered\n until the end of the epoch. After another epoch, the bond can be\n refunded by calling the refund method.\n @param _darknodeID The darknode ID that will be deregistered. The caller\n of this method store.darknodeRegisteredAt(_darknodeID) must be", + "id": 1590, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1579, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1576, + "src": "7424:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1580, + "modifierName": { + "argumentTypes": null, + "id": 1578, + "name": "onlyDeregisterable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1425, + "src": "7405:18:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7405:31:2" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 1582, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1576, + "src": "7455:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1583, + "modifierName": { + "argumentTypes": null, + "id": 1581, + "name": "onlyDarknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1386, + "src": "7437:17:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7437:30:2" + } + ], + "name": "deregister", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1576, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1590, + "src": "7375:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1575, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7375:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7374:21:2" + }, + "returnParameters": { + "id": 1584, + "nodeType": "ParameterList", + "parameters": [], + "src": "7468:0:2" + }, + "scope": 2379, + "src": "7355:161:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1715, + "nodeType": "Block", + "src": "7718:1684:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1593, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "7732:13:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1594, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "7732:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7761:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7732:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1607, + "nodeType": "IfStatement", + "src": "7728:199:2", + "trueBody": { + "id": 1606, + "nodeType": "Block", + "src": "7764:163:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1598, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "7861:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7861:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1600, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6434, + "src": "7875:5:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 1601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7875:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7861:21:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a6564202866697273742065706f63687329", + "id": 1603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7884:31:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_184185fc4f52082e3f1f3b59d30c9129121ff44ea1c6f83aba8c34d5744370c9", + "typeString": "literal_string \"not authorized (first epochs)\"" + }, + "value": "not authorized (first epochs)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_184185fc4f52082e3f1f3b59d30c9129121ff44ea1c6f83aba8c34d5744370c9", + "typeString": "literal_string \"not authorized (first epochs)\"" + } + ], + "id": 1597, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "7853:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7853:63:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1605, + "nodeType": "ExpressionStatement", + "src": "7853:63:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1609, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "7999:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7999:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1614, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "8044:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1611, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "8015:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "8015:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "8015:28:2", + "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": 1615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8015:50:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7999:66:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "65706f636820696e74657276616c20686173206e6f7420706173736564", + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8067:31:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e9d2ed9fe74e3b8f1d51a47e68fbdf2be4c6b276d1bc037bb009b66201d9fd93", + "typeString": "literal_string \"epoch interval has not passed\"" + }, + "value": "epoch interval has not passed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e9d2ed9fe74e3b8f1d51a47e68fbdf2be4c6b276d1bc037bb009b66201d9fd93", + "typeString": "literal_string \"epoch interval has not passed\"" + } + ], + "id": 1608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "7991:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7991:108:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1619, + "nodeType": "ExpressionStatement", + "src": "7991:108:2" + }, + { + "assignments": [ + 1621 + ], + "declarations": [ + { + "constant": false, + "id": 1621, + "name": "epochhash", + "nodeType": "VariableDeclaration", + "scope": 1715, + "src": "8109:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1620, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8109:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1630, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1624, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "8147:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8147:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8162:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "8147:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1623, + "name": "blockhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7193, + "src": "8137:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 1628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8129:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8129:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8109:56:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1631, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "8223:13:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1632, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "8239:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "src": "8223:28:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1634, + "nodeType": "ExpressionStatement", + "src": "8223:28:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1635, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "8261:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1637, + "name": "epochhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1621, + "src": "8307:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1638, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "8343:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8343:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1636, + "name": "Epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "8276:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Epoch_$1295_storage_ptr_$", + "typeString": "type(struct DarknodeRegistry.Epoch storage pointer)" + } + }, + "id": 1640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "epochhash", + "blocknumber" + ], + "nodeType": "FunctionCall", + "src": "8276:90:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory", + "typeString": "struct DarknodeRegistry.Epoch memory" + } + }, + "src": "8261:105:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1642, + "nodeType": "ExpressionStatement", + "src": "8261:105:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1643, + "name": "numDarknodesPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "8420:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1644, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "8448:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8420:40:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1646, + "nodeType": "ExpressionStatement", + "src": "8420:40:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1647, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "8470:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1648, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "8485:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8470:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1650, + "nodeType": "ExpressionStatement", + "src": "8470:36:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1651, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "8596:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 1652, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "8615:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8596:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1664, + "nodeType": "IfStatement", + "src": "8592:160:2", + "trueBody": { + "id": 1663, + "nodeType": "Block", + "src": "8628:124:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1654, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "8642:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1655, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "8656:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8642:29:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1657, + "nodeType": "ExpressionStatement", + "src": "8642:29:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1659, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "8712:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1660, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "8725:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1658, + "name": "LogMinimumBondUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "8690:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 1661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8690:51:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1662, + "nodeType": "EmitStatement", + "src": "8685:56:2" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1665, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "8765:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 1666, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "8787:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8765:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1678, + "nodeType": "IfStatement", + "src": "8761:181:2", + "trueBody": { + "id": 1677, + "nodeType": "Block", + "src": "8803:139:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1668, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "8817:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1669, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "8834:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8817:35:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1671, + "nodeType": "ExpressionStatement", + "src": "8817:35:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1673, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "8896:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1674, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "8912:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1672, + "name": "LogMinimumPodSizeUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "8871:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 1675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8871:60:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1676, + "nodeType": "EmitStatement", + "src": "8866:65:2" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1679, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "8955:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 1680, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "8983:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8955:48:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1692, + "nodeType": "IfStatement", + "src": "8951:223:2", + "trueBody": { + "id": 1691, + "nodeType": "Block", + "src": "9005:169:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1682, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "9019:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1683, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "9042:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9019:47:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1685, + "nodeType": "ExpressionStatement", + "src": "9019:47:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1687, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "9116:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1688, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "9138:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1686, + "name": "LogMinimumEpochIntervalUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1363, + "src": "9085:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 1689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9085:78:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1690, + "nodeType": "EmitStatement", + "src": "9080:83:2" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + }, + "id": 1695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1693, + "name": "nextSlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1325, + "src": "9187:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 1694, + "name": "slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "9202:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "src": "9187:22:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1710, + "nodeType": "IfStatement", + "src": "9183:150:2", + "trueBody": { + "id": 1709, + "nodeType": "Block", + "src": "9211:122:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1696, + "name": "slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "9225:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1697, + "name": "nextSlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1325, + "src": "9235:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "src": "9225:21:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "id": 1699, + "nodeType": "ExpressionStatement", + "src": "9225:21:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1702, + "name": "slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "9291:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + ], + "id": 1701, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9283:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9283:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1705, + "name": "nextSlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1325, + "src": "9309:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + ], + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9301:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9301:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1700, + "name": "LogSlasherUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1369, + "src": "9265:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9265:57:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1708, + "nodeType": "EmitStatement", + "src": "9260:62:2" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1712, + "name": "epochhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1621, + "src": "9385:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1711, + "name": "LogNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "9373:11:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9373:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1714, + "nodeType": "EmitStatement", + "src": "9368:27:2" + } + ] + }, + "documentation": "@notice Progress the epoch if it is possible to do so. This captures\n the current timestamp and current blockhash and overrides the current\n epoch.", + "id": 1716, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "epoch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1591, + "nodeType": "ParameterList", + "parameters": [], + "src": "7706:2:2" + }, + "returnParameters": { + "id": 1592, + "nodeType": "ParameterList", + "parameters": [], + "src": "7718:0:2" + }, + "scope": 2379, + "src": "7692:1710:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1729, + "nodeType": "Block", + "src": "9660:51:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1726, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1718, + "src": "9694:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1723, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "9670:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3661, + "src": "9670:23:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 1727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9670:34:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1728, + "nodeType": "ExpressionStatement", + "src": "9670:34:2" + } + ] + }, + "documentation": "@notice Allows the contract owner to initiate an ownership transfer of\n the DarknodeRegistryStore. \n @param _newOwner The address to transfer the ownership to.", + "id": 1730, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1721, + "modifierName": { + "argumentTypes": null, + "id": 1720, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "9650:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9650:9:2" + } + ], + "name": "transferStoreOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1718, + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "scope": 1730, + "src": "9622:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1717, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9622:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9621:19:2" + }, + "returnParameters": { + "id": 1722, + "nodeType": "ParameterList", + "parameters": [], + "src": "9660:0:2" + }, + "scope": 2379, + "src": "9590:121:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1740, + "nodeType": "Block", + "src": "9967:39:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1735, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "9977:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "9977:20:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 1738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9977:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1739, + "nodeType": "ExpressionStatement", + "src": "9977:22:2" + } + ] + }, + "documentation": "@notice Claims ownership of the store passed in to the constructor.\n `transferStoreOwnership` must have previously been called when\n transferring from another Darknode Registry.", + "id": 1741, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1733, + "modifierName": { + "argumentTypes": null, + "id": 1732, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "9957:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9957:9:2" + } + ], + "name": "claimStoreOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1731, + "nodeType": "ParameterList", + "parameters": [], + "src": "9945:2:2" + }, + "returnParameters": { + "id": 1734, + "nodeType": "ParameterList", + "parameters": [], + "src": "9967:0:2" + }, + "scope": 2379, + "src": "9917:89:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1752, + "nodeType": "Block", + "src": "10262:89:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1748, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "10310:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1749, + "name": "_nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1743, + "src": "10328:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10310:34:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1751, + "nodeType": "ExpressionStatement", + "src": "10310:34:2" + } + ] + }, + "documentation": "@notice Allows the contract owner to update the minimum bond.\n @param _nextMinimumBond The minimum bond amount that can be submitted by\n a darknode.", + "id": 1753, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1746, + "modifierName": { + "argumentTypes": null, + "id": 1745, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "10252:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10252:9:2" + } + ], + "name": "updateMinimumBond", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1744, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1743, + "name": "_nextMinimumBond", + "nodeType": "VariableDeclaration", + "scope": 1753, + "src": "10217:24:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1742, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10217:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10216:26:2" + }, + "returnParameters": { + "id": 1747, + "nodeType": "ParameterList", + "parameters": [], + "src": "10262:0:2" + }, + "scope": 2379, + "src": "10190:161:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1764, + "nodeType": "Block", + "src": "10571:95:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1760, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "10619:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1761, + "name": "_nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1755, + "src": "10640:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10619:40:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1763, + "nodeType": "ExpressionStatement", + "src": "10619:40:2" + } + ] + }, + "documentation": "@notice Allows the contract owner to update the minimum pod size.\n @param _nextMinimumPodSize The minimum size of a pod.", + "id": 1765, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1758, + "modifierName": { + "argumentTypes": null, + "id": 1757, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "10561:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10561:9:2" + } + ], + "name": "updateMinimumPodSize", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1755, + "name": "_nextMinimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 1765, + "src": "10523:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1754, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10523:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10522:29:2" + }, + "returnParameters": { + "id": 1759, + "nodeType": "ParameterList", + "parameters": [], + "src": "10571:0:2" + }, + "scope": 2379, + "src": "10493:173:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1776, + "nodeType": "Block", + "src": "10928:107:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1772, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "10976:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1773, + "name": "_nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1767, + "src": "11003:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10976:52:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1775, + "nodeType": "ExpressionStatement", + "src": "10976:52:2" + } + ] + }, + "documentation": "@notice Allows the contract owner to update the minimum epoch interval.\n @param _nextMinimumEpochInterval The minimum number of blocks between epochs.", + "id": 1777, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1770, + "modifierName": { + "argumentTypes": null, + "id": 1769, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "10918:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10918:9:2" + } + ], + "name": "updateMinimumEpochInterval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1768, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1767, + "name": "_nextMinimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 1777, + "src": "10874:33:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1766, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10874:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10873:35:2" + }, + "returnParameters": { + "id": 1771, + "nodeType": "ParameterList", + "parameters": [], + "src": "10928:0:2" + }, + "scope": 2379, + "src": "10838:197:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1799, + "nodeType": "Block", + "src": "11255:116:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1786, + "name": "_slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1779, + "src": "11281:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + ], + "id": 1785, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11273:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11273:17:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11302:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11294:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11294:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "11273:31:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c696420736c61736865722061646472657373", + "id": 1792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11306:25:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8922420b0f4f89ff11f4ee4824db739a4203469f8ee80d0f5d2465001b73d72", + "typeString": "literal_string \"invalid slasher address\"" + }, + "value": "invalid slasher address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8922420b0f4f89ff11f4ee4824db739a4203469f8ee80d0f5d2465001b73d72", + "typeString": "literal_string \"invalid slasher address\"" + } + ], + "id": 1784, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "11265:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11265:67:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1794, + "nodeType": "ExpressionStatement", + "src": "11265:67:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1795, + "name": "nextSlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1325, + "src": "11342:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1796, + "name": "_slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1779, + "src": "11356:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "src": "11342:22:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "id": 1798, + "nodeType": "ExpressionStatement", + "src": "11342:22:2" + } + ] + }, + "documentation": "@notice Allow the contract owner to update the DarknodeSlasher contract\n address.\n @param _slasher The new slasher address.", + "id": 1800, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1782, + "modifierName": { + "argumentTypes": null, + "id": 1781, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "11245:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11245:9:2" + } + ], + "name": "updateSlasher", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1780, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1779, + "name": "_slasher", + "nodeType": "VariableDeclaration", + "scope": 1800, + "src": "11210:24:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + }, + "typeName": { + "contractScope": null, + "id": 1778, + "name": "DarknodeSlasher", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2710, + "src": "11210:15:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11209:26:2" + }, + "returnParameters": { + "id": 1783, + "nodeType": "ParameterList", + "parameters": [], + "src": "11255:0:2" + }, + "scope": 2379, + "src": "11187:184:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1866, + "nodeType": "Block", + "src": "12064:695:2", + "statements": [ + { + "assignments": [ + 1812 + ], + "declarations": [ + { + "constant": false, + "id": 1812, + "name": "penalty", + "nodeType": "VariableDeclaration", + "scope": 1866, + "src": "12074:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1811, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12074:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1819, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1815, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1802, + "src": "12111:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1813, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "12092:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2625, + "src": "12092:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12092:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12122:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "12092:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12074:49:2" + }, + { + "assignments": [ + 1821 + ], + "declarations": [ + { + "constant": false, + "id": 1821, + "name": "reward", + "nodeType": "VariableDeclaration", + "scope": 1866, + "src": "12133:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1820, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12133:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1825, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1822, + "name": "penalty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1812, + "src": "12150:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 1823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12160:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "12150:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12133:28:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1829, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1802, + "src": "12252:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1830, + "name": "penalty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1812, + "src": "12261:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1826, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "12227:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "updateDarknodeBond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2578, + "src": "12227:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 1831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12227:42:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1832, + "nodeType": "ExpressionStatement", + "src": "12227:42:2" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1834, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1802, + "src": "12373:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1833, + "name": "isDeregisterable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2104, + "src": "12356:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12356:25:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1841, + "nodeType": "IfStatement", + "src": "12352:83:2", + "trueBody": { + "id": 1840, + "nodeType": "Block", + "src": "12383:52:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1837, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1802, + "src": "12416:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1836, + "name": "deregisterDarknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2378, + "src": "12397:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12397:27:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1839, + "nodeType": "ExpressionStatement", + "src": "12397:27:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1847, + "name": "_challenger1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1804, + "src": "12603:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1845, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "12583:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "12583:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12583:33:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1849, + "name": "reward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1821, + "src": "12618:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1843, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "12570:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "12570:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12570:55:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "726577617264207472616e73666572206661696c6564", + "id": 1851, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12627:24:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4aeedb0892d13a96469c0158f961ca403ccd0ffa2137bc3be599ab1f3836b5b7", + "typeString": "literal_string \"reward transfer failed\"" + }, + "value": "reward transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4aeedb0892d13a96469c0158f961ca403ccd0ffa2137bc3be599ab1f3836b5b7", + "typeString": "literal_string \"reward transfer failed\"" + } + ], + "id": 1842, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12562:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12562:90:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1853, + "nodeType": "ExpressionStatement", + "src": "12562:90:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1859, + "name": "_challenger2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1806, + "src": "12703:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1857, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "12683:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "12683:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12683:33:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1861, + "name": "reward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1821, + "src": "12718:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1855, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "12670:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "12670:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12670:55:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "726577617264207472616e73666572206661696c6564", + "id": 1863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12727:24:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4aeedb0892d13a96469c0158f961ca403ccd0ffa2137bc3be599ab1f3836b5b7", + "typeString": "literal_string \"reward transfer failed\"" + }, + "value": "reward transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4aeedb0892d13a96469c0158f961ca403ccd0ffa2137bc3be599ab1f3836b5b7", + "typeString": "literal_string \"reward transfer failed\"" + } + ], + "id": 1854, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12662:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12662:90:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1865, + "nodeType": "ExpressionStatement", + "src": "12662:90:2" + } + ] + }, + "documentation": "@notice Allow the DarknodeSlasher contract to slash half of a darknode's\n bond and deregister it. The bond is distributed as follows:\n 1/2 is kept by the guilty prover\n 1/8 is rewarded to the first challenger\n 1/8 is rewarded to the second challenger\n 1/4 becomes unassigned\n @param _prover The guilty prover whose bond is being slashed\n @param _challenger1 The first of the two darknodes who submitted the challenge\n @param _challenger2 The second of the two darknodes who submitted the challenge", + "id": 1867, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1809, + "modifierName": { + "argumentTypes": null, + "id": 1808, + "name": "onlySlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "12048:11:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12048:11:2" + } + ], + "name": "slash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1807, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1802, + "name": "_prover", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "11962:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1801, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11962:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1804, + "name": "_challenger1", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "11979:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1803, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11979:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1806, + "name": "_challenger2", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "12001:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1805, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12001:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11961:61:2" + }, + "returnParameters": { + "id": 1810, + "nodeType": "ParameterList", + "parameters": [], + "src": "12064:0:2" + }, + "scope": 2379, + "src": "11947:812:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1909, + "nodeType": "Block", + "src": "13218:476:2", + "statements": [ + { + "assignments": [ + 1876 + ], + "declarations": [ + { + "constant": false, + "id": 1876, + "name": "darknodeOwner", + "nodeType": "VariableDeclaration", + "scope": 1909, + "src": "13228:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1875, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13228:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1881, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1879, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1869, + "src": "13272:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1877, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "13252:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "13252:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13252:32:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13228:56:2" + }, + { + "assignments": [ + 1883 + ], + "declarations": [ + { + "constant": false, + "id": 1883, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1909, + "src": "13331:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1882, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13331:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1888, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1886, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1869, + "src": "13367:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1884, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "13348:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2625, + "src": "13348:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13348:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13331:48:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1892, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1869, + "src": "13459:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1889, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "13438:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "removeDarknode", + "nodeType": "MemberAccess", + "referencedDeclaration": 2534, + "src": "13438:20:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 1893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13438:33:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1894, + "nodeType": "ExpressionStatement", + "src": "13438:33:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1898, + "name": "darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1876, + "src": "13551:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1899, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1883, + "src": "13566:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1896, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "13538:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "13538:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13538:35:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64207472616e73666572206661696c6564", + "id": 1901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13575:22:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + }, + "value": "bond transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + } + ], + "id": 1895, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "13530:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13530:68:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1903, + "nodeType": "ExpressionStatement", + "src": "13530:68:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1905, + "name": "darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1876, + "src": "13665:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1906, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1883, + "src": "13680:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1904, + "name": "LogDarknodeOwnerRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1341, + "src": "13640:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13640:47:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1908, + "nodeType": "EmitStatement", + "src": "13635:52:2" + } + ] + }, + "documentation": "@notice Refund the bond of a deregistered darknode. This will make the\n darknode available for registration again. Anyone can call this function\n but the bond will always be refunded to the darknode owner.\n\n /// @param _darknodeID The darknode ID that will be refunded. The caller\n of this method must be the owner of this darknode.", + "id": 1910, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1872, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1869, + "src": "13205:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1873, + "modifierName": { + "argumentTypes": null, + "id": 1871, + "name": "onlyRefundable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1412, + "src": "13190:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13190:27:2" + } + ], + "name": "refund", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1870, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1869, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1910, + "src": "13160:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13160:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13159:21:2" + }, + "returnParameters": { + "id": 1874, + "nodeType": "ParameterList", + "parameters": [], + "src": "13218:0:2" + }, + "scope": 2379, + "src": "13144:550:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1922, + "nodeType": "Block", + "src": "13945:56:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1919, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1912, + "src": "13982:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1917, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "13962:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "13962:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13962:32:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 1916, + "id": 1921, + "nodeType": "Return", + "src": "13955:39:2" + } + ] + }, + "documentation": "@notice Retrieves the address of the account that registered a darknode.\n @param _darknodeID The ID of the darknode to retrieve the owner for.", + "id": 1923, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodeOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1913, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1912, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1923, + "src": "13884:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1911, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13884:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13883:21:2" + }, + "returnParameters": { + "id": 1916, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1915, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1923, + "src": "13928:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1914, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13928:15:2", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13927:17:2" + }, + "scope": 2379, + "src": "13858:143:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1935, + "nodeType": "Block", + "src": "14232:55:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1932, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1925, + "src": "14268:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1930, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "14249:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2625, + "src": "14249:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14249:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1929, + "id": 1934, + "nodeType": "Return", + "src": "14242:38:2" + } + ] + }, + "documentation": "@notice Retrieves the bond amount of a darknode in 10^-18 REN.\n @param _darknodeID The ID of the darknode to retrieve the bond for.", + "id": 1936, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodeBond", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1925, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "14179:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1924, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14179:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14178:21:2" + }, + "returnParameters": { + "id": 1929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1928, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "14223:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1927, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14223:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14222:9:2" + }, + "scope": 2379, + "src": "14154:133:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1948, + "nodeType": "Block", + "src": "14532:60:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1945, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1938, + "src": "14573:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1943, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "14549:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodePublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 2670, + "src": "14549:23:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (address) view external returns (bytes memory)" + } + }, + "id": 1946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14549:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1942, + "id": 1947, + "nodeType": "Return", + "src": "14542:43:2" + } + ] + }, + "documentation": "@notice Retrieves the encryption public key of the darknode.\n @param _darknodeID The ID of the darknode to retrieve the public key for.", + "id": 1949, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodePublicKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1938, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1949, + "src": "14474:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1937, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14474:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14473:21:2" + }, + "returnParameters": { + "id": 1942, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1941, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1949, + "src": "14518:12:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1940, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "14518:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14517:14:2" + }, + "scope": 2379, + "src": "14444:148:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1978, + "nodeType": "Block", + "src": "15315:170:2", + "statements": [ + { + "assignments": [ + 1960 + ], + "declarations": [ + { + "constant": false, + "id": 1960, + "name": "count", + "nodeType": "VariableDeclaration", + "scope": 1978, + "src": "15325:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15325:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1962, + "initialValue": { + "argumentTypes": null, + "id": 1961, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1953, + "src": "15341:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15325:22:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1963, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "15361:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15370:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15361:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1971, + "nodeType": "IfStatement", + "src": "15357:61:2", + "trueBody": { + "id": 1970, + "nodeType": "Block", + "src": "15373:45:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1966, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "15387:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1967, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "15395:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15387:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1969, + "nodeType": "ExpressionStatement", + "src": "15387:20:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1973, + "name": "_start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1951, + "src": "15457:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1974, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "15465:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15472:5:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1972, + "name": "getDarknodesFromEpochs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2350, + "src": "15434:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bool_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address,uint256,bool) view returns (address[] memory)" + } + }, + "id": 1976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15434:44:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 1958, + "id": 1977, + "nodeType": "Return", + "src": "15427:51:2" + } + ] + }, + "documentation": "@notice Retrieves a list of darknodes which are registered for the\n current epoch.\n @param _start A darknode ID used as an offset for the list. If _start is\n 0x0, the first dark node will be used. _start won't be\n included it is not registered for the epoch.\n @param _count The number of darknodes to retrieve starting from _start.\n If _count is 0, all of the darknodes from _start are\n retrieved. If _count is more than the remaining number of\n registered darknodes, the rest of the list will contain\n 0x0s.", + "id": 1979, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1954, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1951, + "name": "_start", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "15242:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1950, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15242:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1953, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "15258:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1952, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15258:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15241:32:2" + }, + "returnParameters": { + "id": 1958, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1957, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "15297:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1955, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15297:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1956, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15297:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15296:18:2" + }, + "scope": 2379, + "src": "15220:265:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2008, + "nodeType": "Block", + "src": "15746:182:2", + "statements": [ + { + "assignments": [ + 1990 + ], + "declarations": [ + { + "constant": false, + "id": 1990, + "name": "count", + "nodeType": "VariableDeclaration", + "scope": 2008, + "src": "15756:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1989, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15756:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1992, + "initialValue": { + "argumentTypes": null, + "id": 1991, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1983, + "src": "15772:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15756:22:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1993, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "15792:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1994, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15801:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15792:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2001, + "nodeType": "IfStatement", + "src": "15788:74:2", + "trueBody": { + "id": 2000, + "nodeType": "Block", + "src": "15804:58:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1996, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "15818:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1997, + "name": "numDarknodesPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "15826:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15818:33:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1999, + "nodeType": "ExpressionStatement", + "src": "15818:33:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2003, + "name": "_start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1981, + "src": "15901:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2004, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "15909:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15916:4:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2002, + "name": "getDarknodesFromEpochs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2350, + "src": "15878:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bool_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address,uint256,bool) view returns (address[] memory)" + } + }, + "id": 2006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15878:43:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 1988, + "id": 2007, + "nodeType": "Return", + "src": "15871:50:2" + } + ] + }, + "documentation": "@notice Retrieves a list of darknodes which were registered for the\n previous epoch. See `getDarknodes` for the parameter documentation.", + "id": 2009, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPreviousDarknodes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1984, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1981, + "name": "_start", + "nodeType": "VariableDeclaration", + "scope": 2009, + "src": "15673:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1980, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15673:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1983, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 2009, + "src": "15689:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1982, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15689:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15672:32:2" + }, + "returnParameters": { + "id": 1988, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1987, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2009, + "src": "15728:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1985, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15728:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1986, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15728:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15727:18:2" + }, + "scope": 2379, + "src": "15643:285:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2032, + "nodeType": "Block", + "src": "16175:156:2", + "statements": [ + { + "assignments": [ + 2017 + ], + "declarations": [ + { + "constant": false, + "id": 2017, + "name": "registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2032, + "src": "16185:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2016, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16185:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2022, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2020, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2011, + "src": "16235:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2018, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "16208:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeRegisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2640, + "src": "16208:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16208:39:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16185:62:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2023, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2017, + "src": "16264:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16280:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16264:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2026, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2017, + "src": "16285:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2027, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "16300:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "16300:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16285:39:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16264:60:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2015, + "id": 2031, + "nodeType": "Return", + "src": "16257:67:2" + } + ] + }, + "documentation": "@notice Returns whether a darknode is scheduled to become registered\n at next epoch.\n @param _darknodeID The ID of the darknode to return", + "id": 2033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isPendingRegistration", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2012, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2011, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2033, + "src": "16125:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2010, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16125:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16124:21:2" + }, + "returnParameters": { + "id": 2015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2014, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2033, + "src": "16169:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2013, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16169:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16168:6:2" + }, + "scope": 2379, + "src": "16094:237:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2056, + "nodeType": "Block", + "src": "16561:164:2", + "statements": [ + { + "assignments": [ + 2041 + ], + "declarations": [ + { + "constant": false, + "id": 2041, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2056, + "src": "16571:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2040, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16571:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2046, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2044, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2035, + "src": "16625:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2042, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "16596:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "16596:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16596:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16571:66:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2047, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2041, + "src": "16654:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16672:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16654:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2050, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2041, + "src": "16677:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2051, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "16694:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2052, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "16694:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16677:41:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16654:64:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2039, + "id": 2055, + "nodeType": "Return", + "src": "16647:71:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is in the pending deregistered state. In\n this state a darknode is still considered registered.", + "id": 2057, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isPendingDeregistration", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2035, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2057, + "src": "16511:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2034, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16511:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16510:21:2" + }, + "returnParameters": { + "id": 2039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2038, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2057, + "src": "16555:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2037, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16555:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16554:6:2" + }, + "scope": 2379, + "src": "16478:247:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2080, + "nodeType": "Block", + "src": "16871:165:2", + "statements": [ + { + "assignments": [ + 2065 + ], + "declarations": [ + { + "constant": false, + "id": 2065, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2080, + "src": "16881:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2064, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16881:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2070, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2068, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2059, + "src": "16935:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2066, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "16906:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "16906:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16906:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16881:66:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2071, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "16964:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16982:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16964:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2074, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "16987:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2075, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "17005:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2076, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "17005:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16987:42:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16964:65:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2063, + "id": 2079, + "nodeType": "Return", + "src": "16957:72:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is in the deregistered state.", + "id": 2081, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isDeregistered", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2059, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2081, + "src": "16823:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2058, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16823:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16822:21:2" + }, + "returnParameters": { + "id": 2063, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2062, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2081, + "src": "16865:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2061, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16865:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16864:6:2" + }, + "scope": 2379, + "src": "16799:237:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2103, + "nodeType": "Block", + "src": "17289:304:2", + "statements": [ + { + "assignments": [ + 2089 + ], + "declarations": [ + { + "constant": false, + "id": 2089, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2103, + "src": "17299:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2088, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17299:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2094, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2092, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2083, + "src": "17353:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2090, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "17324:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "17324:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17324:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17299:66:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2096, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2083, + "src": "17551:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2095, + "name": "isRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "17538:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 2097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17538:25:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2098, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2089, + "src": "17567:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17585:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17567:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17538:48:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2087, + "id": 2102, + "nodeType": "Return", + "src": "17531:55:2" + } + ] + }, + "documentation": "@notice Returns if a darknode can be deregistered. This is true if the\n darknodes is in the registered state and has not attempted to\n deregister yet.", + "id": 2104, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isDeregisterable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2083, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2104, + "src": "17241:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2082, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17241:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17240:21:2" + }, + "returnParameters": { + "id": 2087, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2086, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2104, + "src": "17283:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2085, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17283:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17282:6:2" + }, + "scope": 2379, + "src": "17215:378:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2133, + "nodeType": "Block", + "src": "17862:212:2", + "statements": [ + { + "assignments": [ + 2112 + ], + "declarations": [ + { + "constant": false, + "id": 2112, + "name": "registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2133, + "src": "17872:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17872:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2117, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2115, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2106, + "src": "17922:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2113, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "17895:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeRegisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2640, + "src": "17895:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17895:39:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17872:62:2" + }, + { + "assignments": [ + 2119 + ], + "declarations": [ + { + "constant": false, + "id": 2119, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2133, + "src": "17944:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17944:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2124, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2122, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2106, + "src": "17998:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2120, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "17969:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "17969:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17969:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17944:66:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2125, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "18027:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18043:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "18027:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2128, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2119, + "src": "18048:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18066:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "18048:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18027:40:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2110, + "id": 2132, + "nodeType": "Return", + "src": "18020:47:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is in the refunded state. This is true\n for darknodes that have never been registered, or darknodes that have\n been deregistered and refunded.", + "id": 2134, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRefunded", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2106, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2134, + "src": "17814:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2105, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17814:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17813:21:2" + }, + "returnParameters": { + "id": 2110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2109, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2134, + "src": "17856:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2108, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17856:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17855:6:2" + }, + "scope": 2379, + "src": "17794:280:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2153, + "nodeType": "Block", + "src": "18299:125:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2142, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "18331:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2141, + "name": "isDeregistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2081, + "src": "18316:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 2143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18316:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2146, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "18376:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2144, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "18347:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "18347:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18347:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2148, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "18392:13:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "18392:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18347:70:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18316:101:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2140, + "id": 2152, + "nodeType": "Return", + "src": "18309:108:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is refundable. This is true for darknodes\n that have been in the deregistered state for one full epoch.", + "id": 2154, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRefundable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2136, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2154, + "src": "18251:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18251:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18250:21:2" + }, + "returnParameters": { + "id": 2140, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2139, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2154, + "src": "18293:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2138, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18293:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18292:6:2" + }, + "scope": 2379, + "src": "18229:195:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2166, + "nodeType": "Block", + "src": "18566:70:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2162, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2156, + "src": "18603:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2163, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "18616:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + ], + "id": 2161, + "name": "isRegisteredInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "18583:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_struct$_Epoch_$1295_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,struct DarknodeRegistry.Epoch memory) view returns (bool)" + } + }, + "id": 2164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18583:46:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2160, + "id": 2165, + "nodeType": "Return", + "src": "18576:53:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is in the registered state.", + "id": 2167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRegistered", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2156, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2167, + "src": "18518:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2155, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18518:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18517:21:2" + }, + "returnParameters": { + "id": 2160, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2159, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2167, + "src": "18560:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2158, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18560:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18559:6:2" + }, + "scope": 2379, + "src": "18496:140:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2179, + "nodeType": "Block", + "src": "18805:71:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2175, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2169, + "src": "18842:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2176, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "18855:13:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + ], + "id": 2174, + "name": "isRegisteredInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "18822:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_struct$_Epoch_$1295_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,struct DarknodeRegistry.Epoch memory) view returns (bool)" + } + }, + "id": 2177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18822:47:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2173, + "id": 2178, + "nodeType": "Return", + "src": "18815:54:2" + } + ] + }, + "documentation": "@notice Returns if a darknode was in the registered state last epoch.", + "id": 2180, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRegisteredInPreviousEpoch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2169, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "18757:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18757:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18756:21:2" + }, + "returnParameters": { + "id": 2173, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2172, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "18799:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2171, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18799:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18798:6:2" + }, + "scope": 2379, + "src": "18720:156:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2229, + "nodeType": "Block", + "src": "19181:509:2", + "statements": [ + { + "assignments": [ + 2190 + ], + "declarations": [ + { + "constant": false, + "id": 2190, + "name": "registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2229, + "src": "19191:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19191:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2195, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2193, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2182, + "src": "19241:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2191, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "19214:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeRegisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2640, + "src": "19214:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19214:39:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19191:62:2" + }, + { + "assignments": [ + 2197 + ], + "declarations": [ + { + "constant": false, + "id": 2197, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2229, + "src": "19263:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2196, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19263:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2202, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2200, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2182, + "src": "19317:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2198, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "19288:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "19288:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19288:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19263:66:2" + }, + { + "assignments": [ + 2204 + ], + "declarations": [ + { + "constant": false, + "id": 2204, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 2229, + "src": "19339:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2203, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19339:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2213, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2205, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2190, + "src": "19357:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19373:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "19357:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2208, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2190, + "src": "19378:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2209, + "name": "_epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "19394:6:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory_ptr", + "typeString": "struct DarknodeRegistry.Epoch memory" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "19394:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19378:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19357:55:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19339:73:2" + }, + { + "assignments": [ + 2215 + ], + "declarations": [ + { + "constant": false, + "id": 2215, + "name": "notDeregistered", + "nodeType": "VariableDeclaration", + "scope": 2229, + "src": "19422:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2214, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19422:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2224, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2216, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2197, + "src": "19445:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19463:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "19445:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2219, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2197, + "src": "19468:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2220, + "name": "_epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "19485:6:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory_ptr", + "typeString": "struct DarknodeRegistry.Epoch memory" + } + }, + "id": 2221, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "19485:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19468:35:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19445:58:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19422:81:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2225, + "name": "registered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2204, + "src": "19654:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 2226, + "name": "notDeregistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "19668:15:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19654:29:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2188, + "id": 2228, + "nodeType": "Return", + "src": "19647:36:2" + } + ] + }, + "documentation": "@notice Returns if a darknode was in the registered state for a given\n epoch.\n @param _darknodeID The ID of the darknode\n @param _epoch One of currentEpoch, previousEpoch", + "id": 2230, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRegisteredInEpoch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2182, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2230, + "src": "19111:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2181, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19111:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2184, + "name": "_epoch", + "nodeType": "VariableDeclaration", + "scope": 2230, + "src": "19132:19:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory_ptr", + "typeString": "struct DarknodeRegistry.Epoch" + }, + "typeName": { + "contractScope": null, + "id": 2183, + "name": "Epoch", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1295, + "src": "19132:5:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage_ptr", + "typeString": "struct DarknodeRegistry.Epoch" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19110:42:2" + }, + "returnParameters": { + "id": 2188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2187, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2230, + "src": "19175:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2186, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19175:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19174:6:2" + }, + "scope": 2379, + "src": "19082:608:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 2349, + "nodeType": "Block", + "src": "20133:1037:2", + "statements": [ + { + "assignments": [ + 2243 + ], + "declarations": [ + { + "constant": false, + "id": 2243, + "name": "count", + "nodeType": "VariableDeclaration", + "scope": 2349, + "src": "20143:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20143:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2245, + "initialValue": { + "argumentTypes": null, + "id": 2244, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2234, + "src": "20159:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20143:22:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2246, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2243, + "src": "20179:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20188:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20179:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2254, + "nodeType": "IfStatement", + "src": "20175:61:2", + "trueBody": { + "id": 2253, + "nodeType": "Block", + "src": "20191:45:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2249, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2243, + "src": "20205:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2250, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "20213:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20205:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2252, + "nodeType": "ExpressionStatement", + "src": "20205:20:2" + } + ] + } + }, + { + "assignments": [ + 2258 + ], + "declarations": [ + { + "constant": false, + "id": 2258, + "name": "nodes", + "nodeType": "VariableDeclaration", + "scope": 2349, + "src": "20246:22:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2256, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20246:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2257, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20246:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2264, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2262, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2243, + "src": "20285:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "20271:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 2259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20275:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2260, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20275:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20271:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20246:45:2" + }, + { + "assignments": [ + 2266 + ], + "declarations": [ + { + "constant": false, + "id": 2266, + "name": "n", + "nodeType": "VariableDeclaration", + "scope": 2349, + "src": "20351:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2265, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20351:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2268, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20363:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20351:13:2" + }, + { + "assignments": [ + 2270 + ], + "declarations": [ + { + "constant": false, + "id": 2270, + "name": "next", + "nodeType": "VariableDeclaration", + "scope": 2349, + "src": "20374:12:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2269, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20374:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2272, + "initialValue": { + "argumentTypes": null, + "id": 2271, + "name": "_start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2232, + "src": "20389:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20374:21:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2273, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20409:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20425:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20417:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20417:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "20409:18:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2285, + "nodeType": "IfStatement", + "src": "20405:69:2", + "trueBody": { + "id": 2284, + "nodeType": "Block", + "src": "20429:45:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2278, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20443:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2279, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "20450:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "begin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2481, + "src": "20450:11:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20450:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "20443:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2283, + "nodeType": "ExpressionStatement", + "src": "20443:20:2" + } + ] + } + }, + { + "body": { + "id": 2345, + "nodeType": "Block", + "src": "20572:570:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2289, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20590:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20606:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20598:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2292, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20598:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "20590:18:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2296, + "nodeType": "IfStatement", + "src": "20586:62:2", + "trueBody": { + "id": 2295, + "nodeType": "Block", + "src": "20610:38:2", + "statements": [ + { + "id": 2294, + "nodeType": "Break", + "src": "20628:5:2" + } + ] + } + }, + { + "assignments": [ + 2298 + ], + "declarations": [ + { + "constant": false, + "id": 2298, + "name": "includeNext", + "nodeType": "VariableDeclaration", + "scope": 2345, + "src": "20729:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2297, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20729:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2299, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "20729:16:2" + }, + { + "condition": { + "argumentTypes": null, + "id": 2300, + "name": "_usePreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2236, + "src": "20763:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2314, + "nodeType": "Block", + "src": "20868:65:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2308, + "name": "includeNext", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "20886:11:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2310, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20913:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2309, + "name": "isRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "20900:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 2311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20900:18:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20886:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2313, + "nodeType": "ExpressionStatement", + "src": "20886:32:2" + } + ] + }, + "id": 2315, + "nodeType": "IfStatement", + "src": "20759:174:2", + "trueBody": { + "id": 2307, + "nodeType": "Block", + "src": "20782:80:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2301, + "name": "includeNext", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "20800:11:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2303, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20842:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2302, + "name": "isRegisteredInPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2180, + "src": "20814:27:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 2304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20814:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20800:47:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2306, + "nodeType": "ExpressionStatement", + "src": "20800:47:2" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "20950:12:2", + "subExpression": { + "argumentTypes": null, + "id": 2316, + "name": "includeNext", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "20951:11:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2327, + "nodeType": "IfStatement", + "src": "20946:100:2", + "trueBody": { + "id": 2326, + "nodeType": "Block", + "src": "20964:82:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2318, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20982:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2321, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "21000:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2319, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "20989:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "next", + "nodeType": "MemberAccess", + "referencedDeclaration": 2497, + "src": "20989:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_$", + "typeString": "function (address) view external returns (address)" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20989:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "20982:23:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2324, + "nodeType": "ExpressionStatement", + "src": "20982:23:2" + }, + { + "id": 2325, + "nodeType": "Continue", + "src": "21023:8:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 2332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2328, + "name": "nodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "21059:5:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2330, + "indexExpression": { + "argumentTypes": null, + "id": 2329, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "21065:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "21059:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2331, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "21070:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "21059:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2333, + "nodeType": "ExpressionStatement", + "src": "21059:15:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2334, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "21088:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2337, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "21106:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2335, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "21095:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "next", + "nodeType": "MemberAccess", + "referencedDeclaration": 2497, + "src": "21095:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_$", + "typeString": "function (address) view external returns (address)" + } + }, + "id": 2338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21095:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "21088:23:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2340, + "nodeType": "ExpressionStatement", + "src": "21088:23:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2341, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "21125:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 2342, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21130:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "21125:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2344, + "nodeType": "ExpressionStatement", + "src": "21125:6:2" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2286, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "20561:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2287, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2243, + "src": "20565:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20561:9:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2346, + "nodeType": "WhileStatement", + "src": "20554:588:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 2347, + "name": "nodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "21158:5:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2241, + "id": 2348, + "nodeType": "Return", + "src": "21151:12:2" + } + ] + }, + "documentation": "@notice Returns a list of darknodes registered for either the current\n or the previous epoch. See `getDarknodes` for documentation on the\n parameters `_start` and `_count`.\n @param _usePreviousEpoch If true, use the previous epoch, otherwise use\n the current epoch.", + "id": 2350, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodesFromEpochs", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2232, + "name": "_start", + "nodeType": "VariableDeclaration", + "scope": 2350, + "src": "20037:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20037:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2234, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 2350, + "src": "20053:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2233, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20053:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2236, + "name": "_usePreviousEpoch", + "nodeType": "VariableDeclaration", + "scope": 2350, + "src": "20069:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2235, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20069:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20036:56:2" + }, + "returnParameters": { + "id": 2241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2240, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2350, + "src": "20115:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20115:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2239, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20115:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20114:18:2" + }, + "scope": 2379, + "src": "20005:1165:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 2377, + "nodeType": "Block", + "src": "21293:303:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2358, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2352, + "src": "21386:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2362, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "21428:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2359, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "21399:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "21399:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "21399:28:2", + "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": 2363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21399:50:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2355, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "21351:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "updateDarknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2595, + "src": "21351:34:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 2364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21351:99:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2365, + "nodeType": "ExpressionStatement", + "src": "21351:99:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2366, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "21460:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 2369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21510:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 2367, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "21484:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "21484:25:2", + "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": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21484:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21460:52:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2372, + "nodeType": "ExpressionStatement", + "src": "21460:52:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2374, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2352, + "src": "21577:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2373, + "name": "LogDarknodeDeregistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1335, + "src": "21553:23:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 2375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21553:36:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2376, + "nodeType": "EmitStatement", + "src": "21548:41:2" + } + ] + }, + "documentation": "Private function called by `deregister` and `slash`", + "id": 2378, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deregisterDarknode", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2352, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2378, + "src": "21264:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21264:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21263:21:2" + }, + "returnParameters": { + "id": 2354, + "nodeType": "ParameterList", + "parameters": [], + "src": "21293:0:2" + }, + "scope": 2379, + "src": "21236:360:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + } + ], + "scope": 2380, + "src": "375:21223:2" + } + ], + "src": "0:21599:2" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol", + "exportedSymbols": { + "DarknodeRegistry": [ + 2379 + ] + }, + "id": 2380, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1278, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 1279, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 6512, + "src": "25:63:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 1280, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 6401, + "src": "89:59:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol", + "file": "../RenToken/RenToken.sol", + "id": 1281, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 2797, + "src": "150:34:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol", + "file": "../DarknodeSlasher/DarknodeSlasher.sol", + "id": 1282, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 2711, + "src": "185:48:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol", + "file": "./DarknodeRegistryStore.sol", + "id": 1283, + "nodeType": "ImportDirective", + "scope": 2380, + "sourceUnit": 2672, + "src": "234:37:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1284, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6511, + "src": "404:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$6511", + "typeString": "contract Ownable" + } + }, + "id": 1285, + "nodeType": "InheritanceSpecifier", + "src": "404:7:2" + } + ], + "contractDependencies": [ + 6511 + ], + "contractKind": "contract", + "documentation": "@notice DarknodeRegistry is responsible for the registration and\n deregistration of Darknodes.", + "fullyImplemented": true, + "id": 2379, + "linearizedBaseContracts": [ + 2379, + 6511 + ], + "name": "DarknodeRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1288, + "libraryName": { + "contractScope": null, + "id": 1286, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6400, + "src": "424:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6400", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "418:27:2", + "typeName": { + "id": 1287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "437:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 1290, + "name": "VERSION", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "451:21:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 1289, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "451:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "DarknodeRegistry.Epoch", + "id": 1295, + "members": [ + { + "constant": false, + "id": 1292, + "name": "epochhash", + "nodeType": "VariableDeclaration", + "scope": 1295, + "src": "767:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1294, + "name": "blocknumber", + "nodeType": "VariableDeclaration", + "scope": 1295, + "src": "794:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1293, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "794:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Epoch", + "nodeType": "StructDefinition", + "scope": 2379, + "src": "744:76:2", + "visibility": "public" + }, + { + "constant": false, + "id": 1297, + "name": "numDarknodes", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "826:27:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1296, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "826:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1299, + "name": "numDarknodesNextEpoch", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "859:36:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "859:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1301, + "name": "numDarknodesPreviousEpoch", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "901:40:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "901:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1303, + "name": "minimumBond", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "997:26:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "997:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1305, + "name": "minimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1029:29:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1304, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1029:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1307, + "name": "minimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1064:35:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1064:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1309, + "name": "nextMinimumBond", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1270:30:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1308, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1270:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1311, + "name": "nextMinimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1306:33:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1306:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1313, + "name": "nextMinimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1345:39:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1345:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1315, + "name": "currentEpoch", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1430:25:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch" + }, + "typeName": { + "contractScope": null, + "id": 1314, + "name": "Epoch", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1295, + "src": "1430:5:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage_ptr", + "typeString": "struct DarknodeRegistry.Epoch" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1317, + "name": "previousEpoch", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1461:26:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch" + }, + "typeName": { + "contractScope": null, + "id": 1316, + "name": "Epoch", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1295, + "src": "1461:5:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage_ptr", + "typeString": "struct DarknodeRegistry.Epoch" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1319, + "name": "ren", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1556:19:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + }, + "typeName": { + "contractScope": null, + "id": 1318, + "name": "RenToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2796, + "src": "1556:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1321, + "name": "store", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1653:34:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + }, + "typeName": { + "contractScope": null, + "id": 1320, + "name": "DarknodeRegistryStore", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2671, + "src": "1653:21:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1323, + "name": "slasher", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1762:30:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + }, + "typeName": { + "contractScope": null, + "id": 1322, + "name": "DarknodeSlasher", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2710, + "src": "1762:15:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1325, + "name": "nextSlasher", + "nodeType": "VariableDeclaration", + "scope": 2379, + "src": "1798:34:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + }, + "typeName": { + "contractScope": null, + "id": 1324, + "name": "DarknodeSlasher", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2710, + "src": "1798:15:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode is registered.\n @param _darknodeID The darknode ID that was registered.\n @param _bond The amount of REN that was transferred as bond.", + "id": 1331, + "name": "LogDarknodeRegistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 1330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1327, + "indexed": true, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1331, + "src": "2055:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1329, + "indexed": false, + "name": "_bond", + "nodeType": "VariableDeclaration", + "scope": 1331, + "src": "2084:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1328, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2084:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2054:44:2" + }, + "src": "2027:72:2" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a darknode is deregistered.\n @param _darknodeID The darknode ID that was deregistered.", + "id": 1335, + "name": "LogDarknodeDeregistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1333, + "indexed": true, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1335, + "src": "2258:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1332, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2258:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2257:29:2" + }, + "src": "2228:59:2" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a refund has been made.\n @param _owner The address that was refunded.\n @param _amount The amount of REN that was refunded.", + "id": 1341, + "name": "LogDarknodeOwnerRefunded", + "nodeType": "EventDefinition", + "parameters": { + "id": 1340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1337, + "indexed": true, + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 1341, + "src": "2490:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2490:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1339, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1341, + "src": "2514:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2514:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2489:41:2" + }, + "src": "2459:72:2" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a new epoch has begun.", + "id": 1345, + "name": "LogNewEpoch", + "nodeType": "EventDefinition", + "parameters": { + "id": 1344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1343, + "indexed": true, + "name": "epochhash", + "nodeType": "VariableDeclaration", + "scope": 1345, + "src": "2607:25:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2607:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2606:27:2" + }, + "src": "2589:45:2" + }, + { + "anonymous": false, + "documentation": "@notice Emitted when a constructor parameter has been updated.", + "id": 1351, + "name": "LogMinimumBondUpdated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1347, + "indexed": false, + "name": "previousMinimumBond", + "nodeType": "VariableDeclaration", + "scope": 1351, + "src": "2739:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1346, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2739:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1349, + "indexed": false, + "name": "nextMinimumBond", + "nodeType": "VariableDeclaration", + "scope": 1351, + "src": "2768:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2768:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2738:54:2" + }, + "src": "2711:82:2" + }, + { + "anonymous": false, + "documentation": null, + "id": 1357, + "name": "LogMinimumPodSizeUpdated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1353, + "indexed": false, + "name": "previousMinimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 1357, + "src": "2829:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1352, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2829:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1355, + "indexed": false, + "name": "nextMinimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 1357, + "src": "2861:26:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2861:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2828:60:2" + }, + "src": "2798:91:2" + }, + { + "anonymous": false, + "documentation": null, + "id": 1363, + "name": "LogMinimumEpochIntervalUpdated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1359, + "indexed": false, + "name": "previousMinimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 1363, + "src": "2931:36:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2931:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1361, + "indexed": false, + "name": "nextMinimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 1363, + "src": "2969:32:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1360, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2969:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2930:72:2" + }, + "src": "2894:109:2" + }, + { + "anonymous": false, + "documentation": null, + "id": 1369, + "name": "LogSlasherUpdated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1368, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1365, + "indexed": false, + "name": "previousSlasher", + "nodeType": "VariableDeclaration", + "scope": 1369, + "src": "3032:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1364, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3032:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1367, + "indexed": false, + "name": "nextSlasher", + "nodeType": "VariableDeclaration", + "scope": 1369, + "src": "3057:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1366, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3057:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3031:46:2" + }, + "src": "3008:70:2" + }, + { + "body": { + "id": 1385, + "nodeType": "Block", + "src": "3207:109:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1376, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1371, + "src": "3245:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1374, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "3225:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "3225:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3225:32:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1378, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "3261:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3261:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3225:46:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206461726b6e6f6465206f776e6572", + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3273:24:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_831f12230b75eb89b16a9643851b495cabcf2cc09c176ca1a6f98ca413f7a341", + "typeString": "literal_string \"must be darknode owner\"" + }, + "value": "must be darknode owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_831f12230b75eb89b16a9643851b495cabcf2cc09c176ca1a6f98ca413f7a341", + "typeString": "literal_string \"must be darknode owner\"" + } + ], + "id": 1373, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3217:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3217:81:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1383, + "nodeType": "ExpressionStatement", + "src": "3217:81:2" + }, + { + "id": 1384, + "nodeType": "PlaceholderStatement", + "src": "3308:1:2" + } + ] + }, + "documentation": "@notice Only allow the owner that registered the darknode to pass.", + "id": 1386, + "name": "onlyDarknodeOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1372, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1371, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1386, + "src": "3186:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3186:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3185:21:2" + }, + "src": "3159:157:2", + "visibility": "internal" + }, + { + "body": { + "id": 1398, + "nodeType": "Block", + "src": "3416:100:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1392, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1388, + "src": "3445:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1391, + "name": "isRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "3434:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3434:23:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d75737420626520726566756e646564206f72206e657665722072656769737465726564", + "id": 1394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3459:38:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_149ca671aef3cc8634c748e8de5c177049eb721378103c16e11a6afd3213db7b", + "typeString": "literal_string \"must be refunded or never registered\"" + }, + "value": "must be refunded or never registered" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_149ca671aef3cc8634c748e8de5c177049eb721378103c16e11a6afd3213db7b", + "typeString": "literal_string \"must be refunded or never registered\"" + } + ], + "id": 1390, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3426:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3426:72:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1396, + "nodeType": "ExpressionStatement", + "src": "3426:72:2" + }, + { + "id": 1397, + "nodeType": "PlaceholderStatement", + "src": "3508:1:2" + } + ] + }, + "documentation": "@notice Only allow unregistered darknodes.", + "id": 1399, + "name": "onlyRefunded", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1388, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1399, + "src": "3395:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3395:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3394:21:2" + }, + "src": "3373:143:2", + "visibility": "internal" + }, + { + "body": { + "id": 1411, + "nodeType": "Block", + "src": "3616:109:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1405, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1401, + "src": "3647:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1404, + "name": "isRefundable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2154, + "src": "3634:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3634:25:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d7573742062652064657265676973746572656420666f72206174206c65617374206f6e652065706f6368", + "id": 1407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3661:45:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ad5b476938769c593e29df585d22f106bae979def8bfff763442542e2fb97c7", + "typeString": "literal_string \"must be deregistered for at least one epoch\"" + }, + "value": "must be deregistered for at least one epoch" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3ad5b476938769c593e29df585d22f106bae979def8bfff763442542e2fb97c7", + "typeString": "literal_string \"must be deregistered for at least one epoch\"" + } + ], + "id": 1403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3626:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3626:81:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1409, + "nodeType": "ExpressionStatement", + "src": "3626:81:2" + }, + { + "id": 1410, + "nodeType": "PlaceholderStatement", + "src": "3717:1:2" + } + ] + }, + "documentation": "@notice Only allow refundable darknodes.", + "id": 1412, + "name": "onlyRefundable", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1401, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1412, + "src": "3595:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3595:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3594:21:2" + }, + "src": "3571:154:2", + "visibility": "internal" + }, + { + "body": { + "id": 1424, + "nodeType": "Block", + "src": "3881:92:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1418, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1414, + "src": "3916:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1417, + "name": "isDeregisterable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2104, + "src": "3899:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3899:29:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206465726567697374657261626c65", + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3930:24:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ca73111039bd6419843e4c0e5ab9c6f6d6f96c0339a4d266c0ef9fad587b157c", + "typeString": "literal_string \"must be deregisterable\"" + }, + "value": "must be deregisterable" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ca73111039bd6419843e4c0e5ab9c6f6d6f96c0339a4d266c0ef9fad587b157c", + "typeString": "literal_string \"must be deregisterable\"" + } + ], + "id": 1416, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3891:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3891:64:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1422, + "nodeType": "ExpressionStatement", + "src": "3891:64:2" + }, + { + "id": 1423, + "nodeType": "PlaceholderStatement", + "src": "3965:1:2" + } + ] + }, + "documentation": "@notice Only allowed registered nodes without a pending deregistration to\n deregister", + "id": 1425, + "name": "onlyDeregisterable", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1414, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1425, + "src": "3860:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3860:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3859:21:2" + }, + "src": "3832:141:2", + "visibility": "internal" + }, + { + "body": { + "id": 1438, + "nodeType": "Block", + "src": "4051:86:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1429, + "name": "slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "4077:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + ], + "id": 1428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4069:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4069:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1431, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4089:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4089:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4069:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d75737420626520736c6173686572", + "id": 1434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4101:17:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bc240e18317024af31d37af20ea09ca37fa45f27d1cc2454389fa60d0d22b21a", + "typeString": "literal_string \"must be slasher\"" + }, + "value": "must be slasher" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bc240e18317024af31d37af20ea09ca37fa45f27d1cc2454389fa60d0d22b21a", + "typeString": "literal_string \"must be slasher\"" + } + ], + "id": 1427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4061:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4061:58:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1436, + "nodeType": "ExpressionStatement", + "src": "4061:58:2" + }, + { + "id": 1437, + "nodeType": "PlaceholderStatement", + "src": "4129:1:2" + } + ] + }, + "documentation": "@notice Only allow the Slasher contract.", + "id": 1439, + "name": "onlySlasher", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1426, + "nodeType": "ParameterList", + "parameters": [], + "src": "4048:2:2" + }, + "src": "4028:109:2", + "visibility": "internal" + }, + { + "body": { + "id": 1517, + "nodeType": "Block", + "src": "4904:613:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1454, + "name": "VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1290, + "src": "4914:7:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1455, + "name": "_VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "4924:8:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4914:18:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 1457, + "nodeType": "ExpressionStatement", + "src": "4914:18:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1458, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "4943:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1459, + "name": "_storeAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1445, + "src": "4951:13:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "src": "4943:21:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1461, + "nodeType": "ExpressionStatement", + "src": "4943:21:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1462, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "4974:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1463, + "name": "_renAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "4980:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "src": "4974:17:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1465, + "nodeType": "ExpressionStatement", + "src": "4974:17:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1466, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "5002:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1467, + "name": "_minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1447, + "src": "5016:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5002:26:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1469, + "nodeType": "ExpressionStatement", + "src": "5002:26:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1470, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "5038:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1471, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "5056:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5038:29:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1473, + "nodeType": "ExpressionStatement", + "src": "5038:29:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1474, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "5078:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1475, + "name": "_minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "5095:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5078:32:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1477, + "nodeType": "ExpressionStatement", + "src": "5078:32:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1478, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "5120:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1479, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "5141:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5120:35:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1481, + "nodeType": "ExpressionStatement", + "src": "5120:35:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1482, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "5166:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1483, + "name": "_minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1451, + "src": "5189:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5166:44:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1485, + "nodeType": "ExpressionStatement", + "src": "5166:44:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1486, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "5220:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1487, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "5247:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5220:47:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1489, + "nodeType": "ExpressionStatement", + "src": "5220:47:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1490, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "5278:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1494, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "5342:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5342:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1496, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5357:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5342:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1493, + "name": "blockhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7193, + "src": "5332:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5332:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5324:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5324:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1500, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "5387:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5387:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1491, + "name": "Epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "5293:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Epoch_$1295_storage_ptr_$", + "typeString": "type(struct DarknodeRegistry.Epoch storage pointer)" + } + }, + "id": 1502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "epochhash", + "blocknumber" + ], + "nodeType": "FunctionCall", + "src": "5293:117:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory", + "typeString": "struct DarknodeRegistry.Epoch memory" + } + }, + "src": "5278:132:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1504, + "nodeType": "ExpressionStatement", + "src": "5278:132:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1505, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "5420:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5435:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5420:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1508, + "nodeType": "ExpressionStatement", + "src": "5420:16:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1509, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "5446:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1510, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5470:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5446:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1512, + "nodeType": "ExpressionStatement", + "src": "5446:25:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1513, + "name": "numDarknodesPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "5481:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5509:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5481:29:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1516, + "nodeType": "ExpressionStatement", + "src": "5481:29:2" + } + ] + }, + "documentation": "@notice The contract constructor.\n\n /// @param _VERSION A string defining the contract version.\n @param _renAddress The address of the RenToken contract.\n @param _storeAddress The address of the DarknodeRegistryStore contract.\n @param _minimumBond The minimum bond amount that can be submitted by a\n Darknode.\n @param _minimumPodSize The minimum size of a Darknode pod.\n @param _minimumEpochInterval The minimum number of blocks between\n epochs.", + "id": 1518, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1441, + "name": "_VERSION", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4691:22:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1440, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4691:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1443, + "name": "_renAddress", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4723:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + }, + "typeName": { + "contractScope": null, + "id": 1442, + "name": "RenToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2796, + "src": "4723:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1445, + "name": "_storeAddress", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4753:35:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + }, + "typeName": { + "contractScope": null, + "id": 1444, + "name": "DarknodeRegistryStore", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2671, + "src": "4753:21:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1447, + "name": "_minimumBond", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4798:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1446, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4798:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1449, + "name": "_minimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4828:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1448, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4828:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1451, + "name": "_minimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "4861:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4861:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4681:215:2" + }, + "returnParameters": { + "id": 1453, + "nodeType": "ParameterList", + "parameters": [], + "src": "4904:0:2" + }, + "scope": 2379, + "src": "4670:847:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1573, + "nodeType": "Block", + "src": "6312:638:2", + "statements": [ + { + "assignments": [ + 1529 + ], + "declarations": [ + { + "constant": false, + "id": 1529, + "name": "bond", + "nodeType": "VariableDeclaration", + "scope": 1573, + "src": "6386:12:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1528, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6386:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1531, + "initialValue": { + "argumentTypes": null, + "id": 1530, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "6401:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6386:26:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1535, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "6482:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6482:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1538, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "6502:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + ], + "id": 1537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6494:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6494:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1540, + "name": "bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1529, + "src": "6510:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1533, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "6465:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 7044, + "src": "6465:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6465:50:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64207472616e73666572206661696c6564", + "id": 1542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6517:22:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + }, + "value": "bond transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + } + ], + "id": 1532, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "6457:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6457:83:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1544, + "nodeType": "ExpressionStatement", + "src": "6457:83:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1548, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "6632:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1549, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "6657:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6657:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1551, + "name": "bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1529, + "src": "6681:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1552, + "name": "_publicKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "6699:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1556, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "6752:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1553, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "6723:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "6723:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "6723:28:2", + "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": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6723:50:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6787:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "argumentTypes": null, + "id": 1545, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "6598:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "appendDarknode", + "nodeType": "MemberAccess", + "referencedDeclaration": 2468, + "src": "6598:20:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_payable_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address payable,uint256,bytes memory,uint256,uint256) external" + } + }, + "id": 1559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6598:200:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1560, + "nodeType": "ExpressionStatement", + "src": "6598:200:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1561, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "6809:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6859:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 1562, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "6833:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "6833:25:2", + "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": 1565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6833:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6809:52:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1567, + "nodeType": "ExpressionStatement", + "src": "6809:52:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1569, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "6925:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1570, + "name": "bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1529, + "src": "6938:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1568, + "name": "LogDarknodeRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "6903:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6903:40:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1572, + "nodeType": "EmitStatement", + "src": "6898:45:2" + } + ] + }, + "documentation": "@notice Register a darknode and transfer the bond to this contract.\n Before registering, the bond transfer must be approved in the REN\n contract. The caller must provide a public encryption key for the\n darknode. The darknode will remain pending registration until the next\n epoch. Only after this period can the darknode be deregistered. The\n caller of this method will be stored as the owner of the darknode.\n\n /// @param _darknodeID The darknode ID that will be registered.\n @param _publicKey The public key of the darknode. It is stored to allow\n other darknodes and traders to encrypt messages to the trader.", + "id": 1574, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1525, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "6299:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1526, + "modifierName": { + "argumentTypes": null, + "id": 1524, + "name": "onlyRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1399, + "src": "6286:12:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6286:25:2" + } + ], + "name": "register", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1523, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1520, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1574, + "src": "6229:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6229:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1522, + "name": "_publicKey", + "nodeType": "VariableDeclaration", + "scope": 1574, + "src": "6250:25:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1521, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6250:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6228:48:2" + }, + "returnParameters": { + "id": 1527, + "nodeType": "ParameterList", + "parameters": [], + "src": "6312:0:2" + }, + "scope": 2379, + "src": "6211:739:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1589, + "nodeType": "Block", + "src": "7468:48:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1586, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1576, + "src": "7497:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1585, + "name": "deregisterDarknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2378, + "src": "7478:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7478:31:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1588, + "nodeType": "ExpressionStatement", + "src": "7478:31:2" + } + ] + }, + "documentation": "@notice Deregister a darknode. The darknode will not be deregistered\n until the end of the epoch. After another epoch, the bond can be\n refunded by calling the refund method.\n @param _darknodeID The darknode ID that will be deregistered. The caller\n of this method store.darknodeRegisteredAt(_darknodeID) must be", + "id": 1590, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1579, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1576, + "src": "7424:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1580, + "modifierName": { + "argumentTypes": null, + "id": 1578, + "name": "onlyDeregisterable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1425, + "src": "7405:18:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7405:31:2" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 1582, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1576, + "src": "7455:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1583, + "modifierName": { + "argumentTypes": null, + "id": 1581, + "name": "onlyDarknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1386, + "src": "7437:17:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7437:30:2" + } + ], + "name": "deregister", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1576, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1590, + "src": "7375:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1575, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7375:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7374:21:2" + }, + "returnParameters": { + "id": 1584, + "nodeType": "ParameterList", + "parameters": [], + "src": "7468:0:2" + }, + "scope": 2379, + "src": "7355:161:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1715, + "nodeType": "Block", + "src": "7718:1684:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1593, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "7732:13:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1594, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "7732:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7761:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7732:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1607, + "nodeType": "IfStatement", + "src": "7728:199:2", + "trueBody": { + "id": 1606, + "nodeType": "Block", + "src": "7764:163:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1598, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "7861:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7861:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1600, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6434, + "src": "7875:5:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 1601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7875:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7861:21:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a6564202866697273742065706f63687329", + "id": 1603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7884:31:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_184185fc4f52082e3f1f3b59d30c9129121ff44ea1c6f83aba8c34d5744370c9", + "typeString": "literal_string \"not authorized (first epochs)\"" + }, + "value": "not authorized (first epochs)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_184185fc4f52082e3f1f3b59d30c9129121ff44ea1c6f83aba8c34d5744370c9", + "typeString": "literal_string \"not authorized (first epochs)\"" + } + ], + "id": 1597, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "7853:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7853:63:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1605, + "nodeType": "ExpressionStatement", + "src": "7853:63:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1609, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "7999:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7999:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1614, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "8044:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1611, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "8015:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "8015:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "8015:28:2", + "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": 1615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8015:50:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7999:66:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "65706f636820696e74657276616c20686173206e6f7420706173736564", + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8067:31:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e9d2ed9fe74e3b8f1d51a47e68fbdf2be4c6b276d1bc037bb009b66201d9fd93", + "typeString": "literal_string \"epoch interval has not passed\"" + }, + "value": "epoch interval has not passed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e9d2ed9fe74e3b8f1d51a47e68fbdf2be4c6b276d1bc037bb009b66201d9fd93", + "typeString": "literal_string \"epoch interval has not passed\"" + } + ], + "id": 1608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "7991:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7991:108:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1619, + "nodeType": "ExpressionStatement", + "src": "7991:108:2" + }, + { + "assignments": [ + 1621 + ], + "declarations": [ + { + "constant": false, + "id": 1621, + "name": "epochhash", + "nodeType": "VariableDeclaration", + "scope": 1715, + "src": "8109:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1620, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8109:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1630, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1624, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "8147:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8147:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8162:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "8147:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1623, + "name": "blockhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7193, + "src": "8137:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 1628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8129:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8129:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8109:56:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1631, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "8223:13:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1632, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "8239:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "src": "8223:28:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1634, + "nodeType": "ExpressionStatement", + "src": "8223:28:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1635, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "8261:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1637, + "name": "epochhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1621, + "src": "8307:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1638, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "8343:5:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8343:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1636, + "name": "Epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "8276:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Epoch_$1295_storage_ptr_$", + "typeString": "type(struct DarknodeRegistry.Epoch storage pointer)" + } + }, + "id": 1640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "epochhash", + "blocknumber" + ], + "nodeType": "FunctionCall", + "src": "8276:90:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory", + "typeString": "struct DarknodeRegistry.Epoch memory" + } + }, + "src": "8261:105:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 1642, + "nodeType": "ExpressionStatement", + "src": "8261:105:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1643, + "name": "numDarknodesPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "8420:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1644, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "8448:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8420:40:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1646, + "nodeType": "ExpressionStatement", + "src": "8420:40:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1647, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "8470:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1648, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "8485:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8470:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1650, + "nodeType": "ExpressionStatement", + "src": "8470:36:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1651, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "8596:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 1652, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "8615:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8596:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1664, + "nodeType": "IfStatement", + "src": "8592:160:2", + "trueBody": { + "id": 1663, + "nodeType": "Block", + "src": "8628:124:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1654, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "8642:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1655, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "8656:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8642:29:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1657, + "nodeType": "ExpressionStatement", + "src": "8642:29:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1659, + "name": "minimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1303, + "src": "8712:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1660, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "8725:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1658, + "name": "LogMinimumBondUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "8690:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 1661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8690:51:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1662, + "nodeType": "EmitStatement", + "src": "8685:56:2" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1665, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "8765:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 1666, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "8787:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8765:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1678, + "nodeType": "IfStatement", + "src": "8761:181:2", + "trueBody": { + "id": 1677, + "nodeType": "Block", + "src": "8803:139:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1668, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "8817:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1669, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "8834:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8817:35:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1671, + "nodeType": "ExpressionStatement", + "src": "8817:35:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1673, + "name": "minimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "8896:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1674, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "8912:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1672, + "name": "LogMinimumPodSizeUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "8871:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 1675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8871:60:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1676, + "nodeType": "EmitStatement", + "src": "8866:65:2" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1679, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "8955:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 1680, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "8983:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8955:48:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1692, + "nodeType": "IfStatement", + "src": "8951:223:2", + "trueBody": { + "id": 1691, + "nodeType": "Block", + "src": "9005:169:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1682, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "9019:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1683, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "9042:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9019:47:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1685, + "nodeType": "ExpressionStatement", + "src": "9019:47:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1687, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "9116:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1688, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "9138:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1686, + "name": "LogMinimumEpochIntervalUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1363, + "src": "9085:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 1689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9085:78:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1690, + "nodeType": "EmitStatement", + "src": "9080:83:2" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + }, + "id": 1695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1693, + "name": "nextSlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1325, + "src": "9187:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 1694, + "name": "slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "9202:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "src": "9187:22:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1710, + "nodeType": "IfStatement", + "src": "9183:150:2", + "trueBody": { + "id": 1709, + "nodeType": "Block", + "src": "9211:122:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1696, + "name": "slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "9225:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1697, + "name": "nextSlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1325, + "src": "9235:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "src": "9225:21:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "id": 1699, + "nodeType": "ExpressionStatement", + "src": "9225:21:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1702, + "name": "slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "9291:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + ], + "id": 1701, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9283:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9283:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1705, + "name": "nextSlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1325, + "src": "9309:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + ], + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9301:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9301:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1700, + "name": "LogSlasherUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1369, + "src": "9265:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9265:57:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1708, + "nodeType": "EmitStatement", + "src": "9260:62:2" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1712, + "name": "epochhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1621, + "src": "9385:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1711, + "name": "LogNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "9373:11:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9373:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1714, + "nodeType": "EmitStatement", + "src": "9368:27:2" + } + ] + }, + "documentation": "@notice Progress the epoch if it is possible to do so. This captures\n the current timestamp and current blockhash and overrides the current\n epoch.", + "id": 1716, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "epoch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1591, + "nodeType": "ParameterList", + "parameters": [], + "src": "7706:2:2" + }, + "returnParameters": { + "id": 1592, + "nodeType": "ParameterList", + "parameters": [], + "src": "7718:0:2" + }, + "scope": 2379, + "src": "7692:1710:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1729, + "nodeType": "Block", + "src": "9660:51:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1726, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1718, + "src": "9694:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1723, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "9670:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3661, + "src": "9670:23:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 1727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9670:34:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1728, + "nodeType": "ExpressionStatement", + "src": "9670:34:2" + } + ] + }, + "documentation": "@notice Allows the contract owner to initiate an ownership transfer of\n the DarknodeRegistryStore. \n @param _newOwner The address to transfer the ownership to.", + "id": 1730, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1721, + "modifierName": { + "argumentTypes": null, + "id": 1720, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "9650:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9650:9:2" + } + ], + "name": "transferStoreOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1718, + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "scope": 1730, + "src": "9622:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1717, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9622:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9621:19:2" + }, + "returnParameters": { + "id": 1722, + "nodeType": "ParameterList", + "parameters": [], + "src": "9660:0:2" + }, + "scope": 2379, + "src": "9590:121:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1740, + "nodeType": "Block", + "src": "9967:39:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1735, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "9977:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "9977:20:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 1738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9977:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1739, + "nodeType": "ExpressionStatement", + "src": "9977:22:2" + } + ] + }, + "documentation": "@notice Claims ownership of the store passed in to the constructor.\n `transferStoreOwnership` must have previously been called when\n transferring from another Darknode Registry.", + "id": 1741, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1733, + "modifierName": { + "argumentTypes": null, + "id": 1732, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "9957:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9957:9:2" + } + ], + "name": "claimStoreOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1731, + "nodeType": "ParameterList", + "parameters": [], + "src": "9945:2:2" + }, + "returnParameters": { + "id": 1734, + "nodeType": "ParameterList", + "parameters": [], + "src": "9967:0:2" + }, + "scope": 2379, + "src": "9917:89:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1752, + "nodeType": "Block", + "src": "10262:89:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1748, + "name": "nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "10310:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1749, + "name": "_nextMinimumBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1743, + "src": "10328:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10310:34:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1751, + "nodeType": "ExpressionStatement", + "src": "10310:34:2" + } + ] + }, + "documentation": "@notice Allows the contract owner to update the minimum bond.\n @param _nextMinimumBond The minimum bond amount that can be submitted by\n a darknode.", + "id": 1753, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1746, + "modifierName": { + "argumentTypes": null, + "id": 1745, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "10252:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10252:9:2" + } + ], + "name": "updateMinimumBond", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1744, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1743, + "name": "_nextMinimumBond", + "nodeType": "VariableDeclaration", + "scope": 1753, + "src": "10217:24:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1742, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10217:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10216:26:2" + }, + "returnParameters": { + "id": 1747, + "nodeType": "ParameterList", + "parameters": [], + "src": "10262:0:2" + }, + "scope": 2379, + "src": "10190:161:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1764, + "nodeType": "Block", + "src": "10571:95:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1760, + "name": "nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "10619:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1761, + "name": "_nextMinimumPodSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1755, + "src": "10640:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10619:40:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1763, + "nodeType": "ExpressionStatement", + "src": "10619:40:2" + } + ] + }, + "documentation": "@notice Allows the contract owner to update the minimum pod size.\n @param _nextMinimumPodSize The minimum size of a pod.", + "id": 1765, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1758, + "modifierName": { + "argumentTypes": null, + "id": 1757, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "10561:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10561:9:2" + } + ], + "name": "updateMinimumPodSize", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1755, + "name": "_nextMinimumPodSize", + "nodeType": "VariableDeclaration", + "scope": 1765, + "src": "10523:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1754, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10523:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10522:29:2" + }, + "returnParameters": { + "id": 1759, + "nodeType": "ParameterList", + "parameters": [], + "src": "10571:0:2" + }, + "scope": 2379, + "src": "10493:173:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1776, + "nodeType": "Block", + "src": "10928:107:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1772, + "name": "nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "10976:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1773, + "name": "_nextMinimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1767, + "src": "11003:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10976:52:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1775, + "nodeType": "ExpressionStatement", + "src": "10976:52:2" + } + ] + }, + "documentation": "@notice Allows the contract owner to update the minimum epoch interval.\n @param _nextMinimumEpochInterval The minimum number of blocks between epochs.", + "id": 1777, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1770, + "modifierName": { + "argumentTypes": null, + "id": 1769, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "10918:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10918:9:2" + } + ], + "name": "updateMinimumEpochInterval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1768, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1767, + "name": "_nextMinimumEpochInterval", + "nodeType": "VariableDeclaration", + "scope": 1777, + "src": "10874:33:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1766, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10874:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10873:35:2" + }, + "returnParameters": { + "id": 1771, + "nodeType": "ParameterList", + "parameters": [], + "src": "10928:0:2" + }, + "scope": 2379, + "src": "10838:197:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1799, + "nodeType": "Block", + "src": "11255:116:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1786, + "name": "_slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1779, + "src": "11281:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + ], + "id": 1785, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11273:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11273:17:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11302:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11294:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11294:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "11273:31:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c696420736c61736865722061646472657373", + "id": 1792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11306:25:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8922420b0f4f89ff11f4ee4824db739a4203469f8ee80d0f5d2465001b73d72", + "typeString": "literal_string \"invalid slasher address\"" + }, + "value": "invalid slasher address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8922420b0f4f89ff11f4ee4824db739a4203469f8ee80d0f5d2465001b73d72", + "typeString": "literal_string \"invalid slasher address\"" + } + ], + "id": 1784, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "11265:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11265:67:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1794, + "nodeType": "ExpressionStatement", + "src": "11265:67:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 1797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1795, + "name": "nextSlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1325, + "src": "11342:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1796, + "name": "_slasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1779, + "src": "11356:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "src": "11342:22:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "id": 1798, + "nodeType": "ExpressionStatement", + "src": "11342:22:2" + } + ] + }, + "documentation": "@notice Allow the contract owner to update the DarknodeSlasher contract\n address.\n @param _slasher The new slasher address.", + "id": 1800, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1782, + "modifierName": { + "argumentTypes": null, + "id": 1781, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "11245:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11245:9:2" + } + ], + "name": "updateSlasher", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1780, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1779, + "name": "_slasher", + "nodeType": "VariableDeclaration", + "scope": 1800, + "src": "11210:24:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + }, + "typeName": { + "contractScope": null, + "id": 1778, + "name": "DarknodeSlasher", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2710, + "src": "11210:15:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeSlasher_$2710", + "typeString": "contract DarknodeSlasher" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11209:26:2" + }, + "returnParameters": { + "id": 1783, + "nodeType": "ParameterList", + "parameters": [], + "src": "11255:0:2" + }, + "scope": 2379, + "src": "11187:184:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1866, + "nodeType": "Block", + "src": "12064:695:2", + "statements": [ + { + "assignments": [ + 1812 + ], + "declarations": [ + { + "constant": false, + "id": 1812, + "name": "penalty", + "nodeType": "VariableDeclaration", + "scope": 1866, + "src": "12074:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1811, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12074:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1819, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1815, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1802, + "src": "12111:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1813, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "12092:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2625, + "src": "12092:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12092:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12122:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "12092:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12074:49:2" + }, + { + "assignments": [ + 1821 + ], + "declarations": [ + { + "constant": false, + "id": 1821, + "name": "reward", + "nodeType": "VariableDeclaration", + "scope": 1866, + "src": "12133:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1820, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12133:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1825, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1822, + "name": "penalty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1812, + "src": "12150:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 1823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12160:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "12150:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12133:28:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1829, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1802, + "src": "12252:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1830, + "name": "penalty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1812, + "src": "12261:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1826, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "12227:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "updateDarknodeBond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2578, + "src": "12227:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 1831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12227:42:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1832, + "nodeType": "ExpressionStatement", + "src": "12227:42:2" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1834, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1802, + "src": "12373:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1833, + "name": "isDeregisterable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2104, + "src": "12356:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12356:25:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1841, + "nodeType": "IfStatement", + "src": "12352:83:2", + "trueBody": { + "id": 1840, + "nodeType": "Block", + "src": "12383:52:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1837, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1802, + "src": "12416:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1836, + "name": "deregisterDarknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2378, + "src": "12397:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12397:27:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1839, + "nodeType": "ExpressionStatement", + "src": "12397:27:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1847, + "name": "_challenger1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1804, + "src": "12603:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1845, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "12583:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "12583:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12583:33:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1849, + "name": "reward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1821, + "src": "12618:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1843, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "12570:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "12570:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12570:55:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "726577617264207472616e73666572206661696c6564", + "id": 1851, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12627:24:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4aeedb0892d13a96469c0158f961ca403ccd0ffa2137bc3be599ab1f3836b5b7", + "typeString": "literal_string \"reward transfer failed\"" + }, + "value": "reward transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4aeedb0892d13a96469c0158f961ca403ccd0ffa2137bc3be599ab1f3836b5b7", + "typeString": "literal_string \"reward transfer failed\"" + } + ], + "id": 1842, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12562:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12562:90:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1853, + "nodeType": "ExpressionStatement", + "src": "12562:90:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1859, + "name": "_challenger2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1806, + "src": "12703:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1857, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "12683:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "12683:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12683:33:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1861, + "name": "reward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1821, + "src": "12718:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1855, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "12670:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "12670:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12670:55:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "726577617264207472616e73666572206661696c6564", + "id": 1863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12727:24:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4aeedb0892d13a96469c0158f961ca403ccd0ffa2137bc3be599ab1f3836b5b7", + "typeString": "literal_string \"reward transfer failed\"" + }, + "value": "reward transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4aeedb0892d13a96469c0158f961ca403ccd0ffa2137bc3be599ab1f3836b5b7", + "typeString": "literal_string \"reward transfer failed\"" + } + ], + "id": 1854, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "12662:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12662:90:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1865, + "nodeType": "ExpressionStatement", + "src": "12662:90:2" + } + ] + }, + "documentation": "@notice Allow the DarknodeSlasher contract to slash half of a darknode's\n bond and deregister it. The bond is distributed as follows:\n 1/2 is kept by the guilty prover\n 1/8 is rewarded to the first challenger\n 1/8 is rewarded to the second challenger\n 1/4 becomes unassigned\n @param _prover The guilty prover whose bond is being slashed\n @param _challenger1 The first of the two darknodes who submitted the challenge\n @param _challenger2 The second of the two darknodes who submitted the challenge", + "id": 1867, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1809, + "modifierName": { + "argumentTypes": null, + "id": 1808, + "name": "onlySlasher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "12048:11:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12048:11:2" + } + ], + "name": "slash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1807, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1802, + "name": "_prover", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "11962:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1801, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11962:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1804, + "name": "_challenger1", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "11979:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1803, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11979:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1806, + "name": "_challenger2", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "12001:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1805, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12001:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11961:61:2" + }, + "returnParameters": { + "id": 1810, + "nodeType": "ParameterList", + "parameters": [], + "src": "12064:0:2" + }, + "scope": 2379, + "src": "11947:812:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1909, + "nodeType": "Block", + "src": "13218:476:2", + "statements": [ + { + "assignments": [ + 1876 + ], + "declarations": [ + { + "constant": false, + "id": 1876, + "name": "darknodeOwner", + "nodeType": "VariableDeclaration", + "scope": 1909, + "src": "13228:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1875, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13228:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1881, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1879, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1869, + "src": "13272:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1877, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "13252:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "13252:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13252:32:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13228:56:2" + }, + { + "assignments": [ + 1883 + ], + "declarations": [ + { + "constant": false, + "id": 1883, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1909, + "src": "13331:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1882, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13331:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1888, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1886, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1869, + "src": "13367:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1884, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "13348:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2625, + "src": "13348:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13348:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13331:48:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1892, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1869, + "src": "13459:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1889, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "13438:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "removeDarknode", + "nodeType": "MemberAccess", + "referencedDeclaration": 2534, + "src": "13438:20:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 1893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13438:33:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1894, + "nodeType": "ExpressionStatement", + "src": "13438:33:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1898, + "name": "darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1876, + "src": "13551:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1899, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1883, + "src": "13566:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1896, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "13538:3:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 1897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "13538:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13538:35:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64207472616e73666572206661696c6564", + "id": 1901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13575:22:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + }, + "value": "bond transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + } + ], + "id": 1895, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "13530:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13530:68:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1903, + "nodeType": "ExpressionStatement", + "src": "13530:68:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1905, + "name": "darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1876, + "src": "13665:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1906, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1883, + "src": "13680:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1904, + "name": "LogDarknodeOwnerRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1341, + "src": "13640:24:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13640:47:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1908, + "nodeType": "EmitStatement", + "src": "13635:52:2" + } + ] + }, + "documentation": "@notice Refund the bond of a deregistered darknode. This will make the\n darknode available for registration again. Anyone can call this function\n but the bond will always be refunded to the darknode owner.\n\n /// @param _darknodeID The darknode ID that will be refunded. The caller\n of this method must be the owner of this darknode.", + "id": 1910, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1872, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1869, + "src": "13205:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1873, + "modifierName": { + "argumentTypes": null, + "id": 1871, + "name": "onlyRefundable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1412, + "src": "13190:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13190:27:2" + } + ], + "name": "refund", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1870, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1869, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1910, + "src": "13160:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13160:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13159:21:2" + }, + "returnParameters": { + "id": 1874, + "nodeType": "ParameterList", + "parameters": [], + "src": "13218:0:2" + }, + "scope": 2379, + "src": "13144:550:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1922, + "nodeType": "Block", + "src": "13945:56:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1919, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1912, + "src": "13982:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1917, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "13962:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2610, + "src": "13962:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_payable_$", + "typeString": "function (address) view external returns (address payable)" + } + }, + "id": 1920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13962:32:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 1916, + "id": 1921, + "nodeType": "Return", + "src": "13955:39:2" + } + ] + }, + "documentation": "@notice Retrieves the address of the account that registered a darknode.\n @param _darknodeID The ID of the darknode to retrieve the owner for.", + "id": 1923, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodeOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1913, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1912, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1923, + "src": "13884:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1911, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13884:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13883:21:2" + }, + "returnParameters": { + "id": 1916, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1915, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1923, + "src": "13928:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1914, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13928:15:2", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13927:17:2" + }, + "scope": 2379, + "src": "13858:143:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1935, + "nodeType": "Block", + "src": "14232:55:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1932, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1925, + "src": "14268:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1930, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "14249:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeBond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2625, + "src": "14249:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14249:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1929, + "id": 1934, + "nodeType": "Return", + "src": "14242:38:2" + } + ] + }, + "documentation": "@notice Retrieves the bond amount of a darknode in 10^-18 REN.\n @param _darknodeID The ID of the darknode to retrieve the bond for.", + "id": 1936, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodeBond", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1925, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "14179:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1924, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14179:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14178:21:2" + }, + "returnParameters": { + "id": 1929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1928, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "14223:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1927, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14223:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14222:9:2" + }, + "scope": 2379, + "src": "14154:133:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1948, + "nodeType": "Block", + "src": "14532:60:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1945, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1938, + "src": "14573:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1943, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "14549:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 1944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodePublicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 2670, + "src": "14549:23:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (address) view external returns (bytes memory)" + } + }, + "id": 1946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14549:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1942, + "id": 1947, + "nodeType": "Return", + "src": "14542:43:2" + } + ] + }, + "documentation": "@notice Retrieves the encryption public key of the darknode.\n @param _darknodeID The ID of the darknode to retrieve the public key for.", + "id": 1949, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodePublicKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1938, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 1949, + "src": "14474:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1937, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14474:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14473:21:2" + }, + "returnParameters": { + "id": 1942, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1941, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1949, + "src": "14518:12:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1940, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "14518:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14517:14:2" + }, + "scope": 2379, + "src": "14444:148:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1978, + "nodeType": "Block", + "src": "15315:170:2", + "statements": [ + { + "assignments": [ + 1960 + ], + "declarations": [ + { + "constant": false, + "id": 1960, + "name": "count", + "nodeType": "VariableDeclaration", + "scope": 1978, + "src": "15325:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15325:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1962, + "initialValue": { + "argumentTypes": null, + "id": 1961, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1953, + "src": "15341:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15325:22:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1963, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "15361:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15370:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15361:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1971, + "nodeType": "IfStatement", + "src": "15357:61:2", + "trueBody": { + "id": 1970, + "nodeType": "Block", + "src": "15373:45:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1966, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "15387:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1967, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "15395:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15387:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1969, + "nodeType": "ExpressionStatement", + "src": "15387:20:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1973, + "name": "_start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1951, + "src": "15457:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1974, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "15465:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15472:5:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1972, + "name": "getDarknodesFromEpochs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2350, + "src": "15434:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bool_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address,uint256,bool) view returns (address[] memory)" + } + }, + "id": 1976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15434:44:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 1958, + "id": 1977, + "nodeType": "Return", + "src": "15427:51:2" + } + ] + }, + "documentation": "@notice Retrieves a list of darknodes which are registered for the\n current epoch.\n @param _start A darknode ID used as an offset for the list. If _start is\n 0x0, the first dark node will be used. _start won't be\n included it is not registered for the epoch.\n @param _count The number of darknodes to retrieve starting from _start.\n If _count is 0, all of the darknodes from _start are\n retrieved. If _count is more than the remaining number of\n registered darknodes, the rest of the list will contain\n 0x0s.", + "id": 1979, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1954, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1951, + "name": "_start", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "15242:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1950, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15242:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1953, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "15258:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1952, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15258:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15241:32:2" + }, + "returnParameters": { + "id": 1958, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1957, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "15297:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1955, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15297:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1956, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15297:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15296:18:2" + }, + "scope": 2379, + "src": "15220:265:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2008, + "nodeType": "Block", + "src": "15746:182:2", + "statements": [ + { + "assignments": [ + 1990 + ], + "declarations": [ + { + "constant": false, + "id": 1990, + "name": "count", + "nodeType": "VariableDeclaration", + "scope": 2008, + "src": "15756:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1989, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15756:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1992, + "initialValue": { + "argumentTypes": null, + "id": 1991, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1983, + "src": "15772:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15756:22:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1993, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "15792:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1994, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15801:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15792:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2001, + "nodeType": "IfStatement", + "src": "15788:74:2", + "trueBody": { + "id": 2000, + "nodeType": "Block", + "src": "15804:58:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1996, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "15818:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1997, + "name": "numDarknodesPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "15826:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15818:33:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1999, + "nodeType": "ExpressionStatement", + "src": "15818:33:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2003, + "name": "_start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1981, + "src": "15901:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2004, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "15909:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15916:4:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2002, + "name": "getDarknodesFromEpochs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2350, + "src": "15878:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bool_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address,uint256,bool) view returns (address[] memory)" + } + }, + "id": 2006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15878:43:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 1988, + "id": 2007, + "nodeType": "Return", + "src": "15871:50:2" + } + ] + }, + "documentation": "@notice Retrieves a list of darknodes which were registered for the\n previous epoch. See `getDarknodes` for the parameter documentation.", + "id": 2009, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPreviousDarknodes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1984, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1981, + "name": "_start", + "nodeType": "VariableDeclaration", + "scope": 2009, + "src": "15673:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1980, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15673:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1983, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 2009, + "src": "15689:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1982, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15689:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15672:32:2" + }, + "returnParameters": { + "id": 1988, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1987, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2009, + "src": "15728:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1985, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15728:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1986, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15728:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15727:18:2" + }, + "scope": 2379, + "src": "15643:285:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2032, + "nodeType": "Block", + "src": "16175:156:2", + "statements": [ + { + "assignments": [ + 2017 + ], + "declarations": [ + { + "constant": false, + "id": 2017, + "name": "registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2032, + "src": "16185:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2016, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16185:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2022, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2020, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2011, + "src": "16235:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2018, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "16208:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeRegisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2640, + "src": "16208:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16208:39:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16185:62:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2023, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2017, + "src": "16264:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16280:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16264:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2026, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2017, + "src": "16285:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2027, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "16300:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "16300:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16285:39:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16264:60:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2015, + "id": 2031, + "nodeType": "Return", + "src": "16257:67:2" + } + ] + }, + "documentation": "@notice Returns whether a darknode is scheduled to become registered\n at next epoch.\n @param _darknodeID The ID of the darknode to return", + "id": 2033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isPendingRegistration", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2012, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2011, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2033, + "src": "16125:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2010, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16125:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16124:21:2" + }, + "returnParameters": { + "id": 2015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2014, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2033, + "src": "16169:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2013, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16169:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16168:6:2" + }, + "scope": 2379, + "src": "16094:237:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2056, + "nodeType": "Block", + "src": "16561:164:2", + "statements": [ + { + "assignments": [ + 2041 + ], + "declarations": [ + { + "constant": false, + "id": 2041, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2056, + "src": "16571:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2040, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16571:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2046, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2044, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2035, + "src": "16625:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2042, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "16596:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "16596:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16596:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16571:66:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2047, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2041, + "src": "16654:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16672:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16654:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2050, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2041, + "src": "16677:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2051, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "16694:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2052, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "16694:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16677:41:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16654:64:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2039, + "id": 2055, + "nodeType": "Return", + "src": "16647:71:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is in the pending deregistered state. In\n this state a darknode is still considered registered.", + "id": 2057, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isPendingDeregistration", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2035, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2057, + "src": "16511:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2034, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16511:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16510:21:2" + }, + "returnParameters": { + "id": 2039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2038, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2057, + "src": "16555:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2037, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16555:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16554:6:2" + }, + "scope": 2379, + "src": "16478:247:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2080, + "nodeType": "Block", + "src": "16871:165:2", + "statements": [ + { + "assignments": [ + 2065 + ], + "declarations": [ + { + "constant": false, + "id": 2065, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2080, + "src": "16881:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2064, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16881:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2070, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2068, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2059, + "src": "16935:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2066, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "16906:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "16906:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16906:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16881:66:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2071, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "16964:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16982:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16964:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2074, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "16987:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2075, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "17005:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2076, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "17005:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16987:42:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16964:65:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2063, + "id": 2079, + "nodeType": "Return", + "src": "16957:72:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is in the deregistered state.", + "id": 2081, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isDeregistered", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2059, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2081, + "src": "16823:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2058, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16823:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16822:21:2" + }, + "returnParameters": { + "id": 2063, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2062, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2081, + "src": "16865:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2061, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16865:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16864:6:2" + }, + "scope": 2379, + "src": "16799:237:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2103, + "nodeType": "Block", + "src": "17289:304:2", + "statements": [ + { + "assignments": [ + 2089 + ], + "declarations": [ + { + "constant": false, + "id": 2089, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2103, + "src": "17299:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2088, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17299:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2094, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2092, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2083, + "src": "17353:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2090, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "17324:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "17324:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17324:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17299:66:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2096, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2083, + "src": "17551:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2095, + "name": "isRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "17538:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 2097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17538:25:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2098, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2089, + "src": "17567:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17585:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17567:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17538:48:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2087, + "id": 2102, + "nodeType": "Return", + "src": "17531:55:2" + } + ] + }, + "documentation": "@notice Returns if a darknode can be deregistered. This is true if the\n darknodes is in the registered state and has not attempted to\n deregister yet.", + "id": 2104, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isDeregisterable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2083, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2104, + "src": "17241:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2082, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17241:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17240:21:2" + }, + "returnParameters": { + "id": 2087, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2086, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2104, + "src": "17283:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2085, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17283:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17282:6:2" + }, + "scope": 2379, + "src": "17215:378:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2133, + "nodeType": "Block", + "src": "17862:212:2", + "statements": [ + { + "assignments": [ + 2112 + ], + "declarations": [ + { + "constant": false, + "id": 2112, + "name": "registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2133, + "src": "17872:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17872:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2117, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2115, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2106, + "src": "17922:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2113, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "17895:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeRegisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2640, + "src": "17895:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17895:39:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17872:62:2" + }, + { + "assignments": [ + 2119 + ], + "declarations": [ + { + "constant": false, + "id": 2119, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2133, + "src": "17944:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17944:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2124, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2122, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2106, + "src": "17998:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2120, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "17969:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "17969:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17969:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17944:66:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2125, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "18027:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18043:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "18027:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2128, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2119, + "src": "18048:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18066:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "18048:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18027:40:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2110, + "id": 2132, + "nodeType": "Return", + "src": "18020:47:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is in the refunded state. This is true\n for darknodes that have never been registered, or darknodes that have\n been deregistered and refunded.", + "id": 2134, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRefunded", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2106, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2134, + "src": "17814:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2105, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17814:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17813:21:2" + }, + "returnParameters": { + "id": 2110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2109, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2134, + "src": "17856:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2108, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17856:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17855:6:2" + }, + "scope": 2379, + "src": "17794:280:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2153, + "nodeType": "Block", + "src": "18299:125:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2142, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "18331:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2141, + "name": "isDeregistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2081, + "src": "18316:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 2143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18316:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2146, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "18376:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2144, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "18347:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "18347:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18347:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2148, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "18392:13:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "18392:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18347:70:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18316:101:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2140, + "id": 2152, + "nodeType": "Return", + "src": "18309:108:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is refundable. This is true for darknodes\n that have been in the deregistered state for one full epoch.", + "id": 2154, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRefundable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2136, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2154, + "src": "18251:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18251:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18250:21:2" + }, + "returnParameters": { + "id": 2140, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2139, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2154, + "src": "18293:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2138, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18293:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18292:6:2" + }, + "scope": 2379, + "src": "18229:195:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2166, + "nodeType": "Block", + "src": "18566:70:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2162, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2156, + "src": "18603:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2163, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "18616:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + ], + "id": 2161, + "name": "isRegisteredInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "18583:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_struct$_Epoch_$1295_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,struct DarknodeRegistry.Epoch memory) view returns (bool)" + } + }, + "id": 2164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18583:46:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2160, + "id": 2165, + "nodeType": "Return", + "src": "18576:53:2" + } + ] + }, + "documentation": "@notice Returns if a darknode is in the registered state.", + "id": 2167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRegistered", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2156, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2167, + "src": "18518:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2155, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18518:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18517:21:2" + }, + "returnParameters": { + "id": 2160, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2159, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2167, + "src": "18560:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2158, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18560:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18559:6:2" + }, + "scope": 2379, + "src": "18496:140:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2179, + "nodeType": "Block", + "src": "18805:71:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2175, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2169, + "src": "18842:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2176, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1317, + "src": "18855:13:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + ], + "id": 2174, + "name": "isRegisteredInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "18822:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_struct$_Epoch_$1295_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,struct DarknodeRegistry.Epoch memory) view returns (bool)" + } + }, + "id": 2177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18822:47:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2173, + "id": 2178, + "nodeType": "Return", + "src": "18815:54:2" + } + ] + }, + "documentation": "@notice Returns if a darknode was in the registered state last epoch.", + "id": 2180, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRegisteredInPreviousEpoch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2169, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "18757:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18757:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18756:21:2" + }, + "returnParameters": { + "id": 2173, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2172, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "18799:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2171, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18799:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18798:6:2" + }, + "scope": 2379, + "src": "18720:156:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2229, + "nodeType": "Block", + "src": "19181:509:2", + "statements": [ + { + "assignments": [ + 2190 + ], + "declarations": [ + { + "constant": false, + "id": 2190, + "name": "registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2229, + "src": "19191:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19191:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2195, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2193, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2182, + "src": "19241:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2191, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "19214:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeRegisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2640, + "src": "19214:26:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19214:39:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19191:62:2" + }, + { + "assignments": [ + 2197 + ], + "declarations": [ + { + "constant": false, + "id": 2197, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2229, + "src": "19263:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2196, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19263:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2202, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2200, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2182, + "src": "19317:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2198, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "19288:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "darknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2655, + "src": "19288:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19288:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19263:66:2" + }, + { + "assignments": [ + 2204 + ], + "declarations": [ + { + "constant": false, + "id": 2204, + "name": "registered", + "nodeType": "VariableDeclaration", + "scope": 2229, + "src": "19339:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2203, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19339:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2213, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2205, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2190, + "src": "19357:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19373:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "19357:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2208, + "name": "registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2190, + "src": "19378:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2209, + "name": "_epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "19394:6:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory_ptr", + "typeString": "struct DarknodeRegistry.Epoch memory" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "19394:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19378:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19357:55:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19339:73:2" + }, + { + "assignments": [ + 2215 + ], + "declarations": [ + { + "constant": false, + "id": 2215, + "name": "notDeregistered", + "nodeType": "VariableDeclaration", + "scope": 2229, + "src": "19422:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2214, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19422:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2224, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2216, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2197, + "src": "19445:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19463:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "19445:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2219, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2197, + "src": "19468:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2220, + "name": "_epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "19485:6:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory_ptr", + "typeString": "struct DarknodeRegistry.Epoch memory" + } + }, + "id": 2221, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "19485:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19468:35:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19445:58:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19422:81:2" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2225, + "name": "registered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2204, + "src": "19654:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 2226, + "name": "notDeregistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "19668:15:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19654:29:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2188, + "id": 2228, + "nodeType": "Return", + "src": "19647:36:2" + } + ] + }, + "documentation": "@notice Returns if a darknode was in the registered state for a given\n epoch.\n @param _darknodeID The ID of the darknode\n @param _epoch One of currentEpoch, previousEpoch", + "id": 2230, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRegisteredInEpoch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2182, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2230, + "src": "19111:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2181, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19111:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2184, + "name": "_epoch", + "nodeType": "VariableDeclaration", + "scope": 2230, + "src": "19132:19:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_memory_ptr", + "typeString": "struct DarknodeRegistry.Epoch" + }, + "typeName": { + "contractScope": null, + "id": 2183, + "name": "Epoch", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1295, + "src": "19132:5:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage_ptr", + "typeString": "struct DarknodeRegistry.Epoch" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19110:42:2" + }, + "returnParameters": { + "id": 2188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2187, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2230, + "src": "19175:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2186, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19175:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19174:6:2" + }, + "scope": 2379, + "src": "19082:608:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 2349, + "nodeType": "Block", + "src": "20133:1037:2", + "statements": [ + { + "assignments": [ + 2243 + ], + "declarations": [ + { + "constant": false, + "id": 2243, + "name": "count", + "nodeType": "VariableDeclaration", + "scope": 2349, + "src": "20143:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20143:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2245, + "initialValue": { + "argumentTypes": null, + "id": 2244, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2234, + "src": "20159:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20143:22:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2246, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2243, + "src": "20179:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20188:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20179:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2254, + "nodeType": "IfStatement", + "src": "20175:61:2", + "trueBody": { + "id": 2253, + "nodeType": "Block", + "src": "20191:45:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2249, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2243, + "src": "20205:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2250, + "name": "numDarknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1297, + "src": "20213:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20205:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2252, + "nodeType": "ExpressionStatement", + "src": "20205:20:2" + } + ] + } + }, + { + "assignments": [ + 2258 + ], + "declarations": [ + { + "constant": false, + "id": 2258, + "name": "nodes", + "nodeType": "VariableDeclaration", + "scope": 2349, + "src": "20246:22:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2256, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20246:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2257, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20246:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2264, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2262, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2243, + "src": "20285:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "20271:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 2259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20275:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2260, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20275:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20271:20:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20246:45:2" + }, + { + "assignments": [ + 2266 + ], + "declarations": [ + { + "constant": false, + "id": 2266, + "name": "n", + "nodeType": "VariableDeclaration", + "scope": 2349, + "src": "20351:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2265, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20351:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2268, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20363:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20351:13:2" + }, + { + "assignments": [ + 2270 + ], + "declarations": [ + { + "constant": false, + "id": 2270, + "name": "next", + "nodeType": "VariableDeclaration", + "scope": 2349, + "src": "20374:12:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2269, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20374:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2272, + "initialValue": { + "argumentTypes": null, + "id": 2271, + "name": "_start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2232, + "src": "20389:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20374:21:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2273, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20409:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20425:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20417:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20417:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "20409:18:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2285, + "nodeType": "IfStatement", + "src": "20405:69:2", + "trueBody": { + "id": 2284, + "nodeType": "Block", + "src": "20429:45:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2278, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20443:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2279, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "20450:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "begin", + "nodeType": "MemberAccess", + "referencedDeclaration": 2481, + "src": "20450:11:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20450:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "20443:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2283, + "nodeType": "ExpressionStatement", + "src": "20443:20:2" + } + ] + } + }, + { + "body": { + "id": 2345, + "nodeType": "Block", + "src": "20572:570:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2289, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20590:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20606:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20598:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2292, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20598:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "20590:18:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2296, + "nodeType": "IfStatement", + "src": "20586:62:2", + "trueBody": { + "id": 2295, + "nodeType": "Block", + "src": "20610:38:2", + "statements": [ + { + "id": 2294, + "nodeType": "Break", + "src": "20628:5:2" + } + ] + } + }, + { + "assignments": [ + 2298 + ], + "declarations": [ + { + "constant": false, + "id": 2298, + "name": "includeNext", + "nodeType": "VariableDeclaration", + "scope": 2345, + "src": "20729:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2297, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20729:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2299, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "20729:16:2" + }, + { + "condition": { + "argumentTypes": null, + "id": 2300, + "name": "_usePreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2236, + "src": "20763:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2314, + "nodeType": "Block", + "src": "20868:65:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2308, + "name": "includeNext", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "20886:11:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2310, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20913:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2309, + "name": "isRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "20900:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 2311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20900:18:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20886:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2313, + "nodeType": "ExpressionStatement", + "src": "20886:32:2" + } + ] + }, + "id": 2315, + "nodeType": "IfStatement", + "src": "20759:174:2", + "trueBody": { + "id": 2307, + "nodeType": "Block", + "src": "20782:80:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2301, + "name": "includeNext", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "20800:11:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2303, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20842:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2302, + "name": "isRegisteredInPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2180, + "src": "20814:27:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 2304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20814:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20800:47:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2306, + "nodeType": "ExpressionStatement", + "src": "20800:47:2" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "20950:12:2", + "subExpression": { + "argumentTypes": null, + "id": 2316, + "name": "includeNext", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2298, + "src": "20951:11:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2327, + "nodeType": "IfStatement", + "src": "20946:100:2", + "trueBody": { + "id": 2326, + "nodeType": "Block", + "src": "20964:82:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2318, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "20982:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2321, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "21000:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2319, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "20989:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "next", + "nodeType": "MemberAccess", + "referencedDeclaration": 2497, + "src": "20989:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_$", + "typeString": "function (address) view external returns (address)" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20989:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "20982:23:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2324, + "nodeType": "ExpressionStatement", + "src": "20982:23:2" + }, + { + "id": 2325, + "nodeType": "Continue", + "src": "21023:8:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 2332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2328, + "name": "nodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "21059:5:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2330, + "indexExpression": { + "argumentTypes": null, + "id": 2329, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "21065:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "21059:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2331, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "21070:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "21059:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2333, + "nodeType": "ExpressionStatement", + "src": "21059:15:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2334, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "21088:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2337, + "name": "next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2270, + "src": "21106:4:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2335, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "21095:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "next", + "nodeType": "MemberAccess", + "referencedDeclaration": 2497, + "src": "21095:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_address_$", + "typeString": "function (address) view external returns (address)" + } + }, + "id": 2338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21095:16:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "21088:23:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2340, + "nodeType": "ExpressionStatement", + "src": "21088:23:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2341, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "21125:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 2342, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21130:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "21125:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2344, + "nodeType": "ExpressionStatement", + "src": "21125:6:2" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2286, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "20561:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2287, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2243, + "src": "20565:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20561:9:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2346, + "nodeType": "WhileStatement", + "src": "20554:588:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 2347, + "name": "nodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "21158:5:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2241, + "id": 2348, + "nodeType": "Return", + "src": "21151:12:2" + } + ] + }, + "documentation": "@notice Returns a list of darknodes registered for either the current\n or the previous epoch. See `getDarknodes` for documentation on the\n parameters `_start` and `_count`.\n @param _usePreviousEpoch If true, use the previous epoch, otherwise use\n the current epoch.", + "id": 2350, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDarknodesFromEpochs", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2232, + "name": "_start", + "nodeType": "VariableDeclaration", + "scope": 2350, + "src": "20037:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20037:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2234, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 2350, + "src": "20053:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2233, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20053:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2236, + "name": "_usePreviousEpoch", + "nodeType": "VariableDeclaration", + "scope": 2350, + "src": "20069:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2235, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20069:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20036:56:2" + }, + "returnParameters": { + "id": 2241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2240, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2350, + "src": "20115:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20115:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2239, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20115:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20114:18:2" + }, + "scope": 2379, + "src": "20005:1165:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 2377, + "nodeType": "Block", + "src": "21293:303:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2358, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2352, + "src": "21386:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2362, + "name": "minimumEpochInterval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "21428:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2359, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1315, + "src": "21399:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Epoch_$1295_storage", + "typeString": "struct DarknodeRegistry.Epoch storage ref" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "blocknumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 1294, + "src": "21399:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6294, + "src": "21399:28:2", + "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": 2363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21399:50:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2355, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1321, + "src": "21351:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistryStore_$2671", + "typeString": "contract DarknodeRegistryStore" + } + }, + "id": 2357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "updateDarknodeDeregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2595, + "src": "21351:34:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 2364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21351:99:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2365, + "nodeType": "ExpressionStatement", + "src": "21351:99:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2366, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "21460:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 2369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21510:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 2367, + "name": "numDarknodesNextEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1299, + "src": "21484:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "21484:25:2", + "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": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21484:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21460:52:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2372, + "nodeType": "ExpressionStatement", + "src": "21460:52:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2374, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2352, + "src": "21577:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2373, + "name": "LogDarknodeDeregistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1335, + "src": "21553:23:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 2375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21553:36:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2376, + "nodeType": "EmitStatement", + "src": "21548:41:2" + } + ] + }, + "documentation": "Private function called by `deregister` and `slash`", + "id": 2378, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deregisterDarknode", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2352, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2378, + "src": "21264:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21264:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21263:21:2" + }, + "returnParameters": { + "id": 2354, + "nodeType": "ParameterList", + "parameters": [], + "src": "21293:0:2" + }, + "scope": 2379, + "src": "21236:360:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + } + ], + "scope": 2380, + "src": "375:21223:2" + } + ], + "src": "0:21599:2" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0xd2819ba4c736158371edf0be38fd8d1fc435609832e392f118c4c79160e5bd7b": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknodeID", + "type": "address" + }, + { + "indexed": false, + "name": "_bond", + "type": "uint256" + } + ], + "name": "LogDarknodeRegistered", + "type": "event", + "signature": "0xd2819ba4c736158371edf0be38fd8d1fc435609832e392f118c4c79160e5bd7b" + }, + "0x2dc89de5703d2c341a22ebfc7c4d3f197e5e1f0c19bc2e1135f387163cb927e4": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_darknodeID", + "type": "address" + } + ], + "name": "LogDarknodeDeregistered", + "type": "event", + "signature": "0x2dc89de5703d2c341a22ebfc7c4d3f197e5e1f0c19bc2e1135f387163cb927e4" + }, + "0x96ab9e56c79eee4a72db6e2879cbfbecdba5c65b411f4861824e66b89df19764": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + } + ], + "name": "LogDarknodeOwnerRefunded", + "type": "event", + "signature": "0x96ab9e56c79eee4a72db6e2879cbfbecdba5c65b411f4861824e66b89df19764" + }, + "0xaf2fc4796f2932ce294c3684deffe5098d3ef65dc2dd64efa80ef94eed88b01e": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "epochhash", + "type": "uint256" + } + ], + "name": "LogNewEpoch", + "type": "event", + "signature": "0xaf2fc4796f2932ce294c3684deffe5098d3ef65dc2dd64efa80ef94eed88b01e" + }, + "0x7c77c94944e9e4e5b0d46f1297127d060020792687cd743401d782346c68f655": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "previousMinimumBond", + "type": "uint256" + }, + { + "indexed": false, + "name": "nextMinimumBond", + "type": "uint256" + } + ], + "name": "LogMinimumBondUpdated", + "type": "event", + "signature": "0x7c77c94944e9e4e5b0d46f1297127d060020792687cd743401d782346c68f655" + }, + "0x6d520e46e5714982ddf8cb6216bcb3e1c1d5b79d337afc305335f819394f5d6a": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "previousMinimumPodSize", + "type": "uint256" + }, + { + "indexed": false, + "name": "nextMinimumPodSize", + "type": "uint256" + } + ], + "name": "LogMinimumPodSizeUpdated", + "type": "event", + "signature": "0x6d520e46e5714982ddf8cb6216bcb3e1c1d5b79d337afc305335f819394f5d6a" + }, + "0xb218cde2730b79a0667ddf869466ee66a12ef56fe65fa4986a590f8a7108c9de": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "previousMinimumEpochInterval", + "type": "uint256" + }, + { + "indexed": false, + "name": "nextMinimumEpochInterval", + "type": "uint256" + } + ], + "name": "LogMinimumEpochIntervalUpdated", + "type": "event", + "signature": "0xb218cde2730b79a0667ddf869466ee66a12ef56fe65fa4986a590f8a7108c9de" + }, + "0x933228a1c3ba8fadd3ce47a9db5b898be647f89af99ba7c1b9a655f59ea306c8": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "previousSlasher", + "type": "address" + }, + { + "indexed": false, + "name": "nextSlasher", + "type": "address" + } + ], + "name": "LogSlasherUpdated", + "type": "event", + "signature": "0x933228a1c3ba8fadd3ce47a9db5b898be647f89af99ba7c1b9a655f59ea306c8" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + } + }, + "links": {}, + "address": "0x6E1a6b85f05bfec5c24C7a26E302cB28e639651c", + "transactionHash": "0x0aff815ebb85f355f0b62300b3f986e9d1a66b1b712e31196381c1779bd405cd" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:19:33.422Z", + "devdoc": { + "methods": { + "constructor": { + "params": { + "_VERSION": "A string defining the contract version.", + "_minimumBond": "The minimum bond amount that can be submitted by a Darknode.", + "_minimumEpochInterval": "The minimum number of blocks between epochs.", + "_minimumPodSize": "The minimum size of a Darknode pod.", + "_renAddress": "The address of the RenToken contract.", + "_storeAddress": "The address of the DarknodeRegistryStore contract." + } + }, + "deregister(address)": { + "params": { + "_darknodeID": "The darknode ID that will be deregistered. The caller of this method store.darknodeRegisteredAt(_darknodeID) must be" + } + }, + "getDarknodeBond(address)": { + "params": { + "_darknodeID": "The ID of the darknode to retrieve the bond for." + } + }, + "getDarknodeOwner(address)": { + "params": { + "_darknodeID": "The ID of the darknode to retrieve the owner for." + } + }, + "getDarknodePublicKey(address)": { + "params": { + "_darknodeID": "The ID of the darknode to retrieve the public key for." + } + }, + "getDarknodes(address,uint256)": { + "params": { + "_count": "The number of darknodes to retrieve starting from _start. If _count is 0, all of the darknodes from _start are retrieved. If _count is more than the remaining number of registered darknodes, the rest of the list will contain 0x0s.", + "_start": "A darknode ID used as an offset for the list. If _start is 0x0, the first dark node will be used. _start won't be included it is not registered for the epoch." + } + }, + "isOwner()": { + "details": "Returns true if the caller is the current owner." + }, + "isPendingRegistration(address)": { + "params": { + "_darknodeID": "The ID of the darknode to return" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "refund(address)": { + "params": { + "_darknodeID": "The darknode ID that will be refunded. The caller of this method must be the owner of this darknode." + } + }, + "register(address,bytes)": { + "params": { + "_darknodeID": "The darknode ID that will be registered.", + "_publicKey": "The public key of the darknode. It is stored to allow other darknodes and traders to encrypt messages to the trader." + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "slash(address,address,address)": { + "params": { + "_challenger1": "The first of the two darknodes who submitted the challenge", + "_challenger2": "The second of the two darknodes who submitted the challenge", + "_prover": "The guilty prover whose bond is being slashed" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "transferStoreOwnership(address)": { + "params": { + "_newOwner": "The address to transfer the ownership to." + } + }, + "updateMinimumBond(uint256)": { + "params": { + "_nextMinimumBond": "The minimum bond amount that can be submitted by a darknode." + } + }, + "updateMinimumEpochInterval(uint256)": { + "params": { + "_nextMinimumEpochInterval": "The minimum number of blocks between epochs." + } + }, + "updateMinimumPodSize(uint256)": { + "params": { + "_nextMinimumPodSize": "The minimum size of a pod." + } + }, + "updateSlasher(address)": { + "params": { + "_slasher": "The new slasher address." + } + } + } + }, + "userdoc": { + "methods": { + "claimStoreOwnership()": { + "notice": "Claims ownership of the store passed in to the constructor. `transferStoreOwnership` must have previously been called when transferring from another Darknode Registry." + }, + "constructor": "The contract constructor. ", + "deregister(address)": { + "notice": "Deregister a darknode. The darknode will not be deregistered until the end of the epoch. After another epoch, the bond can be refunded by calling the refund method." + }, + "epoch()": { + "notice": "Progress the epoch if it is possible to do so. This captures the current timestamp and current blockhash and overrides the current epoch." + }, + "getDarknodeBond(address)": { + "notice": "Retrieves the bond amount of a darknode in 10^-18 REN." + }, + "getDarknodeOwner(address)": { + "notice": "Retrieves the address of the account that registered a darknode." + }, + "getDarknodePublicKey(address)": { + "notice": "Retrieves the encryption public key of the darknode." + }, + "getDarknodes(address,uint256)": { + "notice": "Retrieves a list of darknodes which are registered for the current epoch." + }, + "getPreviousDarknodes(address,uint256)": { + "notice": "Retrieves a list of darknodes which were registered for the previous epoch. See `getDarknodes` for the parameter documentation." + }, + "isDeregisterable(address)": { + "notice": "Returns if a darknode can be deregistered. This is true if the darknodes is in the registered state and has not attempted to deregister yet." + }, + "isDeregistered(address)": { + "notice": "Returns if a darknode is in the deregistered state." + }, + "isPendingDeregistration(address)": { + "notice": "Returns if a darknode is in the pending deregistered state. In this state a darknode is still considered registered." + }, + "isPendingRegistration(address)": { + "notice": "Returns whether a darknode is scheduled to become registered at next epoch." + }, + "isRefundable(address)": { + "notice": "Returns if a darknode is refundable. This is true for darknodes that have been in the deregistered state for one full epoch." + }, + "isRefunded(address)": { + "notice": "Returns if a darknode is in the refunded state. This is true for darknodes that have never been registered, or darknodes that have been deregistered and refunded." + }, + "isRegistered(address)": { + "notice": "Returns if a darknode is in the registered state." + }, + "isRegisteredInPreviousEpoch(address)": { + "notice": "Returns if a darknode was in the registered state last epoch." + }, + "refund(address)": { + "notice": "Refund the bond of a deregistered darknode. This will make the darknode available for registration again. Anyone can call this function but the bond will always be refunded to the darknode owner. " + }, + "register(address,bytes)": { + "notice": "Register a darknode and transfer the bond to this contract. Before registering, the bond transfer must be approved in the REN contract. The caller must provide a public encryption key for the darknode. The darknode will remain pending registration until the next epoch. Only after this period can the darknode be deregistered. The caller of this method will be stored as the owner of the darknode. " + }, + "slash(address,address,address)": { + "notice": "Allow the DarknodeSlasher contract to slash half of a darknode's bond and deregister it. The bond is distributed as follows: 1/2 is kept by the guilty prover 1/8 is rewarded to the first challenger 1/8 is rewarded to the second challenger 1/4 becomes unassigned" + }, + "transferStoreOwnership(address)": { + "notice": "Allows the contract owner to initiate an ownership transfer of the DarknodeRegistryStore. " + }, + "updateMinimumBond(uint256)": { + "notice": "Allows the contract owner to update the minimum bond." + }, + "updateMinimumEpochInterval(uint256)": { + "notice": "Allows the contract owner to update the minimum epoch interval." + }, + "updateMinimumPodSize(uint256)": { + "notice": "Allows the contract owner to update the minimum pod size." + }, + "updateSlasher(address)": { + "notice": "Allow the contract owner to update the DarknodeSlasher contract address." + } + }, + "notice": "DarknodeRegistry is responsible for the registration and deregistration of Darknodes." + } +} \ No newline at end of file diff --git a/build/devnet/DarknodeRegistryStore.json b/build/devnet/DarknodeRegistryStore.json new file mode 100644 index 00000000..65c492d1 --- /dev/null +++ b/build/devnet/DarknodeRegistryStore.json @@ -0,0 +1,7689 @@ +{ + "contractName": "DarknodeRegistryStore", + "abi": [ + { + "constant": false, + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ren", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_VERSION", + "type": "string" + }, + { + "name": "_ren", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_darknodeID", + "type": "address" + }, + { + "name": "_darknodeOwner", + "type": "address" + }, + { + "name": "_bond", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_registeredAt", + "type": "uint256" + }, + { + "name": "_deregisteredAt", + "type": "uint256" + } + ], + "name": "appendDarknode", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "begin", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "darknodeID", + "type": "address" + } + ], + "name": "next", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "darknodeID", + "type": "address" + } + ], + "name": "removeDarknode", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "darknodeID", + "type": "address" + }, + { + "name": "decreasedBond", + "type": "uint256" + } + ], + "name": "updateDarknodeBond", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "darknodeID", + "type": "address" + }, + { + "name": "deregisteredAt", + "type": "uint256" + } + ], + "name": "updateDarknodeDeregisteredAt", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "darknodeID", + "type": "address" + } + ], + "name": "darknodeOwner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "darknodeID", + "type": "address" + } + ], + "name": "darknodeBond", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "darknodeID", + "type": "address" + } + ], + "name": "darknodeRegisteredAt", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "darknodeID", + "type": "address" + } + ], + "name": "darknodeDeregisteredAt", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "darknodeID", + "type": "address" + } + ], + "name": "darknodePublicKey", + "outputs": [ + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"darknodeID\",\"type\":\"address\"}],\"name\":\"darknodeDeregisteredAt\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"begin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"darknodeID\",\"type\":\"address\"},{\"name\":\"deregisteredAt\",\"type\":\"uint256\"}],\"name\":\"updateDarknodeDeregisteredAt\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"darknodeID\",\"type\":\"address\"}],\"name\":\"removeDarknode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ren\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"darknodeID\",\"type\":\"address\"}],\"name\":\"darknodeOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_darknodeID\",\"type\":\"address\"},{\"name\":\"_darknodeOwner\",\"type\":\"address\"},{\"name\":\"_bond\",\"type\":\"uint256\"},{\"name\":\"_publicKey\",\"type\":\"bytes\"},{\"name\":\"_registeredAt\",\"type\":\"uint256\"},{\"name\":\"_deregisteredAt\",\"type\":\"uint256\"}],\"name\":\"appendDarknode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"darknodeID\",\"type\":\"address\"}],\"name\":\"next\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"darknodeID\",\"type\":\"address\"}],\"name\":\"darknodeBond\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"darknodeID\",\"type\":\"address\"}],\"name\":\"darknodeRegisteredAt\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"darknodeID\",\"type\":\"address\"}],\"name\":\"darknodePublicKey\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"darknodeID\",\"type\":\"address\"},{\"name\":\"decreasedBond\",\"type\":\"uint256\"}],\"name\":\"updateDarknodeBond\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_VERSION\",\"type\":\"string\"},{\"name\":\"_ren\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"appendDarknode(address,address,uint256,bytes,uint256,uint256)\":{\"params\":{\"_bond\":\"The darknode's bond value\",\"_darknodeID\":\"The darknode's ID.\",\"_darknodeOwner\":\"The darknode's owner's address\",\"_deregisteredAt\":\"The time stamp when the darknode is deregistered.\",\"_publicKey\":\"The darknode's public key\",\"_registeredAt\":\"The time stamp when the darknode is registered.\"}},\"claimOwnership()\":{\"details\":\"Allows the pendingOwner address to finalize the transfer.\"},\"constructor\":{\"params\":{\"_VERSION\":\"A string defining the contract version.\",\"_ren\":\"The address of the RenToken contract.\"}},\"isOwner()\":{\"return\":\"true if `msg.sender` is the owner of the contract.\"},\"owner()\":{\"return\":\"the address of the owner.\"},\"renounceOwnership()\":{\"details\":\"Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore.\"},\"transferOwnership(address)\":{\"details\":\"Allows the current owner to set the pendingOwner address.\",\"params\":{\"newOwner\":\"The address to transfer ownership to.\"}}}},\"userdoc\":{\"methods\":{\"appendDarknode(address,address,uint256,bytes,uint256,uint256)\":{\"notice\":\"Instantiates a darknode and appends it to the darknodes linked-list. \"},\"begin()\":{\"notice\":\"Returns the address of the first darknode in the store\"},\"constructor\":\"The contract constructor. \",\"darknodeBond(address)\":{\"notice\":\"Returns the bond of a given darknode.\"},\"darknodeDeregisteredAt(address)\":{\"notice\":\"Returns the deregistration time of a given darknode.\"},\"darknodeOwner(address)\":{\"notice\":\"Returns the owner of a given darknode.\"},\"darknodePublicKey(address)\":{\"notice\":\"Returns the encryption public key of a given darknode.\"},\"darknodeRegisteredAt(address)\":{\"notice\":\"Returns the registration time of a given darknode.\"},\"next(address)\":{\"notice\":\"Returns the address of the next darknode in the store after the given address.\"},\"removeDarknode(address)\":{\"notice\":\"Removes a darknode from the store and transfers its bond to the owner of this contract.\"},\"renounceOwnership()\":{\"notice\":\"Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"updateDarknodeBond(address,uint256)\":{\"notice\":\"Updates the bond of a darknode. The new bond must be smaller than the previous bond of the darknode.\"},\"updateDarknodeDeregisteredAt(address,uint256)\":{\"notice\":\"Updates the deregistration timestamp of a darknode.\"}},\"notice\":\"This contract stores data and funds for the DarknodeRegistry contract. The data / fund logic and storage have been separated to improve upgradability.\"}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol\":\"DarknodeRegistryStore\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol\":{\"keccak256\":\"0x423b0630cad633c8385e457c0762a8d4b2a5028ee2e89af3f112d5f2d3a04022\",\"urls\":[\"bzzr://de7a014c67223932f191f05238df1a37fa3d325dad943787b3506f072af8e444\"]},\"/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol\":{\"keccak256\":\"0x574c593875a7afc210e709573a4d46d6ad6ea60d348ade04692149aae68a85da\",\"urls\":[\"bzzr://6216d6c45babda33bf82905fd7384368d9529b6e572f435c2a217bd7634467e9\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/LinkedList.sol\":{\"keccak256\":\"0x318273ca74f037e14739675b74e3538fa6d08ff412869f1931aacd351d35bdcc\",\"urls\":[\"bzzr://2174bf7bb80a3ed2d366ac0041168e2478c5b0a65b9a8aeaf99a0058e3021f53\"]},\"openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb\",\"urls\":[\"bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad\"]},\"openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0xf6826c684d51ca28db5293ce11a54c5cca1c757b6cd32b87613833c65086f995\",\"urls\":[\"bzzr://01b2756ab5b41b1d7ccadfeac53fbdce9c889263f1e011329c300c5fa3fda65f\"]},\"openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x609f8cb524cd6b502624c79c099ec2fc6f23eef57b5c38e28efd82490875f37e\",\"urls\":[\"bzzr://46ee461a64298ef418bd100df1301355f4dc9ffeb06fe7a39aaf98d45c0bf988\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xf79fb10e8235770eb4aea7249034076a3cc9f9119ad944fc48705bae9c9d20dc\",\"urls\":[\"bzzr://d12a11272051eb6586de8f7e0a82c04a98c9984ce8b2a6cf1ee439f65aba29a9\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa5ebf3344a36eb60e723e0764d85251c496e15e4b2d737b56415502b559a1765\",\"urls\":[\"bzzr://68812cb0a1d373d12c6986f5a9314c9bae7891a07a0e301d2317fcf409102f54\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0xc4973487824e5855e78e27d685b387566df52ea4b0854ba60b8703b533de47d4\",\"urls\":[\"bzzr://299d2f2c37a1b0cc8b15927fc516cc7f8a8f48e246512b3b3880bd3e4f0220d4\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620015b0380380620015b0833981018060405260408110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b5050602090910151600180546001600160a01b0319163317908190556040519294509092506001600160a01b0316906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38151620000eb90600290602085019062000113565b50600580546001600160a01b0319166001600160a01b039290921691909117905550620001b8565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200015657805160ff191683800117855562000186565b8280016001018555821562000186579182015b828111156200018657825182559160200191906001019062000169565b506200019492915062000198565b5090565b620001b591905b808211156200019457600081556001016200019f565b90565b6113e880620001c86000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063a3078815116100a2578063e2d7c64c11610071578063e2d7c64c1461030f578063ee594a5014610335578063f2fde38b146103d0578063fbc402fc146103f6578063ffa1ad741461042257610116565b8063a307881514610207578063a85ef5791461022d578063ab73e316146102c3578063cad41357146102e957610116565b80634e71e0c8116100e95780634e71e0c8146101cb578063715018a6146101d35780638a9b4067146101db5780638da5cb5b146101e35780638f32d59b146101eb57610116565b806301930b6e1461011b5780631bce6ff3146101535780633ac39d4b1461017757806341b44392146101a5575b600080fd5b6101416004803603602081101561013157600080fd5b50356001600160a01b031661042a565b60408051918252519081900360200190f35b61015b610496565b604080516001600160a01b039092168252519081900360200190f35b6101a36004803603604081101561018d57600080fd5b506001600160a01b0381351690602001356104f2565b005b6101a3600480360360208110156101bb57600080fd5b50356001600160a01b031661055c565b6101a36106ee565b6101a36107b5565b61015b610849565b61015b610858565b6101f3610867565b604080519115158252519081900360200190f35b61015b6004803603602081101561021d57600080fd5b50356001600160a01b0316610878565b6101a3600480360360c081101561024357600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561027e57600080fd5b82018360208201111561029057600080fd5b803590602001918460018302840111640100000000831117156102b257600080fd5b9193509150803590602001356108e3565b61015b600480360360208110156102d957600080fd5b50356001600160a01b0316610a1d565b610141600480360360208110156102ff57600080fd5b50356001600160a01b0316610a7a565b6101416004803603602081101561032557600080fd5b50356001600160a01b0316610ae5565b61035b6004803603602081101561034b57600080fd5b50356001600160a01b0316610b50565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561039557818101518382015260200161037d565b50505050905090810190601f1680156103c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a3600480360360208110156103e657600080fd5b50356001600160a01b0316610c48565b6101a36004803603604081101561040c57600080fd5b506001600160a01b038135169060200135610cb4565b61035b610e85565b6000610434610867565b6104765760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b506001600160a01b03166000908152600360208190526040909120015490565b60006104a0610867565b6104e25760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6104ec6004610f10565b90505b90565b6104fa610867565b61053c5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001600160a01b0390911660009081526003602081905260409091200155565b610564610867565b6105a65760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600360208190526040822060018101805482546001600160a01b0319168355908490556002820184905591810183905590916105f46004830182611285565b5050610601600483610f2f565b6005546001600160a01b031663a9059cbb61061a610858565b836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561066a57600080fd5b505af115801561067e573d6000803e3d6000fd5b505050506040513d602081101561069457600080fd5b50516106ea5760408051600160e51b62461bcd02815260206004820152601460248201527f626f6e64207472616e73666572206661696c6564000000000000000000000000604482015290519081900360640190fd5b5050565b6000546001600160a01b031633146107505760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b600080546001546040516001600160a01b039283169392909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600180546001600160a01b03199081166001600160a01b03841617909155169055565b6107bd610867565b6107ff5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6005546001600160a01b031681565b6001546001600160a01b031690565b6001546001600160a01b0316331490565b6000610882610867565b6108c45760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b506001600160a01b039081166000908152600360205260409020541690565b6108eb610867565b61092d5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6109356112cc565b6040518060a00160405280886001600160a01b0316815260200187815260200184815260200183815260200186868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250506001600160a01b038b8116825260036020818152604093849020865181546001600160a01b0319169416939093178355858101516001840155928501516002830155606085015190820155608084015180519495508594919350610a04926004850192910190611304565b50905050610a13600489611011565b5050505050505050565b6000610a27610867565b610a695760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b610a74600483611024565b92915050565b6000610a84610867565b610ac65760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b506001600160a01b031660009081526003602052604090206001015490565b6000610aef610867565b610b315760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b506001600160a01b031660009081526003602052604090206002015490565b6060610b5a610867565b610b9c5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526003602090815260409182902060040180548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015610c3c5780601f10610c1157610100808354040283529160200191610c3c565b820191906000526020600020905b815481529060010190602001808311610c1f57829003601f168201915b50505050509050919050565b610c50610867565b610c925760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610cbc610867565b610cfe5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001600160a01b038216600090815260036020526040902060010154808210610d715760408051600160e51b62461bcd02815260206004820152601260248201527f626f6e64206e6f74206465637265617365640000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0380841660009081526003602052604090206001018390556005541663a9059cbb610da1610858565b610db1848663ffffffff61109916565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610e0057600080fd5b505af1158015610e14573d6000803e3d6000fd5b505050506040513d6020811015610e2a57600080fd5b5051610e805760408051600160e51b62461bcd02815260206004820152601460248201527f626f6e64207472616e73666572206661696c6564000000000000000000000000604482015290519081900360640190fd5b505050565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610f085780601f10610edd57610100808354040283529160200191610f08565b820191906000526020600020905b815481529060010190602001808311610eeb57829003601f168201915b505050505081565b600080805260209190915260409020600101546001600160a01b031690565b610f3982826110f9565b610f7e5760408051600160e51b62461bcd02815260206004820152600b6024820152600160aa1b6a1b9bdd081a5b881b1a5cdd02604482015290519081900360640190fd5b6001600160a01b038116610f91576106ea565b6001600160a01b0390811660008181526020939093526040808420805460018083018054610100938490048816808a52868a209093018054919098166001600160a01b031991821681179098559688529387208054610100600160a81b031916919092021790559190935280546001600160a81b03191690558154169055565b6106ea8261101e84611118565b8361113a565b600061103083836110f9565b6110755760408051600160e51b62461bcd02815260206004820152600b6024820152600160aa1b6a1b9bdd081a5b881b1a5cdd02604482015290519081900360640190fd5b506001600160a01b0390811660009081526020929092526040909120600101541690565b6000828211156110f35760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b03166000908152602091909152604090205460ff1690565b60008080526020829052604090205461010090046001600160a01b0316919050565b61114483826110f9565b156111995760408051600160e51b62461bcd02815260206004820152600f60248201527f616c726561647920696e206c6973740000000000000000000000000000000000604482015290519081900360640190fd5b6111a383836110f9565b806111b557506001600160a01b038216155b6111fa5760408051600160e51b62461bcd02815260206004820152600b6024820152600160aa1b6a1b9bdd081a5b881b1a5cdd02604482015290519081900360640190fd5b6001600160a01b0391821660008181526020949094526040808520600190810180549486168088528388208054610100600160a81b03199081166101009788021782558185018054989099166001600160a01b031998891681179099558354909716821790925595875291862080549094169285029290921790925591909252815460ff1916179055565b50805460018160011615610100020316600290046000825580601f106112ab57506112c9565b601f0160209004906000526020600020908101906112c99190611382565b50565b6040518060a0016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061134557805160ff1916838001178555611372565b82800160010185558215611372579182015b82811115611372578251825591602001919060010190611357565b5061137e929150611382565b5090565b6104ef91905b8082111561137e576000815560010161138856fe6d757374206265206f776e657200000000000000000000000000000000000000a165627a7a72305820d5bef617691f99bdada4e93bc9a6edb17e7e8f6653d52d502663ae530ba02bb60029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063a3078815116100a2578063e2d7c64c11610071578063e2d7c64c1461030f578063ee594a5014610335578063f2fde38b146103d0578063fbc402fc146103f6578063ffa1ad741461042257610116565b8063a307881514610207578063a85ef5791461022d578063ab73e316146102c3578063cad41357146102e957610116565b80634e71e0c8116100e95780634e71e0c8146101cb578063715018a6146101d35780638a9b4067146101db5780638da5cb5b146101e35780638f32d59b146101eb57610116565b806301930b6e1461011b5780631bce6ff3146101535780633ac39d4b1461017757806341b44392146101a5575b600080fd5b6101416004803603602081101561013157600080fd5b50356001600160a01b031661042a565b60408051918252519081900360200190f35b61015b610496565b604080516001600160a01b039092168252519081900360200190f35b6101a36004803603604081101561018d57600080fd5b506001600160a01b0381351690602001356104f2565b005b6101a3600480360360208110156101bb57600080fd5b50356001600160a01b031661055c565b6101a36106ee565b6101a36107b5565b61015b610849565b61015b610858565b6101f3610867565b604080519115158252519081900360200190f35b61015b6004803603602081101561021d57600080fd5b50356001600160a01b0316610878565b6101a3600480360360c081101561024357600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561027e57600080fd5b82018360208201111561029057600080fd5b803590602001918460018302840111640100000000831117156102b257600080fd5b9193509150803590602001356108e3565b61015b600480360360208110156102d957600080fd5b50356001600160a01b0316610a1d565b610141600480360360208110156102ff57600080fd5b50356001600160a01b0316610a7a565b6101416004803603602081101561032557600080fd5b50356001600160a01b0316610ae5565b61035b6004803603602081101561034b57600080fd5b50356001600160a01b0316610b50565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561039557818101518382015260200161037d565b50505050905090810190601f1680156103c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a3600480360360208110156103e657600080fd5b50356001600160a01b0316610c48565b6101a36004803603604081101561040c57600080fd5b506001600160a01b038135169060200135610cb4565b61035b610e85565b6000610434610867565b6104765760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b506001600160a01b03166000908152600360208190526040909120015490565b60006104a0610867565b6104e25760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6104ec6004610f10565b90505b90565b6104fa610867565b61053c5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001600160a01b0390911660009081526003602081905260409091200155565b610564610867565b6105a65760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600360208190526040822060018101805482546001600160a01b0319168355908490556002820184905591810183905590916105f46004830182611285565b5050610601600483610f2f565b6005546001600160a01b031663a9059cbb61061a610858565b836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561066a57600080fd5b505af115801561067e573d6000803e3d6000fd5b505050506040513d602081101561069457600080fd5b50516106ea5760408051600160e51b62461bcd02815260206004820152601460248201527f626f6e64207472616e73666572206661696c6564000000000000000000000000604482015290519081900360640190fd5b5050565b6000546001600160a01b031633146107505760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b600080546001546040516001600160a01b039283169392909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600180546001600160a01b03199081166001600160a01b03841617909155169055565b6107bd610867565b6107ff5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6005546001600160a01b031681565b6001546001600160a01b031690565b6001546001600160a01b0316331490565b6000610882610867565b6108c45760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b506001600160a01b039081166000908152600360205260409020541690565b6108eb610867565b61092d5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6109356112cc565b6040518060a00160405280886001600160a01b0316815260200187815260200184815260200183815260200186868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250506001600160a01b038b8116825260036020818152604093849020865181546001600160a01b0319169416939093178355858101516001840155928501516002830155606085015190820155608084015180519495508594919350610a04926004850192910190611304565b50905050610a13600489611011565b5050505050505050565b6000610a27610867565b610a695760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b610a74600483611024565b92915050565b6000610a84610867565b610ac65760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b506001600160a01b031660009081526003602052604090206001015490565b6000610aef610867565b610b315760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b506001600160a01b031660009081526003602052604090206002015490565b6060610b5a610867565b610b9c5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526003602090815260409182902060040180548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015610c3c5780601f10610c1157610100808354040283529160200191610c3c565b820191906000526020600020905b815481529060010190602001808311610c1f57829003601f168201915b50505050509050919050565b610c50610867565b610c925760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b610cbc610867565b610cfe5760408051600160e51b62461bcd02815260206004820152600d602482015260008051602061139d833981519152604482015290519081900360640190fd5b6001600160a01b038216600090815260036020526040902060010154808210610d715760408051600160e51b62461bcd02815260206004820152601260248201527f626f6e64206e6f74206465637265617365640000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0380841660009081526003602052604090206001018390556005541663a9059cbb610da1610858565b610db1848663ffffffff61109916565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610e0057600080fd5b505af1158015610e14573d6000803e3d6000fd5b505050506040513d6020811015610e2a57600080fd5b5051610e805760408051600160e51b62461bcd02815260206004820152601460248201527f626f6e64207472616e73666572206661696c6564000000000000000000000000604482015290519081900360640190fd5b505050565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610f085780601f10610edd57610100808354040283529160200191610f08565b820191906000526020600020905b815481529060010190602001808311610eeb57829003601f168201915b505050505081565b600080805260209190915260409020600101546001600160a01b031690565b610f3982826110f9565b610f7e5760408051600160e51b62461bcd02815260206004820152600b6024820152600160aa1b6a1b9bdd081a5b881b1a5cdd02604482015290519081900360640190fd5b6001600160a01b038116610f91576106ea565b6001600160a01b0390811660008181526020939093526040808420805460018083018054610100938490048816808a52868a209093018054919098166001600160a01b031991821681179098559688529387208054610100600160a81b031916919092021790559190935280546001600160a81b03191690558154169055565b6106ea8261101e84611118565b8361113a565b600061103083836110f9565b6110755760408051600160e51b62461bcd02815260206004820152600b6024820152600160aa1b6a1b9bdd081a5b881b1a5cdd02604482015290519081900360640190fd5b506001600160a01b0390811660009081526020929092526040909120600101541690565b6000828211156110f35760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b03166000908152602091909152604090205460ff1690565b60008080526020829052604090205461010090046001600160a01b0316919050565b61114483826110f9565b156111995760408051600160e51b62461bcd02815260206004820152600f60248201527f616c726561647920696e206c6973740000000000000000000000000000000000604482015290519081900360640190fd5b6111a383836110f9565b806111b557506001600160a01b038216155b6111fa5760408051600160e51b62461bcd02815260206004820152600b6024820152600160aa1b6a1b9bdd081a5b881b1a5cdd02604482015290519081900360640190fd5b6001600160a01b0391821660008181526020949094526040808520600190810180549486168088528388208054610100600160a81b03199081166101009788021782558185018054989099166001600160a01b031998891681179099558354909716821790925595875291862080549094169285029290921790925591909252815460ff1916179055565b50805460018160011615610100020316600290046000825580601f106112ab57506112c9565b601f0160209004906000526020600020908101906112c99190611382565b50565b6040518060a0016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061134557805160ff1916838001178555611372565b82800160010185558215611372579182015b82811115611372578251825591602001919060010190611357565b5061137e929150611382565b5090565b6104ef91905b8082111561137e576000815560010161138856fe6d757374206265206f776e657200000000000000000000000000000000000000a165627a7a72305820d5bef617691f99bdada4e93bc9a6edb17e7e8f6653d52d502663ae530ba02bb60029", + "sourceMap": "368:5752:3:-;;;2200:135;8:9:-1;5:2;;;30:1;27;20:12;5:2;2200:135:3;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2200:135:3;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;;2200:135:3;;;;;528:6:10;:19;;-1:-1:-1;;;;;;528:19:10;537:10;528:19;;;;;2200:135:3;562:40:10;2200:135:3;;-1:-1:-1;2200:135:3;;-1:-1:-1;;;;;;595:6:10;;528;;562:40;;528:6;;562:40;2290:18:3;;;;:7;;:18;;;;;:::i;:::-;-1:-1:-1;2318:3:3;:10;;-1:-1:-1;;;;;;2318:10:3;-1:-1:-1;;;;;2318:10:3;;;;;;;;;;-1:-1:-1;368:5752:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;368:5752:3;;;-1:-1:-1;368:5752:3;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "368:5752:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;368:5752:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5724:161;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5724:161:3;-1:-1:-1;;;;;5724:161:3;;:::i;:::-;;;;;;;;;;;;;;;;3469:109;;;:::i;:::-;;;;-1:-1:-1;;;;;3469:109:3;;;;;;;;;;;;;;4828:178;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4828:178:3;;;;;;;;:::i;:::-;;3942:293;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3942:293:3;-1:-1:-1;;;;;3942:293:3;;:::i;2146:177:10:-;;;:::i;1668:137::-;;;:::i;2002:19:3:-;;;:::i;672:77:10:-;;;:::i;1224:90::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;5067:151:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5067:151:3;-1:-1:-1;;;;;5067:151:3;;:::i;2806:586::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;2806:586:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;2806:586:3;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2806:586:3;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2806:586:3;;-1:-1:-1;2806:586:3;-1:-1:-1;2806:586:3;;;;;;;:::i;3687:137::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3687:137:3;-1:-1:-1;;;;;3687:137:3;;:::i;5278:141::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5278:141:3;-1:-1:-1;;;;;5278:141:3;;:::i;5492:157::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5492:157:3;-1:-1:-1;;;;;5492:157:3;;:::i;5962:156::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5962:156:3;-1:-1:-1;;;;;5962:156:3;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5962:156:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1955:101:10;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1955:101:10;-1:-1:-1;;;;;1955:101:10;;:::i;4366:388:3:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4366:388:3;;;;;;;;:::i;451:21::-;;;:::i;5724:161::-;5809:7;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5835:28:3;;;;;:16;:28;;;;;;;;:43;;;5724:161::o;3469:109::-;3518:7;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;3544:27:3;3561:9;3544:16;:27::i;:::-;3537:34;;913:1:10;3469:109:3;:::o;4828:178::-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;-1:-1:-1;;;;;4939:28:3;;;;;;;:16;:28;;;;;;;;:43;:60;4828:178::o;3942:293::-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;-1:-1:-1;;;;;4030:28:3;;4015:12;4030:28;;;:16;:28;;;;;;;:33;;;;;4073:35;;-1:-1:-1;;;;;;4073:35:3;;;;;;;;;;;;;;;;;;;4030:33;;4073:35;;;;4015:12;4073:35;:::i;:::-;;;4118:40;4136:9;4147:10;4118:17;:40::i;:::-;4176:3;;-1:-1:-1;;;;;4176:3:3;:12;4189:7;:5;:7::i;:::-;4198:4;4176:27;;;;;;;;;;;;;-1:-1:-1;;;;;4176:27:3;-1:-1:-1;;;;;4176:27:3;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4176:27:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4176:27:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4176:27:3;4168:60;;;;;-1:-1:-1;;;;;4168:60:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;913:1:10;3942:293:3;:::o;2146:177:10:-;1081:13;;-1:-1:-1;;;;;1081:13:10;1067:10;:27;1059:61;;;;;-1:-1:-1;;;;;1059:61:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;2238:13;;;;2230:6;2209:43;;-1:-1:-1;;;;;2238:13:10;;;;2230:6;;;;;2209:43;;;2269:13;;;;2260:22;;-1:-1:-1;;;;;;2260:22:10;;;-1:-1:-1;;;;;2269:13:10;;2260:22;;;;2290:26;;;2146:177::o;1668:137::-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;1750:6;;1729:40;;1766:1;;-1:-1:-1;;;;;1750:6:10;;1729:40;;1766:1;;1729:40;1779:6;:19;;-1:-1:-1;;;;;;1779:19:10;;;1668:137::o;2002:19:3:-;;;-1:-1:-1;;;;;2002:19:3;;:::o;672:77:10:-;736:6;;-1:-1:-1;;;;;736:6:10;672:77;:::o;1224:90::-;1301:6;;-1:-1:-1;;;;;1301:6:10;1287:10;:20;;1224:90::o;5067:151:3:-;5143:15;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5177:28:3;;;;;;;:16;:28;;;;;:34;;;5067:151::o;2806:586::-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;3056:24:3;;:::i;:::-;3083:201;;;;;;;;3113:14;-1:-1:-1;;;;;3083:201:3;;;;;3147:5;3083:201;;;;3215:13;3083:201;;;;3258:15;3083:201;;;;3177:10;;3083:201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;-1:-1;3083:201:3;;;;-1:-1:-1;;;;;;;3294:29:3;;;;;:16;:29;;;;;;;;;:40;;;;-1:-1:-1;;;;;;3294:40:3;;;;;;;;;;;;;-1:-1:-1;3294:40:3;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3294:40:3;;:29;;-1:-1:-1;3294:40:3;;;;;;;;;;:::i;:::-;;;;;3344:41;3362:9;3373:11;3344:17;:41::i;:::-;913:1:10;2806:586:3;;;;;;;:::o;3687:137::-;3753:7;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;3779:38:3;3795:9;3806:10;3779:15;:38::i;:::-;3772:45;3687:137;-1:-1:-1;;3687:137:3:o;5278:141::-;5353:7;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5379:28:3;;;;;:16;:28;;;;;:33;;;;5278:141::o;5492:157::-;5575:7;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5601:28:3;;;;;:16;:28;;;;;:41;;;;5492:157::o;5962:156::-;6042:12;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;-1:-1:-1;;;;;6073:28:3;;;;;;:16;:28;;;;;;;;;:38;;6066:45;;;;;;-1:-1:-1;;6066:45:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6073:38;;6066:45;;6073:38;6066:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5962:156;;;:::o;1955:101:10:-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;2025:13;:24;;-1:-1:-1;;;;;;2025:24:10;-1:-1:-1;;;;;2025:24:10;;;;;;;;;;1955:101::o;4366:388:3:-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;868:35:10;;;;;;;;;;;;;;;-1:-1:-1;;;;;4489:28:3;;4466:20;4489:28;;;:16;:28;;;;;:33;;;4540:28;;;4532:59;;;;;-1:-1:-1;;;;;4532:59:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4601:28:3;;;;;;;:16;:28;;;;;:33;;:49;;;4668:3;;;:12;4681:7;:5;:7::i;:::-;4690:31;:12;4707:13;4690:31;:16;:31;:::i;:::-;4668:54;;;;;;;;;;;;;-1:-1:-1;;;;;4668:54:3;-1:-1:-1;;;;;4668:54:3;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4668:54:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4668:54:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4668:54:3;4660:87;;;;;-1:-1:-1;;;;;4660:87:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;913:1:10;4366:388:3;;:::o;451:21::-;;;;;;;;;;;;;;-1:-1:-1;;451:21:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4696:110:13:-;4753:7;4779:15;;;;;;;;;;;:20;;;-1:-1:-1;;;;;4779:20:13;;4696:110::o;2757:514::-;2833:20;2842:4;2848;2833:8;:20::i;:::-;2825:44;;;;;-1:-1:-1;;;;;2825:44:13;;;;;;;;;;;;-1:-1:-1;;;;;2825:44:13;;;;;;;;;;;;;;;-1:-1:-1;;;;;2883:12:13;;2879:49;;2911:7;;2879:49;-1:-1:-1;;;;;2949:15:13;;;2937:9;2949:15;;;;;;;;;;;;:24;;;2995:20;;;;;2949:24;;;;;;;3026:12;;;;;;:17;;;:21;;2995:20;;;;-1:-1:-1;;;;;;3026:21:13;;;;;;;;3057:12;;;;;;:25;;-1:-1:-1;;;;;;3057:25:13;;;;;;;;3202:15;;;;:30;;-1:-1:-1;;;;;;3242:22:13;;;;;;;;2757:514::o;3808:163::-;3930:34;3942:4;3948:9;3952:4;3948:3;:9::i;:::-;3959:4;3930:11;:34::i;5148:177::-;5218:7;5245:20;5254:4;5260;5245:8;:20::i;:::-;5237:44;;;;;-1:-1:-1;;;;;5237:44:13;;;;;;;;;;;;-1:-1:-1;;;;;5237:44:13;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5298:15:13;;;:9;:15;;;;;;;;;;;;:20;;;;;5148:177::o;1274:179:29:-;1332:7;1364:1;1359;:6;;1351:49;;;;;-1:-1:-1;;;;;1351:49:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:29;;;1274:179::o;4334:126:13:-;-1:-1:-1;;;;;4431:15:13;4408:4;4431:15;;;;;;;;;;;:22;;;;4334:126::o;5030:112::-;5085:7;5111:15;;;;;;;;;;:24;;;;-1:-1:-1;;;;;5111:24:13;5030:112;;;:::o;1906:541::-;2007:23;2016:4;2022:7;2007:8;:23::i;:::-;2006:24;1998:52;;;;;-1:-1:-1;;;;;1998:52:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;2068:22;2077:4;2083:6;2068:8;:22::i;:::-;:40;;;-1:-1:-1;;;;;;2094:14:13;;;2068:40;2060:64;;;;;-1:-1:-1;;;;;2060:64:13;;;;;;;;;;;;-1:-1:-1;;;;;2060:64:13;;;;;;;;;;;;;;;-1:-1:-1;;;;;2208:17:13;;;2196:9;2208:17;;;;;;;;;;;;:22;;;;;;2241:18;;;;;;;;;:36;;-1:-1:-1;;;;;;2241:36:13;;;2208:22;2241:36;;;;;;2287:23;;;:27;;2208:22;;;;-1:-1:-1;;;;;;2287:27:13;;;;;;;;2324:32;;;;;;;;;;2366:12;;;;;;:31;;;;;;;;;;;;;;;2408:18;;;;:32;;-1:-1:-1;;2408:32:13;;;;1906:541::o;368:5752:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;-1:-1:-1;;;;;368:5752:3;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;368:5752:3;;;-1:-1:-1;368:5752:3;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;", + "source": "pragma solidity ^0.5.8;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\n\nimport \"../libraries/Claimable.sol\";\nimport \"../libraries/LinkedList.sol\";\nimport \"../RenToken/RenToken.sol\";\n\n/// @notice This contract stores data and funds for the DarknodeRegistry\n/// contract. The data / fund logic and storage have been separated to improve\n/// upgradability.\ncontract DarknodeRegistryStore is Claimable {\n using SafeMath for uint256;\n\n string public VERSION; // Passed in as a constructor parameter.\n\n /// @notice Darknodes are stored in the darknode struct. The owner is the\n /// address that registered the darknode, the bond is the amount of REN that\n /// was transferred during registration, and the public key is the\n /// encryption key that should be used when sending sensitive information to\n /// the darknode.\n struct Darknode {\n // The owner of a Darknode is the address that called the register\n // function. The owner is the only address that is allowed to\n // deregister the Darknode, unless the Darknode is slashed for\n // malicious behavior.\n address payable owner;\n\n // The bond is the amount of REN submitted as a bond by the Darknode.\n // This amount is reduced when the Darknode is slashed for malicious\n // behavior.\n uint256 bond;\n\n // The block number at which the Darknode is considered registered.\n uint256 registeredAt;\n\n // The block number at which the Darknode is considered deregistered.\n uint256 deregisteredAt;\n\n // The public key used by this Darknode for encrypting sensitive data\n // off chain. It is assumed that the Darknode has access to the\n // respective private key, and that there is an agreement on the format\n // of the public key.\n bytes publicKey;\n }\n\n /// Registry data.\n mapping(address => Darknode) private darknodeRegistry;\n LinkedList.List private darknodes;\n\n // RenToken.\n RenToken public ren;\n\n /// @notice The contract constructor.\n ///\n /// @param _VERSION A string defining the contract version.\n /// @param _ren The address of the RenToken contract.\n constructor(\n string memory _VERSION,\n RenToken _ren\n ) public {\n VERSION = _VERSION;\n ren = _ren;\n }\n\n /// @notice Instantiates a darknode and appends it to the darknodes\n /// linked-list.\n ///\n /// @param _darknodeID The darknode's ID.\n /// @param _darknodeOwner The darknode's owner's address\n /// @param _bond The darknode's bond value\n /// @param _publicKey The darknode's public key\n /// @param _registeredAt The time stamp when the darknode is registered.\n /// @param _deregisteredAt The time stamp when the darknode is deregistered.\n function appendDarknode(\n address _darknodeID,\n address payable _darknodeOwner,\n uint256 _bond,\n bytes calldata _publicKey,\n uint256 _registeredAt,\n uint256 _deregisteredAt\n ) external onlyOwner {\n Darknode memory darknode = Darknode({\n owner: _darknodeOwner,\n bond: _bond,\n publicKey: _publicKey,\n registeredAt: _registeredAt,\n deregisteredAt: _deregisteredAt\n });\n darknodeRegistry[_darknodeID] = darknode;\n LinkedList.append(darknodes, _darknodeID);\n }\n\n /// @notice Returns the address of the first darknode in the store\n function begin() external view onlyOwner returns(address) {\n return LinkedList.begin(darknodes);\n }\n\n /// @notice Returns the address of the next darknode in the store after the\n /// given address.\n function next(address darknodeID) external view onlyOwner returns(address) {\n return LinkedList.next(darknodes, darknodeID);\n }\n\n /// @notice Removes a darknode from the store and transfers its bond to the\n /// owner of this contract.\n function removeDarknode(address darknodeID) external onlyOwner {\n uint256 bond = darknodeRegistry[darknodeID].bond;\n delete darknodeRegistry[darknodeID];\n LinkedList.remove(darknodes, darknodeID);\n require(ren.transfer(owner(), bond), \"bond transfer failed\");\n }\n\n /// @notice Updates the bond of a darknode. The new bond must be smaller\n /// than the previous bond of the darknode.\n function updateDarknodeBond(address darknodeID, uint256 decreasedBond) external onlyOwner {\n uint256 previousBond = darknodeRegistry[darknodeID].bond;\n require(decreasedBond < previousBond, \"bond not decreased\");\n darknodeRegistry[darknodeID].bond = decreasedBond;\n require(ren.transfer(owner(), previousBond.sub(decreasedBond)), \"bond transfer failed\");\n }\n\n /// @notice Updates the deregistration timestamp of a darknode.\n function updateDarknodeDeregisteredAt(address darknodeID, uint256 deregisteredAt) external onlyOwner {\n darknodeRegistry[darknodeID].deregisteredAt = deregisteredAt;\n }\n\n /// @notice Returns the owner of a given darknode.\n function darknodeOwner(address darknodeID) external view onlyOwner returns (address payable) {\n return darknodeRegistry[darknodeID].owner;\n }\n\n /// @notice Returns the bond of a given darknode.\n function darknodeBond(address darknodeID) external view onlyOwner returns (uint256) {\n return darknodeRegistry[darknodeID].bond;\n }\n\n /// @notice Returns the registration time of a given darknode.\n function darknodeRegisteredAt(address darknodeID) external view onlyOwner returns (uint256) {\n return darknodeRegistry[darknodeID].registeredAt;\n }\n\n /// @notice Returns the deregistration time of a given darknode.\n function darknodeDeregisteredAt(address darknodeID) external view onlyOwner returns (uint256) {\n return darknodeRegistry[darknodeID].deregisteredAt;\n }\n\n /// @notice Returns the encryption public key of a given darknode.\n function darknodePublicKey(address darknodeID) external view onlyOwner returns (bytes memory) {\n return darknodeRegistry[darknodeID].publicKey;\n }\n}", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol", + "exportedSymbols": { + "DarknodeRegistryStore": [ + 2671 + ] + }, + "id": 2672, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2381, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 2382, + "nodeType": "ImportDirective", + "scope": 2672, + "sourceUnit": 6401, + "src": "25:59:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 2383, + "nodeType": "ImportDirective", + "scope": 2672, + "sourceUnit": 3684, + "src": "86:36:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/LinkedList.sol", + "file": "../libraries/LinkedList.sol", + "id": 2384, + "nodeType": "ImportDirective", + "scope": 2672, + "sourceUnit": 4461, + "src": "123:37:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol", + "file": "../RenToken/RenToken.sol", + "id": 2385, + "nodeType": "ImportDirective", + "scope": 2672, + "sourceUnit": 2797, + "src": "161:34:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2386, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "402:9:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 2387, + "nodeType": "InheritanceSpecifier", + "src": "402:9:3" + } + ], + "contractDependencies": [ + 3683 + ], + "contractKind": "contract", + "documentation": "@notice This contract stores data and funds for the DarknodeRegistry\n contract. The data / fund logic and storage have been separated to improve\n upgradability.", + "fullyImplemented": true, + "id": 2671, + "linearizedBaseContracts": [ + 2671, + 3683 + ], + "name": "DarknodeRegistryStore", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2390, + "libraryName": { + "contractScope": null, + "id": 2388, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6400, + "src": "424:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6400", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "418:27:3", + "typeName": { + "id": 2389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "437:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 2392, + "name": "VERSION", + "nodeType": "VariableDeclaration", + "scope": 2671, + "src": "451:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 2391, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "451:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "DarknodeRegistryStore.Darknode", + "id": 2403, + "members": [ + { + "constant": false, + "id": 2394, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1126:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 2393, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1126:15:3", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2396, + "name": "bond", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1334:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2395, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1334:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2398, + "name": "registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1433:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2397, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1433:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2400, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1542:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1542:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2402, + "name": "publicKey", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1835:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2401, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1835:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Darknode", + "nodeType": "StructDefinition", + "scope": 2671, + "src": "853:1004:3", + "visibility": "public" + }, + { + "constant": false, + "id": 2407, + "name": "darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 2671, + "src": "1886:53:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode)" + }, + "typeName": { + "id": 2406, + "keyType": { + "id": 2404, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1894:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1886:28:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode)" + }, + "valueType": { + "contractScope": null, + "id": 2405, + "name": "Darknode", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2403, + "src": "1905:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage_ptr", + "typeString": "struct DarknodeRegistryStore.Darknode" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2409, + "name": "darknodes", + "nodeType": "VariableDeclaration", + "scope": 2671, + "src": "1945:33:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List" + }, + "typeName": { + "contractScope": null, + "id": 2408, + "name": "LinkedList.List", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4056, + "src": "1945:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage_ptr", + "typeString": "struct LinkedList.List" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2411, + "name": "ren", + "nodeType": "VariableDeclaration", + "scope": 2671, + "src": "2002:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + }, + "typeName": { + "contractScope": null, + "id": 2410, + "name": "RenToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2796, + "src": "2002:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 2426, + "nodeType": "Block", + "src": "2280:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2418, + "name": "VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2392, + "src": "2290:7:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2419, + "name": "_VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2413, + "src": "2300:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2290:18:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 2421, + "nodeType": "ExpressionStatement", + "src": "2290:18:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2422, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2411, + "src": "2318:3:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2423, + "name": "_ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2415, + "src": "2324:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "src": "2318:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 2425, + "nodeType": "ExpressionStatement", + "src": "2318:10:3" + } + ] + }, + "documentation": "@notice The contract constructor.\n\n /// @param _VERSION A string defining the contract version.\n @param _ren The address of the RenToken contract.", + "id": 2427, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2416, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2413, + "name": "_VERSION", + "nodeType": "VariableDeclaration", + "scope": 2427, + "src": "2221:22:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2412, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2221:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2415, + "name": "_ren", + "nodeType": "VariableDeclaration", + "scope": 2427, + "src": "2253:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + }, + "typeName": { + "contractScope": null, + "id": 2414, + "name": "RenToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2796, + "src": "2253:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2211:61:3" + }, + "returnParameters": { + "id": 2417, + "nodeType": "ParameterList", + "parameters": [], + "src": "2280:0:3" + }, + "scope": 2671, + "src": "2200:135:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2467, + "nodeType": "Block", + "src": "3046:346:3", + "statements": [ + { + "assignments": [ + 2445 + ], + "declarations": [ + { + "constant": false, + "id": 2445, + "name": "darknode", + "nodeType": "VariableDeclaration", + "scope": 2467, + "src": "3056:24:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_memory_ptr", + "typeString": "struct DarknodeRegistryStore.Darknode" + }, + "typeName": { + "contractScope": null, + "id": 2444, + "name": "Darknode", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2403, + "src": "3056:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage_ptr", + "typeString": "struct DarknodeRegistryStore.Darknode" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2453, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2447, + "name": "_darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2431, + "src": "3113:14:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2448, + "name": "_bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2433, + "src": "3147:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2449, + "name": "_publicKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2435, + "src": "3177:10:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "argumentTypes": null, + "id": 2450, + "name": "_registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "3215:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2451, + "name": "_deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "3258:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2446, + "name": "Darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2403, + "src": "3083:8:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Darknode_$2403_storage_ptr_$", + "typeString": "type(struct DarknodeRegistryStore.Darknode storage pointer)" + } + }, + "id": 2452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "owner", + "bond", + "publicKey", + "registeredAt", + "deregisteredAt" + ], + "nodeType": "FunctionCall", + "src": "3083:201:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_memory", + "typeString": "struct DarknodeRegistryStore.Darknode memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3056:228:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2454, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "3294:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2456, + "indexExpression": { + "argumentTypes": null, + "id": 2455, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "3311:11:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3294:29:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2457, + "name": "darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2445, + "src": "3326:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_memory_ptr", + "typeString": "struct DarknodeRegistryStore.Darknode memory" + } + }, + "src": "3294:40:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2459, + "nodeType": "ExpressionStatement", + "src": "3294:40:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2463, + "name": "darknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2409, + "src": "3362:9:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + }, + { + "argumentTypes": null, + "id": 2464, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "3373:11:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2460, + "name": "LinkedList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "3344:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LinkedList_$4460_$", + "typeString": "type(library LinkedList)" + } + }, + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "append", + "nodeType": "MemberAccess", + "referencedDeclaration": 4327, + "src": "3344:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_List_$4056_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct LinkedList.List storage pointer,address)" + } + }, + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3344:41:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2466, + "nodeType": "ExpressionStatement", + "src": "3344:41:3" + } + ] + }, + "documentation": "@notice Instantiates a darknode and appends it to the darknodes\n linked-list.\n\n /// @param _darknodeID The darknode's ID.\n @param _darknodeOwner The darknode's owner's address\n @param _bond The darknode's bond value\n @param _publicKey The darknode's public key\n @param _registeredAt The time stamp when the darknode is registered.\n @param _deregisteredAt The time stamp when the darknode is deregistered.", + "id": 2468, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2442, + "modifierName": { + "argumentTypes": null, + "id": 2441, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3036:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3036:9:3" + } + ], + "name": "appendDarknode", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2440, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2429, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2839:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2428, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2839:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2431, + "name": "_darknodeOwner", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2868:30:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 2430, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2868:15:3", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2433, + "name": "_bond", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2908:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2432, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2908:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2435, + "name": "_publicKey", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2931:25:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2434, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2931:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2437, + "name": "_registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2966:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2436, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2966:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2439, + "name": "_deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2997:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2438, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2997:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2829:197:3" + }, + "returnParameters": { + "id": 2443, + "nodeType": "ParameterList", + "parameters": [], + "src": "3046:0:3" + }, + "scope": 2671, + "src": "2806:586:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2480, + "nodeType": "Block", + "src": "3527:51:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2477, + "name": "darknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2409, + "src": "3561:9:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + ], + "expression": { + "argumentTypes": null, + "id": 2475, + "name": "LinkedList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "3544:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LinkedList_$4460_$", + "typeString": "type(library LinkedList)" + } + }, + "id": 2476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "begin", + "nodeType": "MemberAccess", + "referencedDeclaration": 4397, + "src": "3544:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_List_$4056_storage_ptr_$returns$_t_address_$", + "typeString": "function (struct LinkedList.List storage pointer) view returns (address)" + } + }, + "id": 2478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3544:27:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2474, + "id": 2479, + "nodeType": "Return", + "src": "3537:34:3" + } + ] + }, + "documentation": "@notice Returns the address of the first darknode in the store", + "id": 2481, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2471, + "modifierName": { + "argumentTypes": null, + "id": 2470, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3500:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3500:9:3" + } + ], + "name": "begin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2469, + "nodeType": "ParameterList", + "parameters": [], + "src": "3483:2:3" + }, + "returnParameters": { + "id": 2474, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2473, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2481, + "src": "3518:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3518:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3517:9:3" + }, + "scope": 2671, + "src": "3469:109:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2496, + "nodeType": "Block", + "src": "3762:62:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2492, + "name": "darknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2409, + "src": "3795:9:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + }, + { + "argumentTypes": null, + "id": 2493, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2483, + "src": "3806:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2490, + "name": "LinkedList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "3779:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LinkedList_$4460_$", + "typeString": "type(library LinkedList)" + } + }, + "id": 2491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "next", + "nodeType": "MemberAccess", + "referencedDeclaration": 4435, + "src": "3779:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_List_$4056_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct LinkedList.List storage pointer,address) view returns (address)" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3779:38:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2489, + "id": 2495, + "nodeType": "Return", + "src": "3772:45:3" + } + ] + }, + "documentation": "@notice Returns the address of the next darknode in the store after the\n given address.", + "id": 2497, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2486, + "modifierName": { + "argumentTypes": null, + "id": 2485, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3735:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3735:9:3" + } + ], + "name": "next", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2484, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2483, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "3701:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3701:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3700:20:3" + }, + "returnParameters": { + "id": 2489, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2488, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "3753:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3753:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3752:9:3" + }, + "scope": 2671, + "src": "3687:137:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2533, + "nodeType": "Block", + "src": "4005:230:3", + "statements": [ + { + "assignments": [ + 2505 + ], + "declarations": [ + { + "constant": false, + "id": 2505, + "name": "bond", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "4015:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2504, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4015:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2510, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2506, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4030:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2508, + "indexExpression": { + "argumentTypes": null, + "id": 2507, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2499, + "src": "4047:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4030:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2396, + "src": "4030:33:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4015:48:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "4073:35:3", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2511, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4080:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2513, + "indexExpression": { + "argumentTypes": null, + "id": 2512, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2499, + "src": "4097:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4080:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2515, + "nodeType": "ExpressionStatement", + "src": "4073:35:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2519, + "name": "darknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2409, + "src": "4136:9:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + }, + { + "argumentTypes": null, + "id": 2520, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2499, + "src": "4147:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2516, + "name": "LinkedList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "4118:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LinkedList_$4460_$", + "typeString": "type(library LinkedList)" + } + }, + "id": 2518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 4295, + "src": "4118:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_List_$4056_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct LinkedList.List storage pointer,address)" + } + }, + "id": 2521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4118:40:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2522, + "nodeType": "ExpressionStatement", + "src": "4118:40:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2526, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "4189:5:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4189:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2528, + "name": "bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2505, + "src": "4198:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2524, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2411, + "src": "4176:3:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 2525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "4176:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4176:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64207472616e73666572206661696c6564", + "id": 2530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4205:22:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + }, + "value": "bond transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + } + ], + "id": 2523, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4168:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4168:60:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2532, + "nodeType": "ExpressionStatement", + "src": "4168:60:3" + } + ] + }, + "documentation": "@notice Removes a darknode from the store and transfers its bond to the\n owner of this contract.", + "id": 2534, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2502, + "modifierName": { + "argumentTypes": null, + "id": 2501, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3995:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3995:9:3" + } + ], + "name": "removeDarknode", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2499, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2534, + "src": "3966:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2498, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3966:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3965:20:3" + }, + "returnParameters": { + "id": 2503, + "nodeType": "ParameterList", + "parameters": [], + "src": "4005:0:3" + }, + "scope": 2671, + "src": "3942:293:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2577, + "nodeType": "Block", + "src": "4456:298:3", + "statements": [ + { + "assignments": [ + 2544 + ], + "declarations": [ + { + "constant": false, + "id": 2544, + "name": "previousBond", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "4466:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4466:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2549, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2545, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4489:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2547, + "indexExpression": { + "argumentTypes": null, + "id": 2546, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2536, + "src": "4506:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4489:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2548, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2396, + "src": "4489:33:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4466:56:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2551, + "name": "decreasedBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2538, + "src": "4540:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2552, + "name": "previousBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2544, + "src": "4556:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4540:28:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64206e6f7420646563726561736564", + "id": 2554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4570:20:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_97eff1a15f5a3840065d2b2bec91a8c742bf71d5ec50cd74e0f76c8005ceb766", + "typeString": "literal_string \"bond not decreased\"" + }, + "value": "bond not decreased" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_97eff1a15f5a3840065d2b2bec91a8c742bf71d5ec50cd74e0f76c8005ceb766", + "typeString": "literal_string \"bond not decreased\"" + } + ], + "id": 2550, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4532:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4532:59:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2556, + "nodeType": "ExpressionStatement", + "src": "4532:59:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2557, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4601:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2559, + "indexExpression": { + "argumentTypes": null, + "id": 2558, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2536, + "src": "4618:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4601:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2560, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "bond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2396, + "src": "4601:33:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2561, + "name": "decreasedBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2538, + "src": "4637:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4601:49:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2563, + "nodeType": "ExpressionStatement", + "src": "4601:49:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2567, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "4681:5:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4681:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2571, + "name": "decreasedBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2538, + "src": "4707:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2569, + "name": "previousBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2544, + "src": "4690:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "4690:16:3", + "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": 2572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4690:31:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2565, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2411, + "src": "4668:3:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 2566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "4668:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4668:54:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64207472616e73666572206661696c6564", + "id": 2574, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4724:22:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + }, + "value": "bond transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + } + ], + "id": 2564, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4660:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4660:87:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2576, + "nodeType": "ExpressionStatement", + "src": "4660:87:3" + } + ] + }, + "documentation": "@notice Updates the bond of a darknode. The new bond must be smaller\n than the previous bond of the darknode.", + "id": 2578, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2541, + "modifierName": { + "argumentTypes": null, + "id": 2540, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "4446:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4446:9:3" + } + ], + "name": "updateDarknodeBond", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2536, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2578, + "src": "4394:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2535, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4394:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2538, + "name": "decreasedBond", + "nodeType": "VariableDeclaration", + "scope": 2578, + "src": "4414:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4393:43:3" + }, + "returnParameters": { + "id": 2542, + "nodeType": "ParameterList", + "parameters": [], + "src": "4456:0:3" + }, + "scope": 2671, + "src": "4366:388:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2594, + "nodeType": "Block", + "src": "4929:77:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2587, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4939:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2589, + "indexExpression": { + "argumentTypes": null, + "id": 2588, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "4956:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4939:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2590, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2400, + "src": "4939:43:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2591, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "4985:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4939:60:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2593, + "nodeType": "ExpressionStatement", + "src": "4939:60:3" + } + ] + }, + "documentation": "@notice Updates the deregistration timestamp of a darknode.", + "id": 2595, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2585, + "modifierName": { + "argumentTypes": null, + "id": 2584, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "4919:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4919:9:3" + } + ], + "name": "updateDarknodeDeregisteredAt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2583, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2580, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2595, + "src": "4866:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2579, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4866:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2582, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2595, + "src": "4886:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4886:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4865:44:3" + }, + "returnParameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [], + "src": "4929:0:3" + }, + "scope": 2671, + "src": "4828:178:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2609, + "nodeType": "Block", + "src": "5160:58:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2604, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "5177:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2606, + "indexExpression": { + "argumentTypes": null, + "id": 2605, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2597, + "src": "5194:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5177:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2607, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2394, + "src": "5177:34:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 2603, + "id": 2608, + "nodeType": "Return", + "src": "5170:41:3" + } + ] + }, + "documentation": "@notice Returns the owner of a given darknode.", + "id": 2610, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2600, + "modifierName": { + "argumentTypes": null, + "id": 2599, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5124:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5124:9:3" + } + ], + "name": "darknodeOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2597, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2610, + "src": "5090:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2596, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5090:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5089:20:3" + }, + "returnParameters": { + "id": 2603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2602, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2610, + "src": "5143:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 2601, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5143:15:3", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5142:17:3" + }, + "scope": 2671, + "src": "5067:151:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2624, + "nodeType": "Block", + "src": "5362:57:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2619, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "5379:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2621, + "indexExpression": { + "argumentTypes": null, + "id": 2620, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "5396:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5379:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2622, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2396, + "src": "5379:33:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2618, + "id": 2623, + "nodeType": "Return", + "src": "5372:40:3" + } + ] + }, + "documentation": "@notice Returns the bond of a given darknode.", + "id": 2625, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2615, + "modifierName": { + "argumentTypes": null, + "id": 2614, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5334:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5334:9:3" + } + ], + "name": "darknodeBond", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2613, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2612, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2625, + "src": "5300:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2611, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5300:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5299:20:3" + }, + "returnParameters": { + "id": 2618, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2617, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2625, + "src": "5353:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2616, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5353:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5352:9:3" + }, + "scope": 2671, + "src": "5278:141:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2639, + "nodeType": "Block", + "src": "5584:65:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2634, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "5601:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2636, + "indexExpression": { + "argumentTypes": null, + "id": 2635, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2627, + "src": "5618:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5601:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2637, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "registeredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2398, + "src": "5601:41:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2633, + "id": 2638, + "nodeType": "Return", + "src": "5594:48:3" + } + ] + }, + "documentation": "@notice Returns the registration time of a given darknode.", + "id": 2640, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2630, + "modifierName": { + "argumentTypes": null, + "id": 2629, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5556:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5556:9:3" + } + ], + "name": "darknodeRegisteredAt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2627, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2640, + "src": "5522:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2626, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5522:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5521:20:3" + }, + "returnParameters": { + "id": 2633, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2632, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2640, + "src": "5575:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2631, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5575:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5574:9:3" + }, + "scope": 2671, + "src": "5492:157:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2654, + "nodeType": "Block", + "src": "5818:67:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2649, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "5835:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2651, + "indexExpression": { + "argumentTypes": null, + "id": 2650, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2642, + "src": "5852:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5835:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2652, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2400, + "src": "5835:43:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2648, + "id": 2653, + "nodeType": "Return", + "src": "5828:50:3" + } + ] + }, + "documentation": "@notice Returns the deregistration time of a given darknode.", + "id": 2655, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2645, + "modifierName": { + "argumentTypes": null, + "id": 2644, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5790:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5790:9:3" + } + ], + "name": "darknodeDeregisteredAt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2643, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2642, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2655, + "src": "5756:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2641, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5756:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5755:20:3" + }, + "returnParameters": { + "id": 2648, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2647, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2655, + "src": "5809:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2646, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5809:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5808:9:3" + }, + "scope": 2671, + "src": "5724:161:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2669, + "nodeType": "Block", + "src": "6056:62:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2664, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "6073:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2666, + "indexExpression": { + "argumentTypes": null, + "id": 2665, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2657, + "src": "6090:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6073:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2667, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "publicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 2402, + "src": "6073:38:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "functionReturnParameters": 2663, + "id": 2668, + "nodeType": "Return", + "src": "6066:45:3" + } + ] + }, + "documentation": "@notice Returns the encryption public key of a given darknode.", + "id": 2670, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2660, + "modifierName": { + "argumentTypes": null, + "id": 2659, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "6023:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6023:9:3" + } + ], + "name": "darknodePublicKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2658, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2657, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2670, + "src": "5989:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2656, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5989:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5988:20:3" + }, + "returnParameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2662, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2670, + "src": "6042:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2661, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6042:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6041:14:3" + }, + "scope": 2671, + "src": "5962:156:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 2672, + "src": "368:5752:3" + } + ], + "src": "0:6120:3" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol", + "exportedSymbols": { + "DarknodeRegistryStore": [ + 2671 + ] + }, + "id": 2672, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2381, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 2382, + "nodeType": "ImportDirective", + "scope": 2672, + "sourceUnit": 6401, + "src": "25:59:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 2383, + "nodeType": "ImportDirective", + "scope": 2672, + "sourceUnit": 3684, + "src": "86:36:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/LinkedList.sol", + "file": "../libraries/LinkedList.sol", + "id": 2384, + "nodeType": "ImportDirective", + "scope": 2672, + "sourceUnit": 4461, + "src": "123:37:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol", + "file": "../RenToken/RenToken.sol", + "id": 2385, + "nodeType": "ImportDirective", + "scope": 2672, + "sourceUnit": 2797, + "src": "161:34:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2386, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "402:9:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 2387, + "nodeType": "InheritanceSpecifier", + "src": "402:9:3" + } + ], + "contractDependencies": [ + 3683 + ], + "contractKind": "contract", + "documentation": "@notice This contract stores data and funds for the DarknodeRegistry\n contract. The data / fund logic and storage have been separated to improve\n upgradability.", + "fullyImplemented": true, + "id": 2671, + "linearizedBaseContracts": [ + 2671, + 3683 + ], + "name": "DarknodeRegistryStore", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2390, + "libraryName": { + "contractScope": null, + "id": 2388, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6400, + "src": "424:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6400", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "418:27:3", + "typeName": { + "id": 2389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "437:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 2392, + "name": "VERSION", + "nodeType": "VariableDeclaration", + "scope": 2671, + "src": "451:21:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 2391, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "451:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "DarknodeRegistryStore.Darknode", + "id": 2403, + "members": [ + { + "constant": false, + "id": 2394, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1126:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 2393, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1126:15:3", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2396, + "name": "bond", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1334:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2395, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1334:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2398, + "name": "registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1433:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2397, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1433:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2400, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1542:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1542:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2402, + "name": "publicKey", + "nodeType": "VariableDeclaration", + "scope": 2403, + "src": "1835:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2401, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1835:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Darknode", + "nodeType": "StructDefinition", + "scope": 2671, + "src": "853:1004:3", + "visibility": "public" + }, + { + "constant": false, + "id": 2407, + "name": "darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 2671, + "src": "1886:53:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode)" + }, + "typeName": { + "id": 2406, + "keyType": { + "id": 2404, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1894:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1886:28:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode)" + }, + "valueType": { + "contractScope": null, + "id": 2405, + "name": "Darknode", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2403, + "src": "1905:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage_ptr", + "typeString": "struct DarknodeRegistryStore.Darknode" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2409, + "name": "darknodes", + "nodeType": "VariableDeclaration", + "scope": 2671, + "src": "1945:33:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List" + }, + "typeName": { + "contractScope": null, + "id": 2408, + "name": "LinkedList.List", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4056, + "src": "1945:15:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage_ptr", + "typeString": "struct LinkedList.List" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2411, + "name": "ren", + "nodeType": "VariableDeclaration", + "scope": 2671, + "src": "2002:19:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + }, + "typeName": { + "contractScope": null, + "id": 2410, + "name": "RenToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2796, + "src": "2002:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 2426, + "nodeType": "Block", + "src": "2280:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2418, + "name": "VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2392, + "src": "2290:7:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2419, + "name": "_VERSION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2413, + "src": "2300:8:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2290:18:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 2421, + "nodeType": "ExpressionStatement", + "src": "2290:18:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2422, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2411, + "src": "2318:3:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2423, + "name": "_ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2415, + "src": "2324:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "src": "2318:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 2425, + "nodeType": "ExpressionStatement", + "src": "2318:10:3" + } + ] + }, + "documentation": "@notice The contract constructor.\n\n /// @param _VERSION A string defining the contract version.\n @param _ren The address of the RenToken contract.", + "id": 2427, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2416, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2413, + "name": "_VERSION", + "nodeType": "VariableDeclaration", + "scope": 2427, + "src": "2221:22:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2412, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2221:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2415, + "name": "_ren", + "nodeType": "VariableDeclaration", + "scope": 2427, + "src": "2253:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + }, + "typeName": { + "contractScope": null, + "id": 2414, + "name": "RenToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2796, + "src": "2253:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2211:61:3" + }, + "returnParameters": { + "id": 2417, + "nodeType": "ParameterList", + "parameters": [], + "src": "2280:0:3" + }, + "scope": 2671, + "src": "2200:135:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2467, + "nodeType": "Block", + "src": "3046:346:3", + "statements": [ + { + "assignments": [ + 2445 + ], + "declarations": [ + { + "constant": false, + "id": 2445, + "name": "darknode", + "nodeType": "VariableDeclaration", + "scope": 2467, + "src": "3056:24:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_memory_ptr", + "typeString": "struct DarknodeRegistryStore.Darknode" + }, + "typeName": { + "contractScope": null, + "id": 2444, + "name": "Darknode", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2403, + "src": "3056:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage_ptr", + "typeString": "struct DarknodeRegistryStore.Darknode" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2453, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2447, + "name": "_darknodeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2431, + "src": "3113:14:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2448, + "name": "_bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2433, + "src": "3147:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2449, + "name": "_publicKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2435, + "src": "3177:10:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "argumentTypes": null, + "id": 2450, + "name": "_registeredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "3215:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2451, + "name": "_deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "3258:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2446, + "name": "Darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2403, + "src": "3083:8:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Darknode_$2403_storage_ptr_$", + "typeString": "type(struct DarknodeRegistryStore.Darknode storage pointer)" + } + }, + "id": 2452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "owner", + "bond", + "publicKey", + "registeredAt", + "deregisteredAt" + ], + "nodeType": "FunctionCall", + "src": "3083:201:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_memory", + "typeString": "struct DarknodeRegistryStore.Darknode memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3056:228:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2454, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "3294:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2456, + "indexExpression": { + "argumentTypes": null, + "id": 2455, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "3311:11:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3294:29:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2457, + "name": "darknode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2445, + "src": "3326:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_memory_ptr", + "typeString": "struct DarknodeRegistryStore.Darknode memory" + } + }, + "src": "3294:40:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2459, + "nodeType": "ExpressionStatement", + "src": "3294:40:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2463, + "name": "darknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2409, + "src": "3362:9:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + }, + { + "argumentTypes": null, + "id": 2464, + "name": "_darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "3373:11:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2460, + "name": "LinkedList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "3344:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LinkedList_$4460_$", + "typeString": "type(library LinkedList)" + } + }, + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "append", + "nodeType": "MemberAccess", + "referencedDeclaration": 4327, + "src": "3344:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_List_$4056_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct LinkedList.List storage pointer,address)" + } + }, + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3344:41:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2466, + "nodeType": "ExpressionStatement", + "src": "3344:41:3" + } + ] + }, + "documentation": "@notice Instantiates a darknode and appends it to the darknodes\n linked-list.\n\n /// @param _darknodeID The darknode's ID.\n @param _darknodeOwner The darknode's owner's address\n @param _bond The darknode's bond value\n @param _publicKey The darknode's public key\n @param _registeredAt The time stamp when the darknode is registered.\n @param _deregisteredAt The time stamp when the darknode is deregistered.", + "id": 2468, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2442, + "modifierName": { + "argumentTypes": null, + "id": 2441, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3036:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3036:9:3" + } + ], + "name": "appendDarknode", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2440, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2429, + "name": "_darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2839:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2428, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2839:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2431, + "name": "_darknodeOwner", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2868:30:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 2430, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2868:15:3", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2433, + "name": "_bond", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2908:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2432, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2908:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2435, + "name": "_publicKey", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2931:25:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2434, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2931:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2437, + "name": "_registeredAt", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2966:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2436, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2966:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2439, + "name": "_deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "2997:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2438, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2997:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2829:197:3" + }, + "returnParameters": { + "id": 2443, + "nodeType": "ParameterList", + "parameters": [], + "src": "3046:0:3" + }, + "scope": 2671, + "src": "2806:586:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2480, + "nodeType": "Block", + "src": "3527:51:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2477, + "name": "darknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2409, + "src": "3561:9:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + ], + "expression": { + "argumentTypes": null, + "id": 2475, + "name": "LinkedList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "3544:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LinkedList_$4460_$", + "typeString": "type(library LinkedList)" + } + }, + "id": 2476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "begin", + "nodeType": "MemberAccess", + "referencedDeclaration": 4397, + "src": "3544:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_List_$4056_storage_ptr_$returns$_t_address_$", + "typeString": "function (struct LinkedList.List storage pointer) view returns (address)" + } + }, + "id": 2478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3544:27:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2474, + "id": 2479, + "nodeType": "Return", + "src": "3537:34:3" + } + ] + }, + "documentation": "@notice Returns the address of the first darknode in the store", + "id": 2481, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2471, + "modifierName": { + "argumentTypes": null, + "id": 2470, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3500:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3500:9:3" + } + ], + "name": "begin", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2469, + "nodeType": "ParameterList", + "parameters": [], + "src": "3483:2:3" + }, + "returnParameters": { + "id": 2474, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2473, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2481, + "src": "3518:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3518:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3517:9:3" + }, + "scope": 2671, + "src": "3469:109:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2496, + "nodeType": "Block", + "src": "3762:62:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2492, + "name": "darknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2409, + "src": "3795:9:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + }, + { + "argumentTypes": null, + "id": 2493, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2483, + "src": "3806:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2490, + "name": "LinkedList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "3779:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LinkedList_$4460_$", + "typeString": "type(library LinkedList)" + } + }, + "id": 2491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "next", + "nodeType": "MemberAccess", + "referencedDeclaration": 4435, + "src": "3779:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_List_$4056_storage_ptr_$_t_address_$returns$_t_address_$", + "typeString": "function (struct LinkedList.List storage pointer,address) view returns (address)" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3779:38:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2489, + "id": 2495, + "nodeType": "Return", + "src": "3772:45:3" + } + ] + }, + "documentation": "@notice Returns the address of the next darknode in the store after the\n given address.", + "id": 2497, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2486, + "modifierName": { + "argumentTypes": null, + "id": 2485, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3735:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3735:9:3" + } + ], + "name": "next", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2484, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2483, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "3701:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3701:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3700:20:3" + }, + "returnParameters": { + "id": 2489, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2488, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "3753:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3753:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3752:9:3" + }, + "scope": 2671, + "src": "3687:137:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2533, + "nodeType": "Block", + "src": "4005:230:3", + "statements": [ + { + "assignments": [ + 2505 + ], + "declarations": [ + { + "constant": false, + "id": 2505, + "name": "bond", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "4015:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2504, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4015:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2510, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2506, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4030:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2508, + "indexExpression": { + "argumentTypes": null, + "id": 2507, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2499, + "src": "4047:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4030:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2396, + "src": "4030:33:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4015:48:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "4073:35:3", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2511, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4080:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2513, + "indexExpression": { + "argumentTypes": null, + "id": 2512, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2499, + "src": "4097:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4080:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2515, + "nodeType": "ExpressionStatement", + "src": "4073:35:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2519, + "name": "darknodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2409, + "src": "4136:9:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + } + }, + { + "argumentTypes": null, + "id": 2520, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2499, + "src": "4147:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_List_$4056_storage", + "typeString": "struct LinkedList.List storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2516, + "name": "LinkedList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "4118:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LinkedList_$4460_$", + "typeString": "type(library LinkedList)" + } + }, + "id": 2518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 4295, + "src": "4118:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_List_$4056_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct LinkedList.List storage pointer,address)" + } + }, + "id": 2521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4118:40:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2522, + "nodeType": "ExpressionStatement", + "src": "4118:40:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2526, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "4189:5:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4189:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2528, + "name": "bond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2505, + "src": "4198:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2524, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2411, + "src": "4176:3:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 2525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "4176:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4176:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64207472616e73666572206661696c6564", + "id": 2530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4205:22:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + }, + "value": "bond transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + } + ], + "id": 2523, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4168:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4168:60:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2532, + "nodeType": "ExpressionStatement", + "src": "4168:60:3" + } + ] + }, + "documentation": "@notice Removes a darknode from the store and transfers its bond to the\n owner of this contract.", + "id": 2534, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2502, + "modifierName": { + "argumentTypes": null, + "id": 2501, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "3995:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3995:9:3" + } + ], + "name": "removeDarknode", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2499, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2534, + "src": "3966:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2498, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3966:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3965:20:3" + }, + "returnParameters": { + "id": 2503, + "nodeType": "ParameterList", + "parameters": [], + "src": "4005:0:3" + }, + "scope": 2671, + "src": "3942:293:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2577, + "nodeType": "Block", + "src": "4456:298:3", + "statements": [ + { + "assignments": [ + 2544 + ], + "declarations": [ + { + "constant": false, + "id": 2544, + "name": "previousBond", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "4466:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4466:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2549, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2545, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4489:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2547, + "indexExpression": { + "argumentTypes": null, + "id": 2546, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2536, + "src": "4506:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4489:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2548, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2396, + "src": "4489:33:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4466:56:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2551, + "name": "decreasedBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2538, + "src": "4540:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2552, + "name": "previousBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2544, + "src": "4556:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4540:28:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64206e6f7420646563726561736564", + "id": 2554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4570:20:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_97eff1a15f5a3840065d2b2bec91a8c742bf71d5ec50cd74e0f76c8005ceb766", + "typeString": "literal_string \"bond not decreased\"" + }, + "value": "bond not decreased" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_97eff1a15f5a3840065d2b2bec91a8c742bf71d5ec50cd74e0f76c8005ceb766", + "typeString": "literal_string \"bond not decreased\"" + } + ], + "id": 2550, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4532:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4532:59:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2556, + "nodeType": "ExpressionStatement", + "src": "4532:59:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2557, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4601:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2559, + "indexExpression": { + "argumentTypes": null, + "id": 2558, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2536, + "src": "4618:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4601:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2560, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "bond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2396, + "src": "4601:33:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2561, + "name": "decreasedBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2538, + "src": "4637:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4601:49:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2563, + "nodeType": "ExpressionStatement", + "src": "4601:49:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2567, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "4681:5:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4681:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2571, + "name": "decreasedBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2538, + "src": "4707:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2569, + "name": "previousBond", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2544, + "src": "4690:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6319, + "src": "4690:16:3", + "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": 2572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4690:31:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2565, + "name": "ren", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2411, + "src": "4668:3:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RenToken_$2796", + "typeString": "contract RenToken" + } + }, + "id": 2566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7023, + "src": "4668:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4668:54:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "626f6e64207472616e73666572206661696c6564", + "id": 2574, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4724:22:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + }, + "value": "bond transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5cc04940ac6d40db26d0534ed979bd6744dc0f16532d0fa6ea6933afd295512d", + "typeString": "literal_string \"bond transfer failed\"" + } + ], + "id": 2564, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4660:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4660:87:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2576, + "nodeType": "ExpressionStatement", + "src": "4660:87:3" + } + ] + }, + "documentation": "@notice Updates the bond of a darknode. The new bond must be smaller\n than the previous bond of the darknode.", + "id": 2578, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2541, + "modifierName": { + "argumentTypes": null, + "id": 2540, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "4446:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4446:9:3" + } + ], + "name": "updateDarknodeBond", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2536, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2578, + "src": "4394:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2535, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4394:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2538, + "name": "decreasedBond", + "nodeType": "VariableDeclaration", + "scope": 2578, + "src": "4414:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4414:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4393:43:3" + }, + "returnParameters": { + "id": 2542, + "nodeType": "ParameterList", + "parameters": [], + "src": "4456:0:3" + }, + "scope": 2671, + "src": "4366:388:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2594, + "nodeType": "Block", + "src": "4929:77:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2587, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "4939:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2589, + "indexExpression": { + "argumentTypes": null, + "id": 2588, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "4956:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4939:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2590, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2400, + "src": "4939:43:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2591, + "name": "deregisteredAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "4985:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4939:60:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2593, + "nodeType": "ExpressionStatement", + "src": "4939:60:3" + } + ] + }, + "documentation": "@notice Updates the deregistration timestamp of a darknode.", + "id": 2595, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2585, + "modifierName": { + "argumentTypes": null, + "id": 2584, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "4919:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4919:9:3" + } + ], + "name": "updateDarknodeDeregisteredAt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2583, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2580, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2595, + "src": "4866:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2579, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4866:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2582, + "name": "deregisteredAt", + "nodeType": "VariableDeclaration", + "scope": 2595, + "src": "4886:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4886:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4865:44:3" + }, + "returnParameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [], + "src": "4929:0:3" + }, + "scope": 2671, + "src": "4828:178:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2609, + "nodeType": "Block", + "src": "5160:58:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2604, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "5177:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2606, + "indexExpression": { + "argumentTypes": null, + "id": 2605, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2597, + "src": "5194:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5177:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2607, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 2394, + "src": "5177:34:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 2603, + "id": 2608, + "nodeType": "Return", + "src": "5170:41:3" + } + ] + }, + "documentation": "@notice Returns the owner of a given darknode.", + "id": 2610, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2600, + "modifierName": { + "argumentTypes": null, + "id": 2599, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5124:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5124:9:3" + } + ], + "name": "darknodeOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2597, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2610, + "src": "5090:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2596, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5090:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5089:20:3" + }, + "returnParameters": { + "id": 2603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2602, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2610, + "src": "5143:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 2601, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5143:15:3", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5142:17:3" + }, + "scope": 2671, + "src": "5067:151:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2624, + "nodeType": "Block", + "src": "5362:57:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2619, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "5379:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2621, + "indexExpression": { + "argumentTypes": null, + "id": 2620, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "5396:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5379:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2622, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bond", + "nodeType": "MemberAccess", + "referencedDeclaration": 2396, + "src": "5379:33:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2618, + "id": 2623, + "nodeType": "Return", + "src": "5372:40:3" + } + ] + }, + "documentation": "@notice Returns the bond of a given darknode.", + "id": 2625, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2615, + "modifierName": { + "argumentTypes": null, + "id": 2614, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5334:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5334:9:3" + } + ], + "name": "darknodeBond", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2613, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2612, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2625, + "src": "5300:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2611, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5300:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5299:20:3" + }, + "returnParameters": { + "id": 2618, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2617, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2625, + "src": "5353:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2616, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5353:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5352:9:3" + }, + "scope": 2671, + "src": "5278:141:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2639, + "nodeType": "Block", + "src": "5584:65:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2634, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "5601:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2636, + "indexExpression": { + "argumentTypes": null, + "id": 2635, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2627, + "src": "5618:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5601:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2637, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "registeredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2398, + "src": "5601:41:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2633, + "id": 2638, + "nodeType": "Return", + "src": "5594:48:3" + } + ] + }, + "documentation": "@notice Returns the registration time of a given darknode.", + "id": 2640, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2630, + "modifierName": { + "argumentTypes": null, + "id": 2629, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5556:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5556:9:3" + } + ], + "name": "darknodeRegisteredAt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2627, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2640, + "src": "5522:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2626, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5522:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5521:20:3" + }, + "returnParameters": { + "id": 2633, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2632, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2640, + "src": "5575:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2631, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5575:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5574:9:3" + }, + "scope": 2671, + "src": "5492:157:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2654, + "nodeType": "Block", + "src": "5818:67:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2649, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "5835:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2651, + "indexExpression": { + "argumentTypes": null, + "id": 2650, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2642, + "src": "5852:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5835:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2652, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deregisteredAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 2400, + "src": "5835:43:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2648, + "id": 2653, + "nodeType": "Return", + "src": "5828:50:3" + } + ] + }, + "documentation": "@notice Returns the deregistration time of a given darknode.", + "id": 2655, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2645, + "modifierName": { + "argumentTypes": null, + "id": 2644, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "5790:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5790:9:3" + } + ], + "name": "darknodeDeregisteredAt", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2643, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2642, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2655, + "src": "5756:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2641, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5756:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5755:20:3" + }, + "returnParameters": { + "id": 2648, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2647, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2655, + "src": "5809:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2646, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5809:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5808:9:3" + }, + "scope": 2671, + "src": "5724:161:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2669, + "nodeType": "Block", + "src": "6056:62:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2664, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2407, + "src": "6073:16:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Darknode_$2403_storage_$", + "typeString": "mapping(address => struct DarknodeRegistryStore.Darknode storage ref)" + } + }, + "id": 2666, + "indexExpression": { + "argumentTypes": null, + "id": 2665, + "name": "darknodeID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2657, + "src": "6090:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6073:28:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Darknode_$2403_storage", + "typeString": "struct DarknodeRegistryStore.Darknode storage ref" + } + }, + "id": 2667, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "publicKey", + "nodeType": "MemberAccess", + "referencedDeclaration": 2402, + "src": "6073:38:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage", + "typeString": "bytes storage ref" + } + }, + "functionReturnParameters": 2663, + "id": 2668, + "nodeType": "Return", + "src": "6066:45:3" + } + ] + }, + "documentation": "@notice Returns the encryption public key of a given darknode.", + "id": 2670, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2660, + "modifierName": { + "argumentTypes": null, + "id": 2659, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "6023:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6023:9:3" + } + ], + "name": "darknodePublicKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2658, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2657, + "name": "darknodeID", + "nodeType": "VariableDeclaration", + "scope": 2670, + "src": "5989:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2656, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5989:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5988:20:3" + }, + "returnParameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2662, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2670, + "src": "6042:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2661, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6042:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6041:14:3" + }, + "scope": 2671, + "src": "5962:156:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 2672, + "src": "368:5752:3" + } + ], + "src": "0:6120:3" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + } + }, + "links": {}, + "address": "0xC126a308dd07Adfa4a445686dcF7CbC423185593", + "transactionHash": "0x945806bfcc662d62370147e5882e1fc173a811acf336c926d58c24c76d6df893" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:19:33.398Z", + "devdoc": { + "methods": { + "appendDarknode(address,address,uint256,bytes,uint256,uint256)": { + "params": { + "_bond": "The darknode's bond value", + "_darknodeID": "The darknode's ID.", + "_darknodeOwner": "The darknode's owner's address", + "_deregisteredAt": "The time stamp when the darknode is deregistered.", + "_publicKey": "The darknode's public key", + "_registeredAt": "The time stamp when the darknode is registered." + } + }, + "claimOwnership()": { + "details": "Allows the pendingOwner address to finalize the transfer." + }, + "constructor": { + "params": { + "_VERSION": "A string defining the contract version.", + "_ren": "The address of the RenToken contract." + } + }, + "isOwner()": { + "return": "true if `msg.sender` is the owner of the contract." + }, + "owner()": { + "return": "the address of the owner." + }, + "renounceOwnership()": { + "details": "Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore." + }, + "transferOwnership(address)": { + "details": "Allows the current owner to set the pendingOwner address.", + "params": { + "newOwner": "The address to transfer ownership to." + } + } + } + }, + "userdoc": { + "methods": { + "appendDarknode(address,address,uint256,bytes,uint256,uint256)": { + "notice": "Instantiates a darknode and appends it to the darknodes linked-list. " + }, + "begin()": { + "notice": "Returns the address of the first darknode in the store" + }, + "constructor": "The contract constructor. ", + "darknodeBond(address)": { + "notice": "Returns the bond of a given darknode." + }, + "darknodeDeregisteredAt(address)": { + "notice": "Returns the deregistration time of a given darknode." + }, + "darknodeOwner(address)": { + "notice": "Returns the owner of a given darknode." + }, + "darknodePublicKey(address)": { + "notice": "Returns the encryption public key of a given darknode." + }, + "darknodeRegisteredAt(address)": { + "notice": "Returns the registration time of a given darknode." + }, + "next(address)": { + "notice": "Returns the address of the next darknode in the store after the given address." + }, + "removeDarknode(address)": { + "notice": "Removes a darknode from the store and transfers its bond to the owner of this contract." + }, + "renounceOwnership()": { + "notice": "Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "updateDarknodeBond(address,uint256)": { + "notice": "Updates the bond of a darknode. The new bond must be smaller than the previous bond of the darknode." + }, + "updateDarknodeDeregisteredAt(address,uint256)": { + "notice": "Updates the deregistration timestamp of a darknode." + } + }, + "notice": "This contract stores data and funds for the DarknodeRegistry contract. The data / fund logic and storage have been separated to improve upgradability." + } +} \ No newline at end of file diff --git a/build/devnet/DarknodeSlasher.json b/build/devnet/DarknodeSlasher.json new file mode 100644 index 00000000..8bcca74d --- /dev/null +++ b/build/devnet/DarknodeSlasher.json @@ -0,0 +1,1100 @@ +{ + "contractName": "DarknodeSlasher", + "abi": [ + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "darknodeRegistry", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_darknodeRegistry", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_prover", + "type": "address" + }, + { + "name": "_challenger1", + "type": "address" + }, + { + "name": "_challenger2", + "type": "address" + } + ], + "name": "slash", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"_prover\",\"type\":\"address\"},{\"name\":\"_challenger1\",\"type\":\"address\"},{\"name\":\"_challenger2\",\"type\":\"address\"}],\"name\":\"slash\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"darknodeRegistry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_darknodeRegistry\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{},\"notice\":\"DarknodeSlasher will become a voting system for darknodes to deregister other misbehaving darknodes. Right now, it is a placeholder.\"}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol\":\"DarknodeSlasher\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol\":{\"keccak256\":\"0xe2c22dc48cac917fa2890d5a6b6ed0e86ecf273c0d2762bdf490347012145480\",\"urls\":[\"bzzr://5cf4705abd3d66528c43d1e47f9d56e3e0e35403196762e50d15905bbb539527\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistryStore.sol\":{\"keccak256\":\"0x423b0630cad633c8385e457c0762a8d4b2a5028ee2e89af3f112d5f2d3a04022\",\"urls\":[\"bzzr://de7a014c67223932f191f05238df1a37fa3d325dad943787b3506f072af8e444\"]},\"/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol\":{\"keccak256\":\"0x815e7571a0fd9b61f8f8bf693e7891ab78bbf36b20781012ac64c12f56ef36c5\",\"urls\":[\"bzzr://8e02714dc3b3bf491d533506859802a0756b444ba1b06b6ff64184a723f8697b\"]},\"/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol\":{\"keccak256\":\"0x574c593875a7afc210e709573a4d46d6ad6ea60d348ade04692149aae68a85da\",\"urls\":[\"bzzr://6216d6c45babda33bf82905fd7384368d9529b6e572f435c2a217bd7634467e9\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/LinkedList.sol\":{\"keccak256\":\"0x318273ca74f037e14739675b74e3538fa6d08ff412869f1931aacd351d35bdcc\",\"urls\":[\"bzzr://2174bf7bb80a3ed2d366ac0041168e2478c5b0a65b9a8aeaf99a0058e3021f53\"]},\"openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb\",\"urls\":[\"bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad\"]},\"openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0xf6826c684d51ca28db5293ce11a54c5cca1c757b6cd32b87613833c65086f995\",\"urls\":[\"bzzr://01b2756ab5b41b1d7ccadfeac53fbdce9c889263f1e011329c300c5fa3fda65f\"]},\"openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x609f8cb524cd6b502624c79c099ec2fc6f23eef57b5c38e28efd82490875f37e\",\"urls\":[\"bzzr://46ee461a64298ef418bd100df1301355f4dc9ffeb06fe7a39aaf98d45c0bf988\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xf79fb10e8235770eb4aea7249034076a3cc9f9119ad944fc48705bae9c9d20dc\",\"urls\":[\"bzzr://d12a11272051eb6586de8f7e0a82c04a98c9984ce8b2a6cf1ee439f65aba29a9\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa5ebf3344a36eb60e723e0764d85251c496e15e4b2d737b56415502b559a1765\",\"urls\":[\"bzzr://68812cb0a1d373d12c6986f5a9314c9bae7891a07a0e301d2317fcf409102f54\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0xc4973487824e5855e78e27d685b387566df52ea4b0854ba60b8703b533de47d4\",\"urls\":[\"bzzr://299d2f2c37a1b0cc8b15927fc516cc7f8a8f48e246512b3b3880bd3e4f0220d4\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516020806104cd8339810180604052602081101561003057600080fd5b5051600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600180546001600160a01b0319166001600160a01b0392909216919091179055610423806100aa6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063563bf26414610067578063715018a6146100a15780638da5cb5b146100a95780638f32d59b146100cd5780639e45e0d0146100e9578063f2fde38b146100f1575b600080fd5b61009f6004803603606081101561007d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610117565b005b61009f6101f1565b6100b1610297565b604080516001600160a01b039092168252519081900360200190f35b6100d56102a6565b604080519115158252519081900360200190f35b6100b16102b7565b61009f6004803603602081101561010757600080fd5b50356001600160a01b03166102c6565b61011f6102a6565b6101735760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60015460408051600160e21b63158efc990281526001600160a01b038681166004830152858116602483015284811660448301529151919092169163563bf26491606480830192600092919082900301818387803b1580156101d457600080fd5b505af11580156101e8573d6000803e3d6000fd5b50505050505050565b6101f96102a6565b61024d5760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6001546001600160a01b031681565b6102ce6102a6565b6103225760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61032b8161032e565b50565b6001600160a01b03811661037657604051600160e51b62461bcd0281526004018080602001828103825260268152602001806103d26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a165627a7a723058204aefefa769849f51f8d791090aacf819590ec9cf990cb2d1aa74faa6fe74c0e80029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063563bf26414610067578063715018a6146100a15780638da5cb5b146100a95780638f32d59b146100cd5780639e45e0d0146100e9578063f2fde38b146100f1575b600080fd5b61009f6004803603606081101561007d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610117565b005b61009f6101f1565b6100b1610297565b604080516001600160a01b039092168252519081900360200190f35b6100d56102a6565b604080519115158252519081900360200190f35b6100b16102b7565b61009f6004803603602081101561010757600080fd5b50356001600160a01b03166102c6565b61011f6102a6565b6101735760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60015460408051600160e21b63158efc990281526001600160a01b038681166004830152858116602483015284811660448301529151919092169163563bf26491606480830192600092919082900301818387803b1580156101d457600080fd5b505af11580156101e8573d6000803e3d6000fd5b50505050505050565b6101f96102a6565b61024d5760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6001546001600160a01b031681565b6102ce6102a6565b6103225760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61032b8161032e565b50565b6001600160a01b03811661037657604051600160e51b62461bcd0281526004018080602001828103825260268152602001806103d26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a165627a7a723058204aefefa769849f51f8d791090aacf819590ec9cf990cb2d1aa74faa6fe74c0e80029", + "sourceMap": "295:397:4:-;;;385:108;8:9:-1;5:2;;;30:1;27;20:12;5:2;385:108:4;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;385:108:4;657:6:30;:19;;-1:-1:-1;;;;;;657:19:30;666:10;657:19;;;;691:40;;-1:-1:-1;;;;;724:6:30;;;;;657;691:40;;657:6;;691:40;450:16:4;:36;;-1:-1:-1;;;;;;450:36:4;-1:-1:-1;;;;;450:36:4;;;;;;;;;;295:397;;;-1:-1:-1;295:397:4;;", + "deployedSourceMap": "295:397:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;295:397:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;499:191;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;499:191:4;;;;;;;;;;;;;;;;;;;:::i;:::-;;1599:137:30;;;:::i;814:77::-;;;:::i;:::-;;;;-1:-1:-1;;;;;814:77:30;;;;;;;;;;;;;;1165:90;;;:::i;:::-;;;;;;;;;;;;;;;;;;338:40:4;;;:::i;1885:107:30:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1885:107:30;-1:-1:-1;;;;;1885:107:30;;:::i;499:191:4:-;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;624:16:4;;:59;;;-1:-1:-1;;;;;624:59:4;;-1:-1:-1;;;;;624:59:4;;;;;;;;;;;;;;;;;;;;;;;:16;;;;;:22;;:59;;;;;:16;;:59;;;;;;;:16;;:59;;;5:2:-1;;;;30:1;27;20:12;5:2;624:59:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;624:59:4;;;;499:191;;;:::o;1599:137:30:-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1697:1;1681:6;;1660:40;;-1:-1:-1;;;;;1681:6:30;;;;1660:40;;1697:1;;1660:40;1727:1;1710:19;;-1:-1:-1;;;;;;1710:19:30;;;1599:137::o;814:77::-;852:7;878:6;-1:-1:-1;;;;;878:6:30;814:77;:::o;1165:90::-;1205:4;1242:6;-1:-1:-1;;;;;1242:6:30;1228:10;:20;;1165:90::o;338:40:4:-;;;-1:-1:-1;;;;;338:40:4;;:::o;1885:107:30:-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1957:28;1976:8;1957:18;:28::i;:::-;1885:107;:::o;2093:225::-;-1:-1:-1;;;;;2166:22:30;;2158:73;;;;-1:-1:-1;;;;;2158:73:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2267:6;;;2246:38;;-1:-1:-1;;;;;2246:38:30;;;;2267:6;;;2246:38;;;2294:6;:17;;-1:-1:-1;;;;;;2294:17:30;-1:-1:-1;;;;;2294:17:30;;;;;;;;;;2093:225::o", + "source": "pragma solidity ^0.5.8;\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\n\nimport \"../DarknodeRegistry/DarknodeRegistry.sol\";\n\n/// @notice DarknodeSlasher will become a voting system for darknodes to\n/// deregister other misbehaving darknodes.\n/// Right now, it is a placeholder.\ncontract DarknodeSlasher is Ownable {\n\n DarknodeRegistry public darknodeRegistry;\n\n constructor(DarknodeRegistry _darknodeRegistry) public {\n darknodeRegistry = _darknodeRegistry;\n }\n\n function slash(address _prover, address _challenger1, address _challenger2)\n external\n onlyOwner\n {\n darknodeRegistry.slash(_prover, _challenger1, _challenger2);\n }\n}\n", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol", + "exportedSymbols": { + "DarknodeSlasher": [ + 2710 + ] + }, + "id": 2711, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2673, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 2674, + "nodeType": "ImportDirective", + "scope": 2711, + "sourceUnit": 6512, + "src": "25:63:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol", + "file": "../DarknodeRegistry/DarknodeRegistry.sol", + "id": 2675, + "nodeType": "ImportDirective", + "scope": 2711, + "sourceUnit": 2380, + "src": "90:50:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2676, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6511, + "src": "323:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$6511", + "typeString": "contract Ownable" + } + }, + "id": 2677, + "nodeType": "InheritanceSpecifier", + "src": "323:7:4" + } + ], + "contractDependencies": [ + 6511 + ], + "contractKind": "contract", + "documentation": "@notice DarknodeSlasher will become a voting system for darknodes to\n deregister other misbehaving darknodes.\n Right now, it is a placeholder.", + "fullyImplemented": true, + "id": 2710, + "linearizedBaseContracts": [ + 2710, + 6511 + ], + "name": "DarknodeSlasher", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2679, + "name": "darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "338:40:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2678, + "name": "DarknodeRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2379, + "src": "338:16:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 2688, + "nodeType": "Block", + "src": "440:53:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2684, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "450:16:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2685, + "name": "_darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "469:17:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "src": "450:36:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 2687, + "nodeType": "ExpressionStatement", + "src": "450:36:4" + } + ] + }, + "documentation": null, + "id": 2689, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2681, + "name": "_darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 2689, + "src": "397:34:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2680, + "name": "DarknodeRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2379, + "src": "397:16:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "396:36:4" + }, + "returnParameters": { + "id": 2683, + "nodeType": "ParameterList", + "parameters": [], + "src": "440:0:4" + }, + "scope": 2710, + "src": "385:108:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2708, + "nodeType": "Block", + "src": "614:76:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2703, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2691, + "src": "647:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2704, + "name": "_challenger1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2693, + "src": "656:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2705, + "name": "_challenger2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2695, + "src": "670:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2700, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "624:16:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 2702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "slash", + "nodeType": "MemberAccess", + "referencedDeclaration": 1867, + "src": "624:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address,address) external" + } + }, + "id": 2706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "624:59:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2707, + "nodeType": "ExpressionStatement", + "src": "624:59:4" + } + ] + }, + "documentation": null, + "id": 2709, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2698, + "modifierName": { + "argumentTypes": null, + "id": 2697, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "600:9:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "600:9:4" + } + ], + "name": "slash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2691, + "name": "_prover", + "nodeType": "VariableDeclaration", + "scope": 2709, + "src": "514:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "514:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2693, + "name": "_challenger1", + "nodeType": "VariableDeclaration", + "scope": 2709, + "src": "531:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2692, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "531:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2695, + "name": "_challenger2", + "nodeType": "VariableDeclaration", + "scope": 2709, + "src": "553:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "553:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "513:61:4" + }, + "returnParameters": { + "id": 2699, + "nodeType": "ParameterList", + "parameters": [], + "src": "614:0:4" + }, + "scope": 2710, + "src": "499:191:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 2711, + "src": "295:397:4" + } + ], + "src": "0:693:4" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeSlasher/DarknodeSlasher.sol", + "exportedSymbols": { + "DarknodeSlasher": [ + 2710 + ] + }, + "id": 2711, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2673, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 2674, + "nodeType": "ImportDirective", + "scope": 2711, + "sourceUnit": 6512, + "src": "25:63:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/DarknodeRegistry/DarknodeRegistry.sol", + "file": "../DarknodeRegistry/DarknodeRegistry.sol", + "id": 2675, + "nodeType": "ImportDirective", + "scope": 2711, + "sourceUnit": 2380, + "src": "90:50:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2676, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6511, + "src": "323:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$6511", + "typeString": "contract Ownable" + } + }, + "id": 2677, + "nodeType": "InheritanceSpecifier", + "src": "323:7:4" + } + ], + "contractDependencies": [ + 6511 + ], + "contractKind": "contract", + "documentation": "@notice DarknodeSlasher will become a voting system for darknodes to\n deregister other misbehaving darknodes.\n Right now, it is a placeholder.", + "fullyImplemented": true, + "id": 2710, + "linearizedBaseContracts": [ + 2710, + 6511 + ], + "name": "DarknodeSlasher", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2679, + "name": "darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "338:40:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2678, + "name": "DarknodeRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2379, + "src": "338:16:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 2688, + "nodeType": "Block", + "src": "440:53:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2684, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "450:16:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2685, + "name": "_darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "469:17:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "src": "450:36:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 2687, + "nodeType": "ExpressionStatement", + "src": "450:36:4" + } + ] + }, + "documentation": null, + "id": 2689, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2681, + "name": "_darknodeRegistry", + "nodeType": "VariableDeclaration", + "scope": 2689, + "src": "397:34:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2680, + "name": "DarknodeRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2379, + "src": "397:16:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "396:36:4" + }, + "returnParameters": { + "id": 2683, + "nodeType": "ParameterList", + "parameters": [], + "src": "440:0:4" + }, + "scope": 2710, + "src": "385:108:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2708, + "nodeType": "Block", + "src": "614:76:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2703, + "name": "_prover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2691, + "src": "647:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2704, + "name": "_challenger1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2693, + "src": "656:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2705, + "name": "_challenger2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2695, + "src": "670:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2700, + "name": "darknodeRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "624:16:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DarknodeRegistry_$2379", + "typeString": "contract DarknodeRegistry" + } + }, + "id": 2702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "slash", + "nodeType": "MemberAccess", + "referencedDeclaration": 1867, + "src": "624:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address,address) external" + } + }, + "id": 2706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "624:59:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2707, + "nodeType": "ExpressionStatement", + "src": "624:59:4" + } + ] + }, + "documentation": null, + "id": 2709, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2698, + "modifierName": { + "argumentTypes": null, + "id": 2697, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "600:9:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "600:9:4" + } + ], + "name": "slash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2691, + "name": "_prover", + "nodeType": "VariableDeclaration", + "scope": 2709, + "src": "514:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "514:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2693, + "name": "_challenger1", + "nodeType": "VariableDeclaration", + "scope": 2709, + "src": "531:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2692, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "531:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2695, + "name": "_challenger2", + "nodeType": "VariableDeclaration", + "scope": 2709, + "src": "553:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "553:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "513:61:4" + }, + "returnParameters": { + "id": 2699, + "nodeType": "ParameterList", + "parameters": [], + "src": "614:0:4" + }, + "scope": 2710, + "src": "499:191:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 2711, + "src": "295:397:4" + } + ], + "src": "0:693:4" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + } + }, + "links": {}, + "address": "0xfe48363206E1849a2F53f5214af932354c35FD89", + "transactionHash": "0xaddc7d765412c1add1827e3c5b6c59a25106bf08a26a643e7a2ba5ea4eb04c21" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:19:33.434Z", + "devdoc": { + "methods": { + "isOwner()": { + "details": "Returns true if the caller is the current owner." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + } + }, + "userdoc": { + "methods": {}, + "notice": "DarknodeSlasher will become a voting system for darknodes to deregister other misbehaving darknodes. Right now, it is a placeholder." + } +} \ No newline at end of file diff --git a/build/devnet/RenToken.json b/build/devnet/RenToken.json new file mode 100644 index 00000000..70f64075 --- /dev/null +++ b/build/devnet/RenToken.json @@ -0,0 +1,2869 @@ +{ + "contractName": "RenToken", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INITIAL_SUPPLY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "unpause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isPauser", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "paused", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renouncePauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addPauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "beneficiary", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferTokens", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INITIAL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isPauser\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renouncePauser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addPauser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"beneficiary\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PauserAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PauserRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See `IERC20.allowance`.\"},\"balanceOf(address)\":{\"details\":\"See `IERC20.balanceOf`.\"},\"burn(uint256)\":{\"details\":\"Destoys `amount` tokens from the caller. * See `ERC20._burn`.\"},\"burnFrom(address,uint256)\":{\"details\":\"See `ERC20._burnFrom`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. * > Note that this information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including `IERC20.balanceOf` and `IERC20.transfer`.\"},\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"details\":\"Called by a pauser to pause, triggers stopped state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See `IERC20.totalSupply`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"details\":\"Called by a pauser to unpause, returns to normal state.\"}}},\"userdoc\":{\"methods\":{\"constructor\":\"The RenToken Constructor.\"}}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol\":\"RenToken\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol\":{\"keccak256\":\"0x574c593875a7afc210e709573a4d46d6ad6ea60d348ade04692149aae68a85da\",\"urls\":[\"bzzr://6216d6c45babda33bf82905fd7384368d9529b6e572f435c2a217bd7634467e9\"]},\"openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb\",\"urls\":[\"bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad\"]},\"openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0xf6826c684d51ca28db5293ce11a54c5cca1c757b6cd32b87613833c65086f995\",\"urls\":[\"bzzr://01b2756ab5b41b1d7ccadfeac53fbdce9c889263f1e011329c300c5fa3fda65f\"]},\"openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x609f8cb524cd6b502624c79c099ec2fc6f23eef57b5c38e28efd82490875f37e\",\"urls\":[\"bzzr://46ee461a64298ef418bd100df1301355f4dc9ffeb06fe7a39aaf98d45c0bf988\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xf79fb10e8235770eb4aea7249034076a3cc9f9119ad944fc48705bae9c9d20dc\",\"urls\":[\"bzzr://d12a11272051eb6586de8f7e0a82c04a98c9984ce8b2a6cf1ee439f65aba29a9\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa5ebf3344a36eb60e723e0764d85251c496e15e4b2d737b56415502b559a1765\",\"urls\":[\"bzzr://68812cb0a1d373d12c6986f5a9314c9bae7891a07a0e301d2317fcf409102f54\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0xc4973487824e5855e78e27d685b387566df52ea4b0854ba60b8703b533de47d4\",\"urls\":[\"bzzr://299d2f2c37a1b0cc8b15927fc516cc7f8a8f48e246512b3b3880bd3e4f0220d4\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604080518082018252600e81527f52657075626c696320546f6b656e00000000000000000000000000000000000060208083019190915282518084018452600381527f52454e000000000000000000000000000000000000000000000000000000000091810191909152600080546001600160a01b03191633178082559351929391926012926001600160a01b031691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38251620000dd90600190602086019062000460565b508151620000f390600290602085019062000460565b506003805460ff191660ff92909216919091179055506200011d9050336200014c602090811b901c565b6008805460ff1916905562000146336b033b2e3c9fd0803ce80000006200019e602090811b901c565b62000505565b62000167816007620002bd60201b620013531790919060201c565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6001600160a01b0382166200021457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b62000230816006546200036160201b6200128c1790919060201c565b6006556001600160a01b038216600090815260046020908152604090912054620002659183906200128c62000361821b17901c565b6001600160a01b03831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b620002cf8282620003dd60201b60201c565b156200033c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b600082820183811015620003d657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006001600160a01b03821662000440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018062001a606022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004a357805160ff1916838001178555620004d3565b82800160010185558215620004d3579182015b82811115620004d3578251825591602001919060010190620004b6565b50620004e1929150620004e5565b5090565b6200050291905b80821115620004e15760008155600101620004ec565b90565b61154b80620005156000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806370a08231116100de5780638f32d59b11610097578063a9059cbb11610071578063a9059cbb1461041c578063bec3fa1714610448578063dd62ed3e14610474578063f2fde38b146104a257610173565b80638f32d59b146103e057806395d89b41146103e8578063a457c2d7146103f057610173565b806370a0823114610334578063715018a61461035a57806379cc67901461036257806382dc1ec41461038e5780638456cb59146103b45780638da5cb5b146103bc57610173565b8063395093511161013057806339509351146102ab5780633f4ba83a146102d757806342966c68146102e157806346fbf68e146102fe5780635c975abb146103245780636ef8d66d1461032c57610173565b806306fdde0314610178578063095ea7b3146101f557806318160ddd1461023557806323b872dd1461024f5780632ff2e9dc14610285578063313ce5671461028d575b600080fd5b6101806104c8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102216004803603604081101561020b57600080fd5b506001600160a01b03813516906020013561055d565b604080519115158252519081900360200190f35b61023d6105c2565b60408051918252519081900360200190f35b6102216004803603606081101561026557600080fd5b506001600160a01b038135811691602081013590911690604001356105c8565b61023d61062f565b61029561063f565b6040805160ff9092168252519081900360200190f35b610221600480360360408110156102c157600080fd5b506001600160a01b038135169060200135610648565b6102df6106a6565b005b6102df600480360360208110156102f757600080fd5b5035610786565b6102216004803603602081101561031457600080fd5b50356001600160a01b0316610793565b6102216107ac565b6102df6107b5565b61023d6004803603602081101561034a57600080fd5b50356001600160a01b03166107c0565b6102df6107db565b6102df6004803603604081101561037857600080fd5b506001600160a01b038135169060200135610881565b6102df600480360360208110156103a457600080fd5b50356001600160a01b031661088f565b6102df6108df565b6103c46109b9565b604080516001600160a01b039092168252519081900360200190f35b6102216109c8565b6101806109d9565b6102216004803603604081101561040657600080fd5b506001600160a01b038135169060200135610a37565b6102216004803603604081101561043257600080fd5b506001600160a01b038135169060200135610a95565b6102216004803603604081101561045e57600080fd5b506001600160a01b038135169060200135610af3565b61023d6004803603604081101561048a57600080fd5b506001600160a01b0381358116916020013516610bb2565b6102df600480360360208110156104b857600080fd5b50356001600160a01b0316610bdd565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105535780601f1061052857610100808354040283529160200191610553565b820191906000526020600020905b81548152906001019060200180831161053657829003601f168201915b5050505050905090565b60085460009060ff16156105b15760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6105bb8383610c42565b9392505050565b60065490565b60085460009060ff161561061c5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b610627848484610c58565b949350505050565b6b033b2e3c9fd0803ce800000081565b60035460ff1690565b60085460009060ff161561069c5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6105bb8383610caf565b6106af33610793565b6106ed57604051600160e51b62461bcd0281526004018080602001828103825260308152602001806113fb6030913960400191505060405180910390fd5b60085460ff166107475760408051600160e51b62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6008805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b6107903382610ceb565b50565b60006107a660078363ffffffff610dc916565b92915050565b60085460ff1690565b6107be33610e33565b565b6001600160a01b031660009081526004602052604090205490565b6107e36109c8565b6108375760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b61088b8282610e7b565b5050565b61089833610793565b6108d657604051600160e51b62461bcd0281526004018080602001828103825260308152602001806113fb6030913960400191505060405180910390fd5b61079081610ec0565b6108e833610793565b61092657604051600160e51b62461bcd0281526004018080602001828103825260308152602001806113fb6030913960400191505060405180910390fd5b60085460ff16156109775760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6008805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156105535780601f1061052857610100808354040283529160200191610553565b60085460009060ff1615610a8b5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6105bb8383610f08565b60085460009060ff1615610ae95760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6105bb8383610f44565b6000610afd6109c8565b610b515760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008211610b5e57600080fd5b610b69338484610f4d565b6040805183815290516001600160a01b0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b610be56109c8565b610c395760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61079081611097565b6000610c4f33848461113a565b50600192915050565b6000610c65848484610f4d565b6001600160a01b038416600090815260056020908152604080832033808552925290912054610ca5918691610ca0908663ffffffff61122c16565b61113a565b5060019392505050565b3360008181526005602090815260408083206001600160a01b03871684529091528120549091610c4f918590610ca0908663ffffffff61128c16565b6001600160a01b038216610d3357604051600160e51b62461bcd0281526004018080602001828103825260218152602001806114b66021913960400191505060405180910390fd5b600654610d46908263ffffffff61122c16565b6006556001600160a01b038216600090815260046020526040902054610d72908263ffffffff61122c16565b6001600160a01b0383166000818152600460209081526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b60006001600160a01b038216610e1357604051600160e51b62461bcd0281526004018080602001828103825260228152602001806114946022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b610e4460078263ffffffff6112e916565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b610e858282610ceb565b6001600160a01b03821660009081526005602090815260408083203380855292529091205461088b918491610ca0908563ffffffff61122c16565b610ed160078263ffffffff61135316565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b3360008181526005602090815260408083206001600160a01b03871684529091528120549091610c4f918590610ca0908663ffffffff61122c16565b6000610c4f3384845b6001600160a01b038316610f9557604051600160e51b62461bcd0281526004018080602001828103825260258152602001806114d76025913960400191505060405180910390fd5b6001600160a01b038216610fdd57604051600160e51b62461bcd0281526004018080602001828103825260238152602001806113d86023913960400191505060405180910390fd5b6001600160a01b038316600090815260046020526040902054611006908263ffffffff61122c16565b6001600160a01b03808516600090815260046020526040808220939093559084168152205461103b908263ffffffff61128c16565b6001600160a01b0380841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6001600160a01b0381166110df57604051600160e51b62461bcd02815260040180806020018281038252602681526020018061142b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661118257604051600160e51b62461bcd0281526004018080602001828103825260248152602001806114fc6024913960400191505060405180910390fd5b6001600160a01b0382166111ca57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806114516022913960400191505060405180910390fd5b6001600160a01b03808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6000828211156112865760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156105bb5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6112f38282610dc9565b61133157604051600160e51b62461bcd0281526004018080602001828103825260218152602001806114736021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b61135d8282610dc9565b156113b25760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff1916600117905556fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a72305820715382a57d16cd2d1255e6b4305cc3f37811602a240b798963b059cd77f3899b0029526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c806370a08231116100de5780638f32d59b11610097578063a9059cbb11610071578063a9059cbb1461041c578063bec3fa1714610448578063dd62ed3e14610474578063f2fde38b146104a257610173565b80638f32d59b146103e057806395d89b41146103e8578063a457c2d7146103f057610173565b806370a0823114610334578063715018a61461035a57806379cc67901461036257806382dc1ec41461038e5780638456cb59146103b45780638da5cb5b146103bc57610173565b8063395093511161013057806339509351146102ab5780633f4ba83a146102d757806342966c68146102e157806346fbf68e146102fe5780635c975abb146103245780636ef8d66d1461032c57610173565b806306fdde0314610178578063095ea7b3146101f557806318160ddd1461023557806323b872dd1461024f5780632ff2e9dc14610285578063313ce5671461028d575b600080fd5b6101806104c8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102216004803603604081101561020b57600080fd5b506001600160a01b03813516906020013561055d565b604080519115158252519081900360200190f35b61023d6105c2565b60408051918252519081900360200190f35b6102216004803603606081101561026557600080fd5b506001600160a01b038135811691602081013590911690604001356105c8565b61023d61062f565b61029561063f565b6040805160ff9092168252519081900360200190f35b610221600480360360408110156102c157600080fd5b506001600160a01b038135169060200135610648565b6102df6106a6565b005b6102df600480360360208110156102f757600080fd5b5035610786565b6102216004803603602081101561031457600080fd5b50356001600160a01b0316610793565b6102216107ac565b6102df6107b5565b61023d6004803603602081101561034a57600080fd5b50356001600160a01b03166107c0565b6102df6107db565b6102df6004803603604081101561037857600080fd5b506001600160a01b038135169060200135610881565b6102df600480360360208110156103a457600080fd5b50356001600160a01b031661088f565b6102df6108df565b6103c46109b9565b604080516001600160a01b039092168252519081900360200190f35b6102216109c8565b6101806109d9565b6102216004803603604081101561040657600080fd5b506001600160a01b038135169060200135610a37565b6102216004803603604081101561043257600080fd5b506001600160a01b038135169060200135610a95565b6102216004803603604081101561045e57600080fd5b506001600160a01b038135169060200135610af3565b61023d6004803603604081101561048a57600080fd5b506001600160a01b0381358116916020013516610bb2565b6102df600480360360208110156104b857600080fd5b50356001600160a01b0316610bdd565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105535780601f1061052857610100808354040283529160200191610553565b820191906000526020600020905b81548152906001019060200180831161053657829003601f168201915b5050505050905090565b60085460009060ff16156105b15760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6105bb8383610c42565b9392505050565b60065490565b60085460009060ff161561061c5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b610627848484610c58565b949350505050565b6b033b2e3c9fd0803ce800000081565b60035460ff1690565b60085460009060ff161561069c5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6105bb8383610caf565b6106af33610793565b6106ed57604051600160e51b62461bcd0281526004018080602001828103825260308152602001806113fb6030913960400191505060405180910390fd5b60085460ff166107475760408051600160e51b62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6008805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b6107903382610ceb565b50565b60006107a660078363ffffffff610dc916565b92915050565b60085460ff1690565b6107be33610e33565b565b6001600160a01b031660009081526004602052604090205490565b6107e36109c8565b6108375760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b61088b8282610e7b565b5050565b61089833610793565b6108d657604051600160e51b62461bcd0281526004018080602001828103825260308152602001806113fb6030913960400191505060405180910390fd5b61079081610ec0565b6108e833610793565b61092657604051600160e51b62461bcd0281526004018080602001828103825260308152602001806113fb6030913960400191505060405180910390fd5b60085460ff16156109775760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6008805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156105535780601f1061052857610100808354040283529160200191610553565b60085460009060ff1615610a8b5760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6105bb8383610f08565b60085460009060ff1615610ae95760408051600160e51b62461bcd0281526020600482015260106024820152600160821b6f14185d5cd8589b194e881c185d5cd95902604482015290519081900360640190fd5b6105bb8383610f44565b6000610afd6109c8565b610b515760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008211610b5e57600080fd5b610b69338484610f4d565b6040805183815290516001600160a01b0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b610be56109c8565b610c395760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61079081611097565b6000610c4f33848461113a565b50600192915050565b6000610c65848484610f4d565b6001600160a01b038416600090815260056020908152604080832033808552925290912054610ca5918691610ca0908663ffffffff61122c16565b61113a565b5060019392505050565b3360008181526005602090815260408083206001600160a01b03871684529091528120549091610c4f918590610ca0908663ffffffff61128c16565b6001600160a01b038216610d3357604051600160e51b62461bcd0281526004018080602001828103825260218152602001806114b66021913960400191505060405180910390fd5b600654610d46908263ffffffff61122c16565b6006556001600160a01b038216600090815260046020526040902054610d72908263ffffffff61122c16565b6001600160a01b0383166000818152600460209081526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b60006001600160a01b038216610e1357604051600160e51b62461bcd0281526004018080602001828103825260228152602001806114946022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b610e4460078263ffffffff6112e916565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b610e858282610ceb565b6001600160a01b03821660009081526005602090815260408083203380855292529091205461088b918491610ca0908563ffffffff61122c16565b610ed160078263ffffffff61135316565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b3360008181526005602090815260408083206001600160a01b03871684529091528120549091610c4f918590610ca0908663ffffffff61122c16565b6000610c4f3384845b6001600160a01b038316610f9557604051600160e51b62461bcd0281526004018080602001828103825260258152602001806114d76025913960400191505060405180910390fd5b6001600160a01b038216610fdd57604051600160e51b62461bcd0281526004018080602001828103825260238152602001806113d86023913960400191505060405180910390fd5b6001600160a01b038316600090815260046020526040902054611006908263ffffffff61122c16565b6001600160a01b03808516600090815260046020526040808220939093559084168152205461103b908263ffffffff61128c16565b6001600160a01b0380841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6001600160a01b0381166110df57604051600160e51b62461bcd02815260040180806020018281038252602681526020018061142b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661118257604051600160e51b62461bcd0281526004018080602001828103825260248152602001806114fc6024913960400191505060405180910390fd5b6001600160a01b0382166111ca57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806114516022913960400191505060405180910390fd5b6001600160a01b03808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6000828211156112865760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156105bb5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6112f38282610dc9565b61133157604051600160e51b62461bcd0281526004018080602001828103825260218152602001806114736021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b61135d8282610dc9565b156113b25760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff1916600117905556fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a72305820715382a57d16cd2d1255e6b4305cc3f37811602a240b798963b059cd77f3899b0029", + "sourceMap": "306:872:5:-;;;655:144;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;715:5:5;;;;;;;;;;;;;;;;;;;;722:7;;;;;;;;;;;;;;;;;;-1:-1:-1;657:19:30;;-1:-1:-1;;;;;;657:19:30;666:10;657:19;;;;691:40;;715:5:5;;722:7;;521:2;;-1:-1:-1;;;;;724:6:30;;-1:-1:-1;691:40:30;;-1:-1:-1;;691:40:30;504:12:33;;;;:5;;:12;;;;;:::i;:::-;-1:-1:-1;526:16:33;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;552:9:33;:20;;-1:-1:-1;;552:20:33;;;;;;;;;;;;-1:-1:-1;275:22:26;;-1:-1:-1;286:10:26;275;;;;;:22;;:::i;:::-;975:7:27;:15;;-1:-1:-1;;975:15:27;;;759:33:5;765:10;571:35;759:5;;;;;:33;;:::i;:::-;306:872;;737:119:26;793:21;806:7;793:8;:12;;;;;;:21;;;;:::i;:::-;829:20;;-1:-1:-1;;;;;829:20:26;;;;;;;;737:119;:::o;5771:302:31:-;-1:-1:-1;;;;;5846:21:31;;5838:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5929:24;5946:6;5929:12;;:16;;;;;;:24;;;;:::i;:::-;5914:12;:39;-1:-1:-1;;;;;5984:18:31;;;;;;:9;:18;;;;;;;;;:30;;6007:6;;5984:22;;;;;:30;;:::i;:::-;-1:-1:-1;;;;;5963:18:31;;;;;;:9;:18;;;;;;;;:51;;;;6029:37;;;;;;;5963:18;;;;6029:37;;;;;;;;;;5771:302;;:::o;260:175:25:-;337:18;341:4;347:7;337:3;;;:18;;:::i;:::-;336:19;328:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;401:20:25;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;401:27:25;424:4;401:27;;;260:175::o;834:176:29:-;892:7;923:5;;;946:6;;;;938:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:29:o;779:200:25:-;851:4;-1:-1:-1;;;;;875:21:25;;867:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;952:20:25;:11;:20;;;;;;;;;;;;;;;779:200::o;306:872:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;306:872:5;;;-1:-1:-1;306:872:5;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "306:872:5:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;306:872:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;644:81:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;644:81:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;516:138:34;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;516:138:34;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1514:89:31;;;:::i;:::-;;;;;;;;;;;;;;;;352:158:34;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;352:158:34;;;;;;;;;;;;;;;;;:::i;530:76:5:-;;;:::i;1478:81:33:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;660:165:34;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;660:165:34;;;;;;;;:::i;1852:115:27:-;;;:::i;:::-;;397:79:32;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;397:79:32;;:::i;447:107:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;447:107:26;-1:-1:-1;;;;;447:107:26;;:::i;1092:76:27:-;;;:::i;656:75:26:-;;;:::i;1661:108:31:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1661:108:31;-1:-1:-1;;;;;1661:108:31;;:::i;1599:137:30:-;;;:::i;533:101:32:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;533:101:32;;;;;;;;:::i;560:90:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;560:90:26;-1:-1:-1;;;;;560:90:26;;:::i;1649:113:27:-;;;:::i;814:77:30:-;;;:::i;:::-;;;;-1:-1:-1;;;;;814:77:30;;;;;;;;;;;;;;1165:90;;;:::i;838:85:33:-;;;:::i;831:175:34:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;831:175:34;;;;;;;;:::i;216:130::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;216:130:34;;;;;;;;:::i;805:371:5:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;805:371:5;;;;;;;;:::i;2183:132:31:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2183:132:31;;;;;;;;;;:::i;1885:107:30:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1885:107:30;-1:-1:-1;;;;;1885:107:30;;:::i;644:81:33:-;713:5;706:12;;;;;;;;-1:-1:-1;;706:12:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;681:13;;706:12;;713:5;;706:12;;713:5;706:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;644:81;:::o;516:138:34:-;1321:7:27;;595:4:34;;1321:7:27;;1320:8;1312:37;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;;;;618:29:34;632:7;641:5;618:13;:29::i;:::-;611:36;516:138;-1:-1:-1;;;516:138:34:o;1514:89:31:-;1584:12;;1514:89;:::o;352:158:34:-;1321:7:27;;445:4:34;;1321:7:27;;1320:8;1312:37;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;;;;468:35:34;487:4;493:2;497:5;468:18;:35::i;:::-;461:42;352:158;-1:-1:-1;;;;352:158:34:o;530:76:5:-;571:35;530:76;:::o;1478:81:33:-;1543:9;;;;1478:81;:::o;660:165:34:-;1321:7:27;;751:4:34;;1321:7:27;;1320:8;1312:37;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;;;;774:44:34;798:7;807:10;774:23;:44::i;1852:115:27:-;350:20:26;359:10;350:8;:20::i;:::-;342:81;;;;-1:-1:-1;;;;;342:81:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1512:7:27;;;;1504:40;;;;;-1:-1:-1;;;;;1504:40:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;1910:7;:15;;-1:-1:-1;;1910:15:27;;;1940:20;;;1949:10;1940:20;;;;;;;;;;;;;1852:115::o;397:79:32:-;444:25;450:10;462:6;444:5;:25::i;:::-;397:79;:::o;447:107:26:-;503:4;526:21;:8;539:7;526:21;:12;:21;:::i;:::-;519:28;447:107;-1:-1:-1;;447:107:26:o;1092:76:27:-;1154:7;;;;1092:76;:::o;656:75:26:-;699:25;713:10;699:13;:25::i;:::-;656:75::o;1661:108:31:-;-1:-1:-1;;;;;1744:18:31;1718:7;1744:18;;;:9;:18;;;;;;;1661:108::o;1599:137:30:-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1697:1;1681:6;;1660:40;;-1:-1:-1;;;;;1681:6:30;;;;1660:40;;1697:1;;1660:40;1727:1;1710:19;;-1:-1:-1;;;;;;1710:19:30;;;1599:137::o;533:101:32:-;601:26;611:7;620:6;601:9;:26::i;:::-;533:101;;:::o;560:90:26:-;350:20;359:10;350:8;:20::i;:::-;342:81;;;;-1:-1:-1;;;;;342:81:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;624:19;635:7;624:10;:19::i;1649:113:27:-;350:20:26;359:10;350:8;:20::i;:::-;342:81;;;;-1:-1:-1;;;;;342:81:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1321:7:27;;;;1320:8;1312:37;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;;;;1708:7;:14;;-1:-1:-1;;1708:14:27;1718:4;1708:14;;;1737:18;;;1744:10;1737:18;;;;;;;;;;;;;1649:113::o;814:77:30:-;852:7;878:6;-1:-1:-1;;;;;878:6:30;814:77;:::o;1165:90::-;1205:4;1242:6;-1:-1:-1;;;;;1242:6:30;1228:10;:20;;1165:90::o;838:85:33:-;909:7;902:14;;;;;;;-1:-1:-1;;902:14:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;877:13;;902:14;;909:7;;902:14;;909:7;902:14;;;;;;;;;;;;;;;;;;;;;;;;831:175:34;1321:7:27;;927:4:34;;1321:7:27;;1320:8;1312:37;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;;;;950:49:34;974:7;983:15;950:23;:49::i;216:130::-;1321:7:27;;291:4:34;;1321:7:27;;1320:8;1312:37;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;-1:-1:-1;;;;;1312:37:27;;;;;;;;;;;;;;;314:25:34;329:2;333:5;314:14;:25::i;805:371:5:-;892:4;1018:9:30;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1036:1:5;1027:6;:10;1019:19;;;;;;1049:42;1059:10;1071:11;1084:6;1049:9;:42::i;:::-;1106:41;;;;;;;;-1:-1:-1;;;;;1106:41:5;;;1115:10;;1106:41;;;;;;;;;-1:-1:-1;1165:4:5;805:371;;;;:::o;2183:132:31:-;-1:-1:-1;;;;;2281:18:31;;;2255:7;2281:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;2183:132::o;1885:107:30:-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;;;1010:54:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1957:28;1976:8;1957:18;:28::i;2453:145:31:-;2518:4;2534:36;2543:10;2555:7;2564:5;2534:8;:36::i;:::-;-1:-1:-1;2587:4:31;2453:145;;;;:::o;3055:252::-;3144:4;3160:36;3170:6;3178:9;3189:6;3160:9;:36::i;:::-;-1:-1:-1;;;;;3235:19:31;;;;;;:11;:19;;;;;;;;3223:10;3235:31;;;;;;;;;3206:73;;3215:6;;3235:43;;3271:6;3235:43;:35;:43;:::i;:::-;3206:8;:73::i;:::-;-1:-1:-1;3296:4:31;3055:252;;;;;:::o;3702:203::-;3807:10;3782:4;3828:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;3828:32:31;;;;;;;;;;3782:4;;3798:79;;3819:7;;3828:48;;3865:10;3828:48;:36;:48;:::i;6392:300::-;-1:-1:-1;;;;;6466:21:31;;6458:67;;;;-1:-1:-1;;;;;6458:67:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6551:12;;:23;;6568:5;6551:23;:16;:23;:::i;:::-;6536:12;:38;-1:-1:-1;;;;;6605:18:31;;;;;;:9;:18;;;;;;:29;;6628:5;6605:29;:22;:29;:::i;:::-;-1:-1:-1;;;;;6584:18:31;;;;;;:9;:18;;;;;;;;:50;;;;6649:36;;;;;;;6584:18;;6649:36;;;;;;;;;;;6392:300;;:::o;779:200:25:-;851:4;-1:-1:-1;;;;;875:21:25;;867:68;;;;-1:-1:-1;;;;;867:68:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;952:20:25;:11;:20;;;;;;;;;;;;;;;779:200::o;862:127:26:-;921:24;:8;937:7;921:24;:15;:24;:::i;:::-;960:22;;-1:-1:-1;;;;;960:22:26;;;;;;;;862:127;:::o;7623:185:31:-;7694:22;7700:7;7709:6;7694:5;:22::i;:::-;-1:-1:-1;;;;;7756:20:31;;;;;;:11;:20;;;;;;;;7744:10;7756:32;;;;;;;;;7726:75;;7735:7;;7756:44;;7793:6;7756:44;:36;:44;:::i;737:119:26:-;793:21;:8;806:7;793:21;:12;:21;:::i;:::-;829:20;;-1:-1:-1;;;;;829:20:26;;;;;;;;737:119;:::o;4392:213:31:-;4502:10;4477:4;4523:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;4523:32:31;;;;;;;;;;4477:4;;4493:84;;4514:7;;4523:53;;4560:15;4523:53;:36;:53;:::i;1972:153::-;2041:4;2057:40;2067:10;2079:9;2090:6;5079:422;-1:-1:-1;;;;;5176:20:31;;5168:70;;;;-1:-1:-1;;;;;5168:70:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5256:23:31;;5248:71;;;;-1:-1:-1;;;;;5248:71:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5350:17:31;;;;;;:9;:17;;;;;;:29;;5372:6;5350:29;:21;:29;:::i;:::-;-1:-1:-1;;;;;5330:17:31;;;;;;;:9;:17;;;;;;:49;;;;5412:20;;;;;;;:32;;5437:6;5412:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;5389:20:31;;;;;;;:9;:20;;;;;;;;;:55;;;;5459:35;;;;;;;5389:20;;5459:35;;;;;;;;;;;;;5079:422;;;:::o;2093:225:30:-;-1:-1:-1;;;;;2166:22:30;;2158:73;;;;-1:-1:-1;;;;;2158:73:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2267:6;;;2246:38;;-1:-1:-1;;;;;2246:38:30;;;;2267:6;;;2246:38;;;2294:6;:17;;-1:-1:-1;;;;;;2294:17:30;-1:-1:-1;;;;;2294:17:30;;;;;;;;;;2093:225::o;7117:329:31:-;-1:-1:-1;;;;;7209:19:31;;7201:68;;;;-1:-1:-1;;;;;7201:68:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7287:21:31;;7279:68;;;;-1:-1:-1;;;;;7279:68:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7358:18:31;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:35;;;7408:31;;;;;;;;;;;;;;;;;7117:329;;;:::o;1274:179:29:-;1332:7;1364:1;1359;:6;;1351:49;;;;;-1:-1:-1;;;;;1351:49:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:29;;;1274:179::o;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:29;;;;;;;;;;;;;;;;;;;;;;;;;;;510:180:25;589:18;593:4;599:7;589:3;:18::i;:::-;581:64;;;;-1:-1:-1;;;;;581:64:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;655:20:25;678:5;655:20;;;;;;;;;;;:28;;-1:-1:-1;;655:28:25;;;510:180::o;260:175::-;337:18;341:4;347:7;337:3;:18::i;:::-;336:19;328:63;;;;;-1:-1:-1;;;;;328:63:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;401:20:25;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;401:27:25;424:4;401:27;;;260:175::o", + "source": "pragma solidity ^0.5.8;\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\";\n\ncontract RenToken is Ownable, ERC20Detailed, ERC20Pausable, ERC20Burnable {\n\n string private constant _name = \"Republic Token\";\n string private constant _symbol = \"REN\";\n uint8 private constant _decimals = 18;\n\n uint256 public constant INITIAL_SUPPLY = 1000000000 * 10**uint256(_decimals);\n\n /// @notice The RenToken Constructor.\n constructor() ERC20Burnable() ERC20Pausable() ERC20Detailed(_name, _symbol, _decimals) public {\n _mint(msg.sender, INITIAL_SUPPLY);\n }\n\n function transferTokens(address beneficiary, uint256 amount) public onlyOwner returns (bool) {\n // Note: The deployed version has no revert reason\n /* solium-disable-next-line error-reason */\n require(amount > 0);\n\n _transfer(msg.sender, beneficiary, amount);\n emit Transfer(msg.sender, beneficiary, amount);\n\n return true;\n }\n}\n", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol", + "exportedSymbols": { + "RenToken": [ + 2796 + ] + }, + "id": 2797, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2712, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 2713, + "nodeType": "ImportDirective", + "scope": 2797, + "sourceUnit": 6512, + "src": "25:63:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "id": 2714, + "nodeType": "ImportDirective", + "scope": 2797, + "sourceUnit": 6998, + "src": "89:71:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol", + "id": 2715, + "nodeType": "ImportDirective", + "scope": 2797, + "sourceUnit": 7100, + "src": "161:71:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol", + "id": 2716, + "nodeType": "ImportDirective", + "scope": 2797, + "sourceUnit": 6940, + "src": "233:71:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2717, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6511, + "src": "327:7:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$6511", + "typeString": "contract Ownable" + } + }, + "id": 2718, + "nodeType": "InheritanceSpecifier", + "src": "327:7:5" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2719, + "name": "ERC20Detailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6997, + "src": "336:13:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Detailed_$6997", + "typeString": "contract ERC20Detailed" + } + }, + "id": 2720, + "nodeType": "InheritanceSpecifier", + "src": "336:13:5" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2721, + "name": "ERC20Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7099, + "src": "351:13:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Pausable_$7099", + "typeString": "contract ERC20Pausable" + } + }, + "id": 2722, + "nodeType": "InheritanceSpecifier", + "src": "351:13:5" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2723, + "name": "ERC20Burnable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6939, + "src": "366:13:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Burnable_$6939", + "typeString": "contract ERC20Burnable" + } + }, + "id": 2724, + "nodeType": "InheritanceSpecifier", + "src": "366:13:5" + } + ], + "contractDependencies": [ + 6113, + 6198, + 6511, + 6908, + 6939, + 6997, + 7099, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2796, + "linearizedBaseContracts": [ + 2796, + 6939, + 7099, + 6198, + 6113, + 6908, + 6997, + 7168, + 6511 + ], + "name": "RenToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2727, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 2796, + "src": "387:48:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 2725, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "387:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "52657075626c696320546f6b656e", + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "419:16:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e5c6ec46181aa7e50449c1e0380e9046c227fda9fd0b9c20a72f5ec058938b03", + "typeString": "literal_string \"Republic Token\"" + }, + "value": "Republic Token" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2730, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 2796, + "src": "441:39:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 2728, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "441:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "52454e", + "id": 2729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "475:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4f3045e2a4127a16411506ed3ee0d680edc88abec4ec54f5803cb81605dbdf79", + "typeString": "literal_string \"REN\"" + }, + "value": "REN" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2733, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 2796, + "src": "486:37:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2731, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "486:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "521:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2742, + "name": "INITIAL_SUPPLY", + "nodeType": "VariableDeclaration", + "scope": 2796, + "src": "530:76:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2734, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "530:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "31303030303030303030", + "id": 2735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "571:10:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000_by_1", + "typeString": "int_const 1000000000" + }, + "value": "1000000000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2740, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 2736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "584:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2738, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2733, + "src": "596:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "588:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "588:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "584:22:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "571:35:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 2760, + "nodeType": "Block", + "src": "749:50:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2755, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "765:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "765:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2757, + "name": "INITIAL_SUPPLY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2742, + "src": "777:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2754, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "759:5:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "759:33:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2759, + "nodeType": "ExpressionStatement", + "src": "759:33:5" + } + ] + }, + "documentation": "@notice The RenToken Constructor.", + "id": 2761, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [], + "id": 2745, + "modifierName": { + "argumentTypes": null, + "id": 2744, + "name": "ERC20Burnable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6939, + "src": "669:13:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Burnable_$6939_$", + "typeString": "type(contract ERC20Burnable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "669:15:5" + }, + { + "arguments": [], + "id": 2747, + "modifierName": { + "argumentTypes": null, + "id": 2746, + "name": "ERC20Pausable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7099, + "src": "685:13:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Pausable_$7099_$", + "typeString": "type(contract ERC20Pausable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "685:15:5" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2749, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2727, + "src": "715:5:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2750, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2730, + "src": "722:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2751, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2733, + "src": "731:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2752, + "modifierName": { + "argumentTypes": null, + "id": 2748, + "name": "ERC20Detailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6997, + "src": "701:13:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$6997_$", + "typeString": "type(contract ERC20Detailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "701:40:5" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2743, + "nodeType": "ParameterList", + "parameters": [], + "src": "666:2:5" + }, + "returnParameters": { + "id": 2753, + "nodeType": "ParameterList", + "parameters": [], + "src": "749:0:5" + }, + "scope": 2796, + "src": "655:144:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2794, + "nodeType": "Block", + "src": "898:278:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2773, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "1027:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1036:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1027:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2772, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7205, + "src": "1019:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1019:19:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2777, + "nodeType": "ExpressionStatement", + "src": "1019:19:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2779, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "1059:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1059:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2781, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2763, + "src": "1071:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2782, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "1084:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2778, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6751, + "src": "1049:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1049:42:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2784, + "nodeType": "ExpressionStatement", + "src": "1049:42:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2786, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "1115:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1115:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2788, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2763, + "src": "1127:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2789, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "1140:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2785, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7159, + "src": "1106:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1106:41:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2791, + "nodeType": "EmitStatement", + "src": "1101:46:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1165:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2771, + "id": 2793, + "nodeType": "Return", + "src": "1158:11:5" + } + ] + }, + "documentation": null, + "id": 2795, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2768, + "modifierName": { + "argumentTypes": null, + "id": 2767, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "873:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "873:9:5" + } + ], + "name": "transferTokens", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2766, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2763, + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "scope": 2795, + "src": "829:19:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2762, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "829:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2765, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 2795, + "src": "850:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2764, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "850:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "828:37:5" + }, + "returnParameters": { + "id": 2771, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2770, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2795, + "src": "892:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2769, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "892:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "891:6:5" + }, + "scope": 2796, + "src": "805:371:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 2797, + "src": "306:872:5" + } + ], + "src": "0:1179:5" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/RenToken/RenToken.sol", + "exportedSymbols": { + "RenToken": [ + 2796 + ] + }, + "id": 2797, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2712, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 2713, + "nodeType": "ImportDirective", + "scope": 2797, + "sourceUnit": 6512, + "src": "25:63:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "id": 2714, + "nodeType": "ImportDirective", + "scope": 2797, + "sourceUnit": 6998, + "src": "89:71:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol", + "id": 2715, + "nodeType": "ImportDirective", + "scope": 2797, + "sourceUnit": 7100, + "src": "161:71:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol", + "id": 2716, + "nodeType": "ImportDirective", + "scope": 2797, + "sourceUnit": 6940, + "src": "233:71:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2717, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6511, + "src": "327:7:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$6511", + "typeString": "contract Ownable" + } + }, + "id": 2718, + "nodeType": "InheritanceSpecifier", + "src": "327:7:5" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2719, + "name": "ERC20Detailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6997, + "src": "336:13:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Detailed_$6997", + "typeString": "contract ERC20Detailed" + } + }, + "id": 2720, + "nodeType": "InheritanceSpecifier", + "src": "336:13:5" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2721, + "name": "ERC20Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7099, + "src": "351:13:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Pausable_$7099", + "typeString": "contract ERC20Pausable" + } + }, + "id": 2722, + "nodeType": "InheritanceSpecifier", + "src": "351:13:5" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2723, + "name": "ERC20Burnable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6939, + "src": "366:13:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Burnable_$6939", + "typeString": "contract ERC20Burnable" + } + }, + "id": 2724, + "nodeType": "InheritanceSpecifier", + "src": "366:13:5" + } + ], + "contractDependencies": [ + 6113, + 6198, + 6511, + 6908, + 6939, + 6997, + 7099, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2796, + "linearizedBaseContracts": [ + 2796, + 6939, + 7099, + 6198, + 6113, + 6908, + 6997, + 7168, + 6511 + ], + "name": "RenToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2727, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 2796, + "src": "387:48:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 2725, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "387:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "52657075626c696320546f6b656e", + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "419:16:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e5c6ec46181aa7e50449c1e0380e9046c227fda9fd0b9c20a72f5ec058938b03", + "typeString": "literal_string \"Republic Token\"" + }, + "value": "Republic Token" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2730, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 2796, + "src": "441:39:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 2728, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "441:6:5", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "52454e", + "id": 2729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "475:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4f3045e2a4127a16411506ed3ee0d680edc88abec4ec54f5803cb81605dbdf79", + "typeString": "literal_string \"REN\"" + }, + "value": "REN" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2733, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 2796, + "src": "486:37:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2731, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "486:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "521:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2742, + "name": "INITIAL_SUPPLY", + "nodeType": "VariableDeclaration", + "scope": 2796, + "src": "530:76:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2734, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "530:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "31303030303030303030", + "id": 2735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "571:10:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000_by_1", + "typeString": "int_const 1000000000" + }, + "value": "1000000000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2740, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 2736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "584:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2738, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2733, + "src": "596:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "588:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "588:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "584:22:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "571:35:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 2760, + "nodeType": "Block", + "src": "749:50:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2755, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "765:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "765:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2757, + "name": "INITIAL_SUPPLY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2742, + "src": "777:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2754, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "759:5:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "759:33:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2759, + "nodeType": "ExpressionStatement", + "src": "759:33:5" + } + ] + }, + "documentation": "@notice The RenToken Constructor.", + "id": 2761, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [], + "id": 2745, + "modifierName": { + "argumentTypes": null, + "id": 2744, + "name": "ERC20Burnable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6939, + "src": "669:13:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Burnable_$6939_$", + "typeString": "type(contract ERC20Burnable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "669:15:5" + }, + { + "arguments": [], + "id": 2747, + "modifierName": { + "argumentTypes": null, + "id": 2746, + "name": "ERC20Pausable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7099, + "src": "685:13:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Pausable_$7099_$", + "typeString": "type(contract ERC20Pausable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "685:15:5" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2749, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2727, + "src": "715:5:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2750, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2730, + "src": "722:7:5", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2751, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2733, + "src": "731:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2752, + "modifierName": { + "argumentTypes": null, + "id": 2748, + "name": "ERC20Detailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6997, + "src": "701:13:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$6997_$", + "typeString": "type(contract ERC20Detailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "701:40:5" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2743, + "nodeType": "ParameterList", + "parameters": [], + "src": "666:2:5" + }, + "returnParameters": { + "id": 2753, + "nodeType": "ParameterList", + "parameters": [], + "src": "749:0:5" + }, + "scope": 2796, + "src": "655:144:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2794, + "nodeType": "Block", + "src": "898:278:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2773, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "1027:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1036:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1027:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2772, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7205, + "src": "1019:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1019:19:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2777, + "nodeType": "ExpressionStatement", + "src": "1019:19:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2779, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "1059:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1059:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2781, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2763, + "src": "1071:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2782, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "1084:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2778, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6751, + "src": "1049:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1049:42:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2784, + "nodeType": "ExpressionStatement", + "src": "1049:42:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2786, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "1115:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1115:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2788, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2763, + "src": "1127:11:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2789, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "1140:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2785, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7159, + "src": "1106:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1106:41:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2791, + "nodeType": "EmitStatement", + "src": "1101:46:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1165:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2771, + "id": 2793, + "nodeType": "Return", + "src": "1158:11:5" + } + ] + }, + "documentation": null, + "id": 2795, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2768, + "modifierName": { + "argumentTypes": null, + "id": 2767, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "873:9:5", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "873:9:5" + } + ], + "name": "transferTokens", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2766, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2763, + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "scope": 2795, + "src": "829:19:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2762, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "829:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2765, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 2795, + "src": "850:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2764, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "850:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "828:37:5" + }, + "returnParameters": { + "id": 2771, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2770, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 2795, + "src": "892:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2769, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "892:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "891:6:5" + }, + "scope": 2796, + "src": "805:371:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 2797, + "src": "306:872:5" + } + ], + "src": "0:1179:5" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": {}, + "links": {}, + "address": "0x2cd647668494c1b15743ab283a0f980d90a87394" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:19:33.330Z", + "devdoc": { + "methods": { + "allowance(address,address)": { + "details": "See `IERC20.allowance`." + }, + "balanceOf(address)": { + "details": "See `IERC20.balanceOf`." + }, + "burn(uint256)": { + "details": "Destoys `amount` tokens from the caller. * See `ERC20._burn`." + }, + "burnFrom(address,uint256)": { + "details": "See `ERC20._burnFrom`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. * > Note that this information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including `IERC20.balanceOf` and `IERC20.transfer`." + }, + "isOwner()": { + "details": "Returns true if the caller is the current owner." + }, + "name()": { + "details": "Returns the name of the token." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "pause()": { + "details": "Called by a pauser to pause, triggers stopped state." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See `IERC20.totalSupply`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unpause()": { + "details": "Called by a pauser to unpause, returns to normal state." + } + } + }, + "userdoc": { + "methods": { + "constructor": "The RenToken Constructor." + } + } +} \ No newline at end of file diff --git a/build/devnet/ShifterRegistry.json b/build/devnet/ShifterRegistry.json new file mode 100644 index 00000000..2afa8da2 --- /dev/null +++ b/build/devnet/ShifterRegistry.json @@ -0,0 +1,1770 @@ +{ + "contractName": "ShifterRegistry", + "abi": [ + { + "constant": false, + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_tokenAddress", + "type": "address" + }, + { + "name": "_shifterAddress", + "type": "address" + } + ], + "name": "setShifter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "getShifter", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_tokenSymbol", + "type": "string" + } + ], + "name": "getShifterBySymbol", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"getShifter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"name\":\"getShifterBySymbol\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"name\":\"_shifterAddress\",\"type\":\"address\"}],\"name\":\"setShifter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"claimOwnership()\":{\"details\":\"Allows the pendingOwner address to finalize the transfer.\"},\"getShifter(address)\":{\"params\":{\"_tokenAddress\":\"The address of the ERC20Shifted token contract.\"}},\"getShifterBySymbol(string)\":{\"params\":{\"_tokenSymbol\":\"The symbol of the ERC20Shifted token contract.\"}},\"isOwner()\":{\"return\":\"true if `msg.sender` is the owner of the contract.\"},\"owner()\":{\"return\":\"the address of the owner.\"},\"renounceOwnership()\":{\"details\":\"Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore.\"},\"setShifter(address,address)\":{\"params\":{\"_shifterAddress\":\"The address of the Shifter contract.\",\"_tokenAddress\":\"The address of the ERC20Shifted token contract.\"}},\"transferOwnership(address)\":{\"details\":\"Allows the current owner to set the pendingOwner address.\",\"params\":{\"newOwner\":\"The address to transfer ownership to.\"}}}},\"userdoc\":{\"methods\":{\"getShifter(address)\":{\"notice\":\"Returns the Shifter address for the given ERC20Shifted token contract address.\"},\"getShifterBySymbol(string)\":{\"notice\":\"Returns the Shifter address for the given ERC20Shifted token symbol.\"},\"renounceOwnership()\":{\"notice\":\"Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setShifter(address,address)\":{\"notice\":\"Allow the owner to update shifter address for a given ERC20Shifted token contract.\"}}}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/ShifterRegistry.sol\":\"ShifterRegistry\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol\":{\"keccak256\":\"0x709d74b45c3da97750300a49f14891cecf0aa4508b21eb9bb7bdde941b0d2825\",\"urls\":[\"bzzr://6d127237549773fb77ab60aa2f09b82b1476ce623014d3fad7bd3f7518f067d7\"]},\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/ShifterRegistry.sol\":{\"keccak256\":\"0x25cec2d8d1feb9a3e0cb9ed8492cf5c102cc5833b0a1b0765a70c6343e0926c4\",\"urls\":[\"bzzr://7923d233de1ab5a9b0d5f68e4dc7e71709a44f4de5d07355855add5d2a059445\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", + "bytecode": "0x60806040819052600180546001600160a01b0319163317908190556001600160a01b0316906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36105f18061005b6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638f32d59b1161005b5780638f32d59b146100e957806392a29e3014610105578063a904d13d14610175578063f2fde38b146101a357610088565b806322101d1f1461008d5780634e71e0c8146100cf578063715018a6146100d95780638da5cb5b146100e1575b600080fd5b6100b3600480360360208110156100a357600080fd5b50356001600160a01b03166101c9565b604080516001600160a01b039092168252519081900360200190f35b6100d76101e7565b005b6100d76102ae565b6100b3610347565b6100f1610356565b604080519115158252519081900360200190f35b6100b36004803603602081101561011b57600080fd5b81019060208101813564010000000081111561013657600080fd5b82018360208201111561014857600080fd5b8035906020019184600183028401116401000000008311171561016a57600080fd5b509092509050610367565b6100d76004803603604081101561018b57600080fd5b506001600160a01b03813581169160200135166103a1565b6100d7600480360360208110156101b957600080fd5b50356001600160a01b0316610554565b6001600160a01b039081166000908152600260205260409020541690565b6000546001600160a01b031633146102495760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b600080546001546040516001600160a01b039283169392909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600180546001600160a01b03199081166001600160a01b03841617909155169055565b6102b6610356565b6102fd5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6001546001600160a01b031690565b6001546001600160a01b0316331490565b6000600383836040518083838082843791909101948552505060405192839003602001909220546001600160a01b03169250505092915050565b6103a9610356565b6103f05760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b806003836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561042c57600080fd5b505afa158015610440573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561046957600080fd5b81019080805164010000000081111561048157600080fd5b8201602081018481111561049457600080fd5b81516401000000008111828201871017156104ae57600080fd5b50509291905050506040518082805190602001908083835b602083106104e55780518252601f1990920191602091820191016104c6565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820190942080546001600160a01b03199081166001600160a01b03978816179091559685166000908152600290915292909220805490951693909216929092179092555050565b61055c610356565b6105a35760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b039290921691909117905556fea165627a7a72305820eaa12383249a984da476df20544118d43e13d50ea7c85f1cb4f56b4b7c004e690029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638f32d59b1161005b5780638f32d59b146100e957806392a29e3014610105578063a904d13d14610175578063f2fde38b146101a357610088565b806322101d1f1461008d5780634e71e0c8146100cf578063715018a6146100d95780638da5cb5b146100e1575b600080fd5b6100b3600480360360208110156100a357600080fd5b50356001600160a01b03166101c9565b604080516001600160a01b039092168252519081900360200190f35b6100d76101e7565b005b6100d76102ae565b6100b3610347565b6100f1610356565b604080519115158252519081900360200190f35b6100b36004803603602081101561011b57600080fd5b81019060208101813564010000000081111561013657600080fd5b82018360208201111561014857600080fd5b8035906020019184600183028401116401000000008311171561016a57600080fd5b509092509050610367565b6100d76004803603604081101561018b57600080fd5b506001600160a01b03813581169160200135166103a1565b6100d7600480360360208110156101b957600080fd5b50356001600160a01b0316610554565b6001600160a01b039081166000908152600260205260409020541690565b6000546001600160a01b031633146102495760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b600080546001546040516001600160a01b039283169392909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600180546001600160a01b03199081166001600160a01b03841617909155169055565b6102b6610356565b6102fd5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6001546001600160a01b031690565b6001546001600160a01b0316331490565b6000600383836040518083838082843791909101948552505060405192839003602001909220546001600160a01b03169250505092915050565b6103a9610356565b6103f05760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b806003836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561042c57600080fd5b505afa158015610440573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561046957600080fd5b81019080805164010000000081111561048157600080fd5b8201602081018481111561049457600080fd5b81516401000000008111828201871017156104ae57600080fd5b50509291905050506040518082805190602001908083835b602083106104e55780518252601f1990920191602091820191016104c6565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820190942080546001600160a01b03199081166001600160a01b03978816179091559685166000908152600290915292909220805490951693909216929092179092555050565b61055c610356565b6105a35760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b039290921691909117905556fea165627a7a72305820eaa12383249a984da476df20544118d43e13d50ea7c85f1cb4f56b4b7c004e690029", + "sourceMap": "92:1427:8:-;;;;;528:6:10;:19;;-1:-1:-1;;;;;;528:19:10;537:10;528:19;;;;;-1:-1:-1;;;;;595:6:10;;528;;562:40;;528:6;;562:40;92:1427:8;;;;;;", + "deployedSourceMap": "92:1427:8:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;92:1427:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1068:122;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1068:122:8;-1:-1:-1;;;;;1068:122:8;;:::i;:::-;;;;-1:-1:-1;;;;;1068:122:8;;;;;;;;;;;;;;2146:177:10;;;:::i;:::-;;1668:137;;;:::i;672:77::-;;;:::i;1224:90::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;1372:145:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1372:145:8;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;1372:145:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1372:145:8;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;1372:145:8;;-1:-1:-1;1372:145:8;-1:-1:-1;1372:145:8;:::i;646:228::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;646:228:8;;;;;;;;;;:::i;1955:101:10:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1955:101:10;-1:-1:-1;;;;;1955:101:10;;:::i;1068:122:8:-;-1:-1:-1;;;;;1160:23:8;;;1134:7;1160:23;;;:8;:23;;;;;;;;1068:122::o;2146:177:10:-;1081:13;;-1:-1:-1;;;;;1081:13:10;1067:10;:27;1059:61;;;;;-1:-1:-1;;;;;1059:61:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;2238:13;;;;2230:6;2209:43;;-1:-1:-1;;;;;2238:13:10;;;;2230:6;;;;;2209:43;;;2269:13;;;;2260:22;;-1:-1:-1;;;;;;2260:22:10;;;-1:-1:-1;;;;;2269:13:10;;2260:22;;;;2290:26;;;2146:177::o;1668:137::-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;1750:6;;1729:40;;1766:1;;-1:-1:-1;;;;;1750:6:10;;1729:40;;1766:1;;1729:40;1779:6;:19;;-1:-1:-1;;;;;;1779:19:10;;;1668:137::o;672:77::-;736:6;;-1:-1:-1;;;;;736:6:10;672:77;:::o;1224:90::-;1301:6;;-1:-1:-1;;;;;1301:6:10;1287:10;:20;;1224:90::o;1372:145:8:-;1453:7;1479:17;1497:12;;1479:31;;;;;30:3:-1;22:6;14;1:33;45:16;;;;1479:31:8;;;-1:-1:-1;;1479:31:8;;;;;;;;;;;;-1:-1:-1;;;;;1479:31:8;;-1:-1:-1;;;1372:145:8;;;;:::o;646:228::-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;801:15:8;743:17;774:13;-1:-1:-1;;;;;761:34:8;;:36;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;761:36:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;761:36:8;;;;;;39:16:-1;36:1;17:17;2:54;101:4;761:36:8;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;761:36:8;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;0:372;;761:36:8;;;;;;743:55;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;743:55:8;;;;;-1:-1:-1;743:55:8;;;;;;;;;;;;:73;;-1:-1:-1;;;;;;743:73:8;;;-1:-1:-1;;;;;743:73:8;;;;;;;826:23;;;-1:-1:-1;826:23:8;;;:8;:23;;;;;;;:41;;;;;;;;;;;;;;;;-1:-1:-1;;646:228:8:o;1955:101:10:-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;2025:13;:24;;-1:-1:-1;;;;;;2025:24:10;-1:-1:-1;;;;;2025:24:10;;;;;;;;;;1955:101::o", + "source": "pragma solidity ^0.5.8;\n\nimport \"../libraries/Claimable.sol\";\nimport \"./ERC20Shifted.sol\";\n\ncontract ShifterRegistry is Claimable {\n /// @notice A map of token addresses to canonical shifter addresses\n mapping (address=>address) private shifters;\n\n /// @notice A map of token symbols to canonical shifter addresses\n mapping (string=>address) private shiftersBySymbols;\n\n /// @notice Allow the owner to update shifter address for a given\n /// ERC20Shifted token contract.\n /// @param _tokenAddress The address of the ERC20Shifted token contract.\n /// @param _shifterAddress The address of the Shifter contract.\n function setShifter(address _tokenAddress, address _shifterAddress) external onlyOwner {\n shiftersBySymbols[ERC20Shifted(_tokenAddress).symbol()] = _shifterAddress;\n shifters[_tokenAddress] = _shifterAddress;\n }\n\n /// @notice Returns the Shifter address for the given ERC20Shifted token\n /// contract address.\n /// @param _tokenAddress The address of the ERC20Shifted token contract.\n function getShifter(address _tokenAddress) external view returns (address) {\n return shifters[_tokenAddress];\n }\n\n /// @notice Returns the Shifter address for the given ERC20Shifted token\n /// symbol.\n /// @param _tokenSymbol The symbol of the ERC20Shifted token contract.\n function getShifterBySymbol(string calldata _tokenSymbol) external view returns (address) {\n return shiftersBySymbols[_tokenSymbol];\n }\n}", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ShifterRegistry.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ShifterRegistry.sol", + "exportedSymbols": { + "ShifterRegistry": [ + 3554 + ] + }, + "id": 3555, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3491, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 3492, + "nodeType": "ImportDirective", + "scope": 3555, + "sourceUnit": 3684, + "src": "25:36:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "file": "./ERC20Shifted.sol", + "id": 3493, + "nodeType": "ImportDirective", + "scope": 3555, + "sourceUnit": 2866, + "src": "62:28:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3494, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "120:9:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 3495, + "nodeType": "InheritanceSpecifier", + "src": "120:9:8" + } + ], + "contractDependencies": [ + 3683 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3554, + "linearizedBaseContracts": [ + 3554, + 3683 + ], + "name": "ShifterRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3499, + "name": "shifters", + "nodeType": "VariableDeclaration", + "scope": 3554, + "src": "208:43:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_address_$", + "typeString": "mapping(address => address)" + }, + "typeName": { + "id": 3498, + "keyType": { + "id": 3496, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "217:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "208:26:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_address_$", + "typeString": "mapping(address => address)" + }, + "valueType": { + "id": 3497, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "226:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 3503, + "name": "shiftersBySymbols", + "nodeType": "VariableDeclaration", + "scope": 3554, + "src": "328:51:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", + "typeString": "mapping(string => address)" + }, + "typeName": { + "id": 3502, + "keyType": { + "id": 3500, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "337:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "nodeType": "Mapping", + "src": "328:25:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", + "typeString": "mapping(string => address)" + }, + "valueType": { + "id": 3501, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "345:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 3528, + "nodeType": "Block", + "src": "733:141:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3512, + "name": "shiftersBySymbols", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3503, + "src": "743:17:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", + "typeString": "mapping(string memory => address)" + } + }, + "id": 3518, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3514, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3505, + "src": "774:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3513, + "name": "ERC20Shifted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2853, + "src": "761:12:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Shifted_$2853_$", + "typeString": "type(contract ERC20Shifted)" + } + }, + "id": 3515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "761:27:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 6988, + "src": "761:34:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", + "typeString": "function () view external returns (string memory)" + } + }, + "id": 3517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "761:36:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "743:55:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3519, + "name": "_shifterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3507, + "src": "801:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "743:73:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3521, + "nodeType": "ExpressionStatement", + "src": "743:73:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 3526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3522, + "name": "shifters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3499, + "src": "826:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_address_$", + "typeString": "mapping(address => address)" + } + }, + "id": 3524, + "indexExpression": { + "argumentTypes": null, + "id": 3523, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3505, + "src": "835:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "826:23:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3525, + "name": "_shifterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3507, + "src": "852:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "826:41:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3527, + "nodeType": "ExpressionStatement", + "src": "826:41:8" + } + ] + }, + "documentation": "@notice Allow the owner to update shifter address for a given\n ERC20Shifted token contract.\n @param _tokenAddress The address of the ERC20Shifted token contract.\n @param _shifterAddress The address of the Shifter contract.", + "id": 3529, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3510, + "modifierName": { + "argumentTypes": null, + "id": 3509, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "723:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "723:9:8" + } + ], + "name": "setShifter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3505, + "name": "_tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 3529, + "src": "666:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "666:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3507, + "name": "_shifterAddress", + "nodeType": "VariableDeclaration", + "scope": 3529, + "src": "689:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3506, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "689:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:48:8" + }, + "returnParameters": { + "id": 3511, + "nodeType": "ParameterList", + "parameters": [], + "src": "733:0:8" + }, + "scope": 3554, + "src": "646:228:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3540, + "nodeType": "Block", + "src": "1143:47:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3536, + "name": "shifters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3499, + "src": "1160:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_address_$", + "typeString": "mapping(address => address)" + } + }, + "id": 3538, + "indexExpression": { + "argumentTypes": null, + "id": 3537, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3531, + "src": "1169:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1160:23:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3535, + "id": 3539, + "nodeType": "Return", + "src": "1153:30:8" + } + ] + }, + "documentation": "@notice Returns the Shifter address for the given ERC20Shifted token\n contract address.\n @param _tokenAddress The address of the ERC20Shifted token contract.", + "id": 3541, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getShifter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3531, + "name": "_tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 3541, + "src": "1088:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3530, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1088:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1087:23:8" + }, + "returnParameters": { + "id": 3535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3534, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3541, + "src": "1134:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1134:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1133:9:8" + }, + "scope": 3554, + "src": "1068:122:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3552, + "nodeType": "Block", + "src": "1462:55:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3548, + "name": "shiftersBySymbols", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3503, + "src": "1479:17:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", + "typeString": "mapping(string memory => address)" + } + }, + "id": 3550, + "indexExpression": { + "argumentTypes": null, + "id": 3549, + "name": "_tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3543, + "src": "1497:12:8", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1479:31:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3547, + "id": 3551, + "nodeType": "Return", + "src": "1472:38:8" + } + ] + }, + "documentation": "@notice Returns the Shifter address for the given ERC20Shifted token\n symbol.\n @param _tokenSymbol The symbol of the ERC20Shifted token contract.", + "id": 3553, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getShifterBySymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3543, + "name": "_tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 3553, + "src": "1400:28:8", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3542, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1400:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1399:30:8" + }, + "returnParameters": { + "id": 3547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3546, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3553, + "src": "1453:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3545, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1453:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1452:9:8" + }, + "scope": 3554, + "src": "1372:145:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 3555, + "src": "92:1427:8" + } + ], + "src": "0:1519:8" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ShifterRegistry.sol", + "exportedSymbols": { + "ShifterRegistry": [ + 3554 + ] + }, + "id": 3555, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3491, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 3492, + "nodeType": "ImportDirective", + "scope": 3555, + "sourceUnit": 3684, + "src": "25:36:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "file": "./ERC20Shifted.sol", + "id": 3493, + "nodeType": "ImportDirective", + "scope": 3555, + "sourceUnit": 2866, + "src": "62:28:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3494, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "120:9:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 3495, + "nodeType": "InheritanceSpecifier", + "src": "120:9:8" + } + ], + "contractDependencies": [ + 3683 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3554, + "linearizedBaseContracts": [ + 3554, + 3683 + ], + "name": "ShifterRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3499, + "name": "shifters", + "nodeType": "VariableDeclaration", + "scope": 3554, + "src": "208:43:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_address_$", + "typeString": "mapping(address => address)" + }, + "typeName": { + "id": 3498, + "keyType": { + "id": 3496, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "217:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "208:26:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_address_$", + "typeString": "mapping(address => address)" + }, + "valueType": { + "id": 3497, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "226:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 3503, + "name": "shiftersBySymbols", + "nodeType": "VariableDeclaration", + "scope": 3554, + "src": "328:51:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", + "typeString": "mapping(string => address)" + }, + "typeName": { + "id": 3502, + "keyType": { + "id": 3500, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "337:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "nodeType": "Mapping", + "src": "328:25:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", + "typeString": "mapping(string => address)" + }, + "valueType": { + "id": 3501, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "345:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 3528, + "nodeType": "Block", + "src": "733:141:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3512, + "name": "shiftersBySymbols", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3503, + "src": "743:17:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", + "typeString": "mapping(string memory => address)" + } + }, + "id": 3518, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3514, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3505, + "src": "774:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3513, + "name": "ERC20Shifted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2853, + "src": "761:12:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Shifted_$2853_$", + "typeString": "type(contract ERC20Shifted)" + } + }, + "id": 3515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "761:27:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 6988, + "src": "761:34:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", + "typeString": "function () view external returns (string memory)" + } + }, + "id": 3517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "761:36:8", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "743:55:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3519, + "name": "_shifterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3507, + "src": "801:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "743:73:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3521, + "nodeType": "ExpressionStatement", + "src": "743:73:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 3526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3522, + "name": "shifters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3499, + "src": "826:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_address_$", + "typeString": "mapping(address => address)" + } + }, + "id": 3524, + "indexExpression": { + "argumentTypes": null, + "id": 3523, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3505, + "src": "835:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "826:23:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3525, + "name": "_shifterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3507, + "src": "852:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "826:41:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3527, + "nodeType": "ExpressionStatement", + "src": "826:41:8" + } + ] + }, + "documentation": "@notice Allow the owner to update shifter address for a given\n ERC20Shifted token contract.\n @param _tokenAddress The address of the ERC20Shifted token contract.\n @param _shifterAddress The address of the Shifter contract.", + "id": 3529, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3510, + "modifierName": { + "argumentTypes": null, + "id": 3509, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "723:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "723:9:8" + } + ], + "name": "setShifter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3505, + "name": "_tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 3529, + "src": "666:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "666:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3507, + "name": "_shifterAddress", + "nodeType": "VariableDeclaration", + "scope": 3529, + "src": "689:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3506, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "689:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:48:8" + }, + "returnParameters": { + "id": 3511, + "nodeType": "ParameterList", + "parameters": [], + "src": "733:0:8" + }, + "scope": 3554, + "src": "646:228:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3540, + "nodeType": "Block", + "src": "1143:47:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3536, + "name": "shifters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3499, + "src": "1160:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_address_$", + "typeString": "mapping(address => address)" + } + }, + "id": 3538, + "indexExpression": { + "argumentTypes": null, + "id": 3537, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3531, + "src": "1169:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1160:23:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3535, + "id": 3539, + "nodeType": "Return", + "src": "1153:30:8" + } + ] + }, + "documentation": "@notice Returns the Shifter address for the given ERC20Shifted token\n contract address.\n @param _tokenAddress The address of the ERC20Shifted token contract.", + "id": 3541, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getShifter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3531, + "name": "_tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 3541, + "src": "1088:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3530, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1088:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1087:23:8" + }, + "returnParameters": { + "id": 3535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3534, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3541, + "src": "1134:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1134:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1133:9:8" + }, + "scope": 3554, + "src": "1068:122:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3552, + "nodeType": "Block", + "src": "1462:55:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3548, + "name": "shiftersBySymbols", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3503, + "src": "1479:17:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", + "typeString": "mapping(string memory => address)" + } + }, + "id": 3550, + "indexExpression": { + "argumentTypes": null, + "id": 3549, + "name": "_tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3543, + "src": "1497:12:8", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1479:31:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3547, + "id": 3551, + "nodeType": "Return", + "src": "1472:38:8" + } + ] + }, + "documentation": "@notice Returns the Shifter address for the given ERC20Shifted token\n symbol.\n @param _tokenSymbol The symbol of the ERC20Shifted token contract.", + "id": 3553, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getShifterBySymbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3543, + "name": "_tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 3553, + "src": "1400:28:8", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3542, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1400:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1399:30:8" + }, + "returnParameters": { + "id": 3547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3546, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3553, + "src": "1453:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3545, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1453:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1452:9:8" + }, + "scope": 3554, + "src": "1372:145:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 3555, + "src": "92:1427:8" + } + ], + "src": "0:1519:8" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + } + }, + "links": {}, + "address": "0xda67a63aAf771c4Cef589B164337FBcB93C65034", + "transactionHash": "0xfee10050b97078b6af6ecc5ff5513cc73408b1bddf7fbaa651e6a5e448fefab4" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:21:48.579Z", + "devdoc": { + "methods": { + "claimOwnership()": { + "details": "Allows the pendingOwner address to finalize the transfer." + }, + "getShifter(address)": { + "params": { + "_tokenAddress": "The address of the ERC20Shifted token contract." + } + }, + "getShifterBySymbol(string)": { + "params": { + "_tokenSymbol": "The symbol of the ERC20Shifted token contract." + } + }, + "isOwner()": { + "return": "true if `msg.sender` is the owner of the contract." + }, + "owner()": { + "return": "the address of the owner." + }, + "renounceOwnership()": { + "details": "Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore." + }, + "setShifter(address,address)": { + "params": { + "_shifterAddress": "The address of the Shifter contract.", + "_tokenAddress": "The address of the ERC20Shifted token contract." + } + }, + "transferOwnership(address)": { + "details": "Allows the current owner to set the pendingOwner address.", + "params": { + "newOwner": "The address to transfer ownership to." + } + } + } + }, + "userdoc": { + "methods": { + "getShifter(address)": { + "notice": "Returns the Shifter address for the given ERC20Shifted token contract address." + }, + "getShifterBySymbol(string)": { + "notice": "Returns the Shifter address for the given ERC20Shifted token symbol." + }, + "renounceOwnership()": { + "notice": "Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setShifter(address,address)": { + "notice": "Allow the owner to update shifter address for a given ERC20Shifted token contract." + } + } + } +} \ No newline at end of file diff --git a/build/devnet/ZECShifter.json b/build/devnet/ZECShifter.json new file mode 100644 index 00000000..2fa50d59 --- /dev/null +++ b/build/devnet/ZECShifter.json @@ -0,0 +1,17316 @@ +{ + "contractName": "ZECShifter", + "abi": [ + { + "constant": false, + "inputs": [], + "name": "claimTokenOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_nHash", + "type": "bytes32" + }, + { + "name": "_pHash", + "type": "bytes32" + }, + { + "name": "_sig", + "type": "bytes" + } + ], + "name": "shiftIn", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingNextShifter", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "feeRecipient", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "nextShifter", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "name": "status", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_nHash", + "type": "bytes32" + }, + { + "name": "_pHash", + "type": "bytes32" + }, + { + "name": "_sig", + "type": "bytes" + } + ], + "name": "forwardShiftIn", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "bytes" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "shiftOut", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "mintAuthority", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_wrapper", + "type": "address" + }, + { + "name": "authorized", + "type": "bool" + } + ], + "name": "authorizeWrapper", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "nextShiftID", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "shifterUpgradeTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "authorizedWrapper", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_nHash", + "type": "bytes32" + }, + { + "name": "_pHash", + "type": "bytes32" + } + ], + "name": "sigHash", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "fee", + "outputs": [ + { + "name": "", + "type": "uint16" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nextShifter", + "type": "address" + } + ], + "name": "upgradeShifter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nextFeeRecipient", + "type": "address" + } + ], + "name": "updateFeeRecipient", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_nHash", + "type": "bytes32" + }, + { + "name": "_pHash", + "type": "bytes32" + }, + { + "name": "_sig", + "type": "bytes" + } + ], + "name": "verifySig", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "bytes" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "forwardShiftOut", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "token", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_previousShifter", + "type": "address" + }, + { + "name": "_token", + "type": "address" + }, + { + "name": "_feeRecipient", + "type": "address" + }, + { + "name": "_mintAuthority", + "type": "address" + }, + { + "name": "_fee", + "type": "uint16" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": true, + "name": "_shiftID", + "type": "uint256" + } + ], + "name": "LogShiftIn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_to", + "type": "bytes" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": true, + "name": "_shiftID", + "type": "uint256" + } + ], + "name": "LogShiftOut", + "type": "event" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"claimTokenOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_nHash\",\"type\":\"bytes32\"},{\"name\":\"_pHash\",\"type\":\"bytes32\"},{\"name\":\"_sig\",\"type\":\"bytes\"}],\"name\":\"shiftIn\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingNextShifter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeRecipient\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextShifter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"status\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_nHash\",\"type\":\"bytes32\"},{\"name\":\"_pHash\",\"type\":\"bytes32\"},{\"name\":\"_sig\",\"type\":\"bytes\"}],\"name\":\"forwardShiftIn\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"bytes\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"shiftOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"mintAuthority\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_wrapper\",\"type\":\"address\"},{\"name\":\"authorized\",\"type\":\"bool\"}],\"name\":\"authorizeWrapper\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextShiftID\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"shifterUpgradeTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"authorizedWrapper\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_nHash\",\"type\":\"bytes32\"},{\"name\":\"_pHash\",\"type\":\"bytes32\"}],\"name\":\"sigHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_nextShifter\",\"type\":\"address\"}],\"name\":\"upgradeShifter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_nextFeeRecipient\",\"type\":\"address\"}],\"name\":\"updateFeeRecipient\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_nHash\",\"type\":\"bytes32\"},{\"name\":\"_pHash\",\"type\":\"bytes32\"},{\"name\":\"_sig\",\"type\":\"bytes\"}],\"name\":\"verifySig\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"bytes\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"forwardShiftOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_previousShifter\",\"type\":\"address\"},{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_feeRecipient\",\"type\":\"address\"},{\"name\":\"_mintAuthority\",\"type\":\"address\"},{\"name\":\"_fee\",\"type\":\"uint16\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_shiftID\",\"type\":\"uint256\"}],\"name\":\"LogShiftIn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_shiftID\",\"type\":\"uint256\"}],\"name\":\"LogShiftOut\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"updateFeeRecipient(address)\":{\"params\":{\"_nextFeeRecipient\":\"The address to start paying fees to.\"}},\"upgradeShifter(address)\":{\"params\":{\"_nextShifter\":\"The address to transfer the ownership to, or 0x0.\"}}}},\"userdoc\":{\"methods\":{\"claimTokenOwnership()\":{\"notice\":\"Claims ownership of the token passed in to the constructor. `transferStoreOwnership` must have previously been called. Anyone can call this function.\"},\"forwardShiftIn(address,uint256,bytes32,bytes32,bytes)\":{\"notice\":\"Callable by the previous Shifter if it has been upgraded.\"},\"forwardShiftOut(address,bytes,uint256)\":{\"notice\":\"Callable by the previous Shifter if it has been upgraded.\"},\"shiftIn(uint256,bytes32,bytes32,bytes)\":{\"notice\":\"shiftOut burns tokens after taking a fee for the `_feeRecipient`.\"},\"shiftOut(bytes,uint256)\":{\"notice\":\"shiftOut burns tokens after taking a fee for the `_feeRecipient`.\"},\"sigHash(address,uint256,bytes32,bytes32)\":{\"notice\":\"sigHash hashes the parameters so that they can be signed.\"},\"updateFeeRecipient(address)\":{\"notice\":\"Allow the mint authority to update the fee recipient.\"},\"upgradeShifter(address)\":{\"notice\":\"Allows the mint authority to initiate an ownership transfer of the token.\"},\"verifySig(address,uint256,bytes32,bytes32,bytes)\":{\"notice\":\"verifySig checks the the provided signature matches the provided parameters.\"}}}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol\":\"ZECShifter\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol\":{\"keccak256\":\"0x709d74b45c3da97750300a49f14891cecf0aa4508b21eb9bb7bdde941b0d2825\",\"urls\":[\"bzzr://6d127237549773fb77ab60aa2f09b82b1476ce623014d3fad7bd3f7518f067d7\"]},\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol\":{\"keccak256\":\"0x725d45e07fa2a6cb678e53617bd8c03947edf40bd985ffc83b040ab44c8b182f\",\"urls\":[\"bzzr://21ad1f2cc919e3b67cf76c8e451de35b7ef2490b6e717951a336825bb6a7a5f9\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", + "bytecode": "0x6080604052600060085534801561001557600080fd5b5060405160a080611674833981018060405260a081101561003557600080fd5b50805160208083015160408085015160608601516080909601516001600160a01b039586166000908152600390955291909320805460ff19166001179055600480549285166001600160a01b03199384161790556005805495851695831695909517909455600680549390921661ffff9094167401000000000000000000000000000000000000000002600160a01b61ffff02199093169290921790911691909117905561158c806100e86000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063ab595e0c116100ad578063ef4b41b911610071578063ef4b41b914610497578063f160d369146104bd578063f1669014146104e3578063fbc8d09e146105a8578063fc0c546a1461065e5761012c565b8063ab595e0c1461040a578063b07da53214610412578063b7f241311461041a578063dd34129914610440578063ddca3f43146104785761012c565b806352ad0d5e116100f457806352ad0d5e1461023857806371d92229146102695780638723c3771461032e5780639340b21e146103d45780639ce018c5146103dc5761012c565b806310731a65146101315780631ac945b81461013b5780631f0e95fd1461020457806346904840146102285780634ebc490c14610230575b600080fd5b610139610666565b005b6101f26004803603608081101561015157600080fd5b81359160208101359160408201359190810190608081016060820135600160201b81111561017e57600080fd5b82018360208201111561019057600080fd5b803590602001918460018302840111600160201b831117156101b157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106c6945050505050565b60408051918252519081900360200190f35b61020c6106e0565b604080516001600160a01b039092168252519081900360200190f35b61020c6106ef565b61020c6106fe565b6102556004803603602081101561024e57600080fd5b503561070d565b604080519115158252519081900360200190f35b6101f2600480360360a081101561027f57600080fd5b6001600160a01b038235169160208101359160408201359160608101359181019060a081016080820135600160201b8111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460018302840111600160201b831117156102ed57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610722945050505050565b6101f26004803603604081101561034457600080fd5b810190602081018135600160201b81111561035e57600080fd5b82018360208201111561037057600080fd5b803590602001918460018302840111600160201b8311171561039157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061078c915050565b61020c6107a0565b610139600480360360408110156103f257600080fd5b506001600160a01b03813516906020013515156107af565b6101f261083c565b6101f2610842565b6102556004803603602081101561043057600080fd5b50356001600160a01b0316610848565b6101f26004803603608081101561045657600080fd5b506001600160a01b03813516906020810135906040810135906060013561085d565b61048061095e565b6040805161ffff9092168252519081900360200190f35b610139600480360360208110156104ad57600080fd5b50356001600160a01b031661096f565b610139600480360360208110156104d357600080fd5b50356001600160a01b0316610bd0565b610255600480360360a08110156104f957600080fd5b6001600160a01b038235169160208101359160408201359160608101359181019060a081016080820135600160201b81111561053457600080fd5b82018360208201111561054657600080fd5b803590602001918460018302840111600160201b8311171561056757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c54945050505050565b6101f2600480360360608110156105be57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156105e857600080fd5b8201836020820111156105fa57600080fd5b803590602001918460018302840111600160201b8311171561061b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610e28915050565b61020c610e84565b6004805460408051600160e31b6309ce3c1902815290516001600160a01b0390921692634e71e0c892828201926000929082900301818387803b1580156106ac57600080fd5b505af11580156106c0573d6000803e3d6000fd5b50505050565b60006106d53386868686610e93565b90505b949350505050565b6001546001600160a01b031681565b6006546001600160a01b031681565b6000546001600160a01b031681565b60076020526000908152604090205460ff1681565b3360009081526003602052604081205460ff1661077357604051600160e51b62461bcd0281526004018080602001828103825260288152602001806114ea6028913960400191505060405180910390fd5b6107808686868686610e93565b90505b95945050505050565b60006107993384846111e0565b9392505050565b6005546001600160a01b031681565b6005546001600160a01b031633146108115760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b60085481565b60025481565b60036020526000908152604090205460ff1681565b600080546001600160a01b0316156109075760005460408051600160e01b63dd3412990281526001600160a01b0388811660048301526024820188905260448201879052606482018690529151919092169163dd341299916084808301926020929190829003018186803b1580156108d457600080fd5b505afa1580156108e8573d6000803e3d6000fd5b505050506040513d60208110156108fe57600080fd5b505190506106d8565b50600454604080516001600160a01b0392831660208083019190915296909216828201526060820194909452608081019290925260a0808301919091528251808303909101815260c0909101909152805191012090565b600654600160a01b900461ffff1681565b6005546001600160a01b031633146109d15760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b6001546001600160a01b0382811691161480156109f057506002544210155b15610ba857600154600080546001600160a01b0319166001600160a01b039283161790558116610adb576004805460408051600160e01b638da5cb5b028152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b158015610a6257600080fd5b505afa158015610a76573d6000803e3d6000fd5b505050506040513d6020811015610a8c57600080fd5b50516001600160a01b031614610ad657604051600160e51b62461bcd0281526004018080602001828103825260278152602001806115126027913960400191505060405180910390fd5b610ba3565b600480546000805460408051600160e01b63f2fde38b0281526001600160a01b03928316958101959095525192169263f2fde38b926024808301939282900301818387803b158015610b2c57600080fd5b505af1158015610b40573d6000803e3d6000fd5b50506000805460408051600160e01b6310731a6502815290516001600160a01b0390921694506310731a659350600480820193929182900301818387803b158015610b8a57600080fd5b505af1158015610b9e573d6000803e3d6000fd5b505050505b610bcd565b620151804201600255600180546001600160a01b0319166001600160a01b0383161790555b50565b6005546001600160a01b03163314610c325760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b031615610d85576000809054906101000a90046001600160a01b03166001600160a01b031663f166901487878787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d04578181015183820152602001610cec565b50505050905090810190601f168015610d315780820380516001836020036101000a031916815260200191505b50965050505050505060206040518083038186803b158015610d5257600080fd5b505afa158015610d66573d6000803e3d6000fd5b505050506040513d6020811015610d7c57600080fd5b50519050610783565b60208201516040830151606084015160001a6001610da58a8a8a8a61085d565b82858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610dff573d6000803e3d6000fd5b5050604051601f1901516005546001600160a01b039182169116149a9950505050505050505050565b3360009081526003602052604081205460ff16610e7957604051600160e51b62461bcd0281526004018080602001828103825260288152602001806115396028913960400191505060405180910390fd5b6106d88484846111e0565b6004546001600160a01b031681565b600080546001600160a01b031615610fa7576000809054906101000a90046001600160a01b03166001600160a01b03166371d9222987878787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610f43578181015183820152602001610f2b565b50505050905090810190601f168015610f705780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b158015610f9357600080fd5b505af1158015610d66573d6000803e3d6000fd5b60008481526007602052604090205460ff161561100e5760408051600160e51b62461bcd02815260206004820152601860248201527f6e6f6e6365206861736820616c7265616479207370656e740000000000000000604482015290519081900360640190fd5b61101b8686868686610c54565b61106f5760408051600160e51b62461bcd02815260206004820152601160248201527f696e76616c6964207369676e6174757265000000000000000000000000000000604482015290519081900360640190fd5b60065460009061271090600160a01b900461ffff168702600087815260076020526040808220805460ff19166001179055600480548251600160e01b6340c10f190281526001600160a01b038e81169382019390935295909404808c0360248701529151919550909216926340c10f19926044808301939282900301818387803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b50506004805460065460408051600160e01b6340c10f190281526001600160a01b03928316948101949094526024840187905251911693506340c10f199250604480830192600092919082900301818387803b15801561116f57600080fd5b505af1158015611183573d6000803e3d6000fd5b50505050600854876001600160a01b03167fd79c73d5d7701ff70ab30939dd980af7276ff21617d890ff2ce150f3b5ea3d94886040518082815260200191505060405180910390a360088054600101905590940395945050505050565b600080546001600160a01b0316156112ef5760008054604051600160e11b637de4684f0281526001600160a01b038781166004830190815260448301879052606060248401908152885160648501528851929094169463fbc8d09e948a948a948a94936084909201916020870191908190849084905b8381101561126e578181015183820152602001611256565b50505050905090810190601f16801561129b5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156112bc57600080fd5b505af11580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b50519050610799565b82516113455760408051600160e51b62461bcd02815260206004820152601360248201527f746f206164647265737320697320656d70747900000000000000000000000000604482015290519081900360640190fd5b60065460009061271090600160a01b900461ffff1684026004805460408051600160e21b632770a7eb0281526001600160a01b038b8116948201949094526024810189905290519490930494501691639dc29fac9160448082019260009290919082900301818387803b1580156113bb57600080fd5b505af11580156113cf573d6000803e3d6000fd5b50506004805460065460408051600160e01b6340c10f190281526001600160a01b03928316948101949094526024840187905251911693506340c10f199250604480830192600092919082900301818387803b15801561142e57600080fd5b505af1158015611442573d6000803e3d6000fd5b50505050600854846040518082805190602001908083835b602083106114795780518252601f19909201916020918201910161145a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220888b03835293519395507f1005efb915fb4efa25ffd0757ae0c14b27112a87bbfd7547daf01830cd49930994509083900301919050a3600880546001019055909103939250505056fe6e6f7420617574686f72697a656420746f206d696e74206f6e20626568616c66206f6620757365726d757374206265206f776e6572206f6620746f6b656e20746f20726573657420757067726164656e6f7420617574686f72697a656420746f206275726e206f6e20626568616c66206f662075736572a165627a7a72305820ff965a52e7f986490e5d39f63492b8c600859754b61f152b8bd39205ee062afa0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063ab595e0c116100ad578063ef4b41b911610071578063ef4b41b914610497578063f160d369146104bd578063f1669014146104e3578063fbc8d09e146105a8578063fc0c546a1461065e5761012c565b8063ab595e0c1461040a578063b07da53214610412578063b7f241311461041a578063dd34129914610440578063ddca3f43146104785761012c565b806352ad0d5e116100f457806352ad0d5e1461023857806371d92229146102695780638723c3771461032e5780639340b21e146103d45780639ce018c5146103dc5761012c565b806310731a65146101315780631ac945b81461013b5780631f0e95fd1461020457806346904840146102285780634ebc490c14610230575b600080fd5b610139610666565b005b6101f26004803603608081101561015157600080fd5b81359160208101359160408201359190810190608081016060820135600160201b81111561017e57600080fd5b82018360208201111561019057600080fd5b803590602001918460018302840111600160201b831117156101b157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106c6945050505050565b60408051918252519081900360200190f35b61020c6106e0565b604080516001600160a01b039092168252519081900360200190f35b61020c6106ef565b61020c6106fe565b6102556004803603602081101561024e57600080fd5b503561070d565b604080519115158252519081900360200190f35b6101f2600480360360a081101561027f57600080fd5b6001600160a01b038235169160208101359160408201359160608101359181019060a081016080820135600160201b8111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460018302840111600160201b831117156102ed57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610722945050505050565b6101f26004803603604081101561034457600080fd5b810190602081018135600160201b81111561035e57600080fd5b82018360208201111561037057600080fd5b803590602001918460018302840111600160201b8311171561039157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061078c915050565b61020c6107a0565b610139600480360360408110156103f257600080fd5b506001600160a01b03813516906020013515156107af565b6101f261083c565b6101f2610842565b6102556004803603602081101561043057600080fd5b50356001600160a01b0316610848565b6101f26004803603608081101561045657600080fd5b506001600160a01b03813516906020810135906040810135906060013561085d565b61048061095e565b6040805161ffff9092168252519081900360200190f35b610139600480360360208110156104ad57600080fd5b50356001600160a01b031661096f565b610139600480360360208110156104d357600080fd5b50356001600160a01b0316610bd0565b610255600480360360a08110156104f957600080fd5b6001600160a01b038235169160208101359160408201359160608101359181019060a081016080820135600160201b81111561053457600080fd5b82018360208201111561054657600080fd5b803590602001918460018302840111600160201b8311171561056757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c54945050505050565b6101f2600480360360608110156105be57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156105e857600080fd5b8201836020820111156105fa57600080fd5b803590602001918460018302840111600160201b8311171561061b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610e28915050565b61020c610e84565b6004805460408051600160e31b6309ce3c1902815290516001600160a01b0390921692634e71e0c892828201926000929082900301818387803b1580156106ac57600080fd5b505af11580156106c0573d6000803e3d6000fd5b50505050565b60006106d53386868686610e93565b90505b949350505050565b6001546001600160a01b031681565b6006546001600160a01b031681565b6000546001600160a01b031681565b60076020526000908152604090205460ff1681565b3360009081526003602052604081205460ff1661077357604051600160e51b62461bcd0281526004018080602001828103825260288152602001806114ea6028913960400191505060405180910390fd5b6107808686868686610e93565b90505b95945050505050565b60006107993384846111e0565b9392505050565b6005546001600160a01b031681565b6005546001600160a01b031633146108115760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b60085481565b60025481565b60036020526000908152604090205460ff1681565b600080546001600160a01b0316156109075760005460408051600160e01b63dd3412990281526001600160a01b0388811660048301526024820188905260448201879052606482018690529151919092169163dd341299916084808301926020929190829003018186803b1580156108d457600080fd5b505afa1580156108e8573d6000803e3d6000fd5b505050506040513d60208110156108fe57600080fd5b505190506106d8565b50600454604080516001600160a01b0392831660208083019190915296909216828201526060820194909452608081019290925260a0808301919091528251808303909101815260c0909101909152805191012090565b600654600160a01b900461ffff1681565b6005546001600160a01b031633146109d15760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b6001546001600160a01b0382811691161480156109f057506002544210155b15610ba857600154600080546001600160a01b0319166001600160a01b039283161790558116610adb576004805460408051600160e01b638da5cb5b028152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b158015610a6257600080fd5b505afa158015610a76573d6000803e3d6000fd5b505050506040513d6020811015610a8c57600080fd5b50516001600160a01b031614610ad657604051600160e51b62461bcd0281526004018080602001828103825260278152602001806115126027913960400191505060405180910390fd5b610ba3565b600480546000805460408051600160e01b63f2fde38b0281526001600160a01b03928316958101959095525192169263f2fde38b926024808301939282900301818387803b158015610b2c57600080fd5b505af1158015610b40573d6000803e3d6000fd5b50506000805460408051600160e01b6310731a6502815290516001600160a01b0390921694506310731a659350600480820193929182900301818387803b158015610b8a57600080fd5b505af1158015610b9e573d6000803e3d6000fd5b505050505b610bcd565b620151804201600255600180546001600160a01b0319166001600160a01b0383161790555b50565b6005546001600160a01b03163314610c325760408051600160e51b62461bcd02815260206004820152601660248201527f6d757374206265206d696e7420617574686f7269747900000000000000000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b031615610d85576000809054906101000a90046001600160a01b03166001600160a01b031663f166901487878787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d04578181015183820152602001610cec565b50505050905090810190601f168015610d315780820380516001836020036101000a031916815260200191505b50965050505050505060206040518083038186803b158015610d5257600080fd5b505afa158015610d66573d6000803e3d6000fd5b505050506040513d6020811015610d7c57600080fd5b50519050610783565b60208201516040830151606084015160001a6001610da58a8a8a8a61085d565b82858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610dff573d6000803e3d6000fd5b5050604051601f1901516005546001600160a01b039182169116149a9950505050505050505050565b3360009081526003602052604081205460ff16610e7957604051600160e51b62461bcd0281526004018080602001828103825260288152602001806115396028913960400191505060405180910390fd5b6106d88484846111e0565b6004546001600160a01b031681565b600080546001600160a01b031615610fa7576000809054906101000a90046001600160a01b03166001600160a01b03166371d9222987878787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610f43578181015183820152602001610f2b565b50505050905090810190601f168015610f705780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b158015610f9357600080fd5b505af1158015610d66573d6000803e3d6000fd5b60008481526007602052604090205460ff161561100e5760408051600160e51b62461bcd02815260206004820152601860248201527f6e6f6e6365206861736820616c7265616479207370656e740000000000000000604482015290519081900360640190fd5b61101b8686868686610c54565b61106f5760408051600160e51b62461bcd02815260206004820152601160248201527f696e76616c6964207369676e6174757265000000000000000000000000000000604482015290519081900360640190fd5b60065460009061271090600160a01b900461ffff168702600087815260076020526040808220805460ff19166001179055600480548251600160e01b6340c10f190281526001600160a01b038e81169382019390935295909404808c0360248701529151919550909216926340c10f19926044808301939282900301818387803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b50506004805460065460408051600160e01b6340c10f190281526001600160a01b03928316948101949094526024840187905251911693506340c10f199250604480830192600092919082900301818387803b15801561116f57600080fd5b505af1158015611183573d6000803e3d6000fd5b50505050600854876001600160a01b03167fd79c73d5d7701ff70ab30939dd980af7276ff21617d890ff2ce150f3b5ea3d94886040518082815260200191505060405180910390a360088054600101905590940395945050505050565b600080546001600160a01b0316156112ef5760008054604051600160e11b637de4684f0281526001600160a01b038781166004830190815260448301879052606060248401908152885160648501528851929094169463fbc8d09e948a948a948a94936084909201916020870191908190849084905b8381101561126e578181015183820152602001611256565b50505050905090810190601f16801561129b5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156112bc57600080fd5b505af11580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b50519050610799565b82516113455760408051600160e51b62461bcd02815260206004820152601360248201527f746f206164647265737320697320656d70747900000000000000000000000000604482015290519081900360640190fd5b60065460009061271090600160a01b900461ffff1684026004805460408051600160e21b632770a7eb0281526001600160a01b038b8116948201949094526024810189905290519490930494501691639dc29fac9160448082019260009290919082900301818387803b1580156113bb57600080fd5b505af11580156113cf573d6000803e3d6000fd5b50506004805460065460408051600160e01b6340c10f190281526001600160a01b03928316948101949094526024840187905251911693506340c10f199250604480830192600092919082900301818387803b15801561142e57600080fd5b505af1158015611442573d6000803e3d6000fd5b50505050600854846040518082805190602001908083835b602083106114795780518252601f19909201916020918201910161145a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220888b03835293519395507f1005efb915fb4efa25ffd0757ae0c14b27112a87bbfd7547daf01830cd49930994509083900301919050a3600880546001019055909103939250505056fe6e6f7420617574686f72697a656420746f206d696e74206f6e20626568616c66206f6620757365726d757374206265206f776e6572206f6620746f6b656e20746f20726573657420757067726164656e6f7420617574686f72697a656420746f206275726e206f6e20626568616c66206f662075736572a165627a7a72305820ff965a52e7f986490e5d39f63492b8c600859754b61f152b8bd39205ee062afa0029", + "sourceMap": "7940:251:7:-;;;1326:1;1297:30;;7977:212;8:9:-1;5:2;;;30:1;27;20:12;5:2;7977:212:7;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;7977:212:7;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1825:35:7;;;;;;;:17;:35;;;;;;;:42;;-1:-1:-1;;1825:42:7;1863:4;1825:42;;;1877:5;:14;;;;;-1:-1:-1;;;;;;1877:14:7;;;;;;1901:13;:30;;;;;;;;;;;;;;;1941:3;:10;;1961:28;;;;1941:10;;;;;;-1:-1:-1;;;;;;1941:10:7;;;;;;;1961:28;;;;;;;;;7940:251;;;;;;", + "deployedSourceMap": "7940:251:7:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7940:251:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2200:77;;;:::i;:::-;;4009:185;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;4009:185:7;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4009:185:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4009:185:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4009:185:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4009:185:7;;-1:-1:-1;4009:185:7;;-1:-1:-1;;;;;4009:185:7:i;:::-;;;;;;;;;;;;;;;;513:33;;;:::i;:::-;;;;-1:-1:-1;;;;;513:33:7;;;;;;;;;;;;;;1104:27;;;:::i;481:26::-;;;:::i;1253:37::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1253:37:7;;:::i;:::-;;;;;;;;;;;;;;;;;;4274:290;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;4274:290:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4274:290:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4274:290:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4274:290:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4274:290:7;;-1:-1:-1;4274:290:7;;-1:-1:-1;;;;;4274:290:7:i;5475:137::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5475:137:7;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;5475:137:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5475:137:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;5475:137:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;5475:137:7;;-1:-1:-1;;5475:137:7;;;-1:-1:-1;5475:137:7;;-1:-1:-1;;5475:137:7:i;966:28::-;;;:::i;2283:143::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2283:143:7;;;;;;;;;;:::i;1297:30::-;;;:::i;552:33::-;;;:::i;730:48::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;730:48:7;-1:-1:-1;;;;;730:48:7;;:::i;7336:310::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;7336:310:7;;;;;;;;;;;;;;;;;;:::i;1179:17::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2891:1030;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2891:1030:7;-1:-1:-1;;;;;2891:1030:7;;:::i;2572:129::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2572:129:7;-1:-1:-1;;;;;2572:129:7;;:::i;6627:629::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;6627:629:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6627:629:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6627:629:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;6627:629:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;6627:629:7;;-1:-1:-1;6627:629:7;;-1:-1:-1;;;;;6627:629:7:i;5692:246::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;5692:246:7;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;5692:246:7;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5692:246:7;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;5692:246:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;5692:246:7;;-1:-1:-1;;5692:246:7;;;-1:-1:-1;5692:246:7;;-1:-1:-1;;5692:246:7:i;857:25::-;;;:::i;2200:77::-;2248:5;;;:22;;;-1:-1:-1;;;;;2248:22:7;;;;-1:-1:-1;;;;;2248:5:7;;;;:20;;:22;;;;:5;;:22;;;;;;:5;;:22;;;5:2:-1;;;;30:1;27;20:12;5:2;2248:22:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2248:22:7;;;;2200:77::o;4009:185::-;4110:7;4136:51;4145:10;4157:7;4166:6;4174;4182:4;4136:8;:51::i;:::-;4129:58;;4009:185;;;;;;;:::o;513:33::-;;;-1:-1:-1;;;;;513:33:7;;:::o;1104:27::-;;;-1:-1:-1;;;;;1104:27:7;;:::o;481:26::-;;;-1:-1:-1;;;;;481:26:7;;:::o;1253:37::-;;;;;;;;;;;;;;;:::o;4274:290::-;4440:10;4395:7;4422:29;;;:17;:29;;;;;;;;4414:82;;;;-1:-1:-1;;;;;4414:82:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4513:44;4522:3;4527:7;4536:6;4544;4552:4;4513:8;:44::i;:::-;4506:51;;4274:290;;;;;;;;:::o;5475:137::-;5544:7;5570:35;5580:10;5592:3;5597:7;5570:9;:35::i;:::-;5563:42;5475:137;-1:-1:-1;;;5475:137:7:o;966:28::-;;;-1:-1:-1;;;;;966:28:7;;:::o;2283:143::-;1625:13;;-1:-1:-1;;;;;1625:13:7;1611:10;:27;1603:62;;;;;-1:-1:-1;;;;;1603:62:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2379:27:7;;;;;;;;:17;:27;;;;;:40;;-1:-1:-1;;2379:40:7;;;;;;;;;;2283:143::o;1297:30::-;;;;:::o;552:33::-;;;;:::o;730:48::-;;;;;;;;;;;;;;;:::o;7336:310::-;7436:7;7459:11;;-1:-1:-1;;;;;7459:11:7;:27;7455:101;;7504:11;;7496:58;;;-1:-1:-1;;;;;7496:58:7;;-1:-1:-1;;;;;7496:58:7;;;;;;;;;;;;;;;;;;;;;;;;;;;7504:11;;;;;7496:28;;:58;;;;;;;;;;;;;;7504:11;7496:58;;;5:2:-1;;;;30:1;27;20:12;5:2;7496:58:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7496:58:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7496:58:7;;-1:-1:-1;7489:65:7;;7455:101;-1:-1:-1;7601:5:7;;7582:56;;;-1:-1:-1;;;;;7601:5:7;;;7582:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;7582:56:7;;;;;;;7572:67;;;;;;7336:310::o;1179:17::-;;;-1:-1:-1;;;1179:17:7;;;;;:::o;2891:1030::-;1625:13;;-1:-1:-1;;;;;1625:13:7;1611:10;:27;1603:62;;;;;-1:-1:-1;;;;;1603:62:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;3057:18;;-1:-1:-1;;;;;3041:34:7;;;3057:18;;3041:34;:75;;;;;3098:18;;3079:15;:37;;3041:75;3037:878;;;3307:18;;;3293:32;;-1:-1:-1;;;;;;3293:32:7;-1:-1:-1;;;;;3307:18:7;;;3293:32;;;3344:28;;3340:293;;3400:5;;;:13;;;-1:-1:-1;;;;;3400:13:7;;;;3425:4;;-1:-1:-1;;;;;3400:5:7;;;;:11;;:13;;;;;;;;;;;;;:5;:13;;;5:2:-1;;;;30:1;27;20:12;5:2;3400:13:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3400:13:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3400:13:7;-1:-1:-1;;;;;3400:30:7;;3392:82;;;;-1:-1:-1;;;;;3392:82:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3340:293;;;3513:5;;;;3545:11;;3513:45;;;-1:-1:-1;;;;;3513:45:7;;-1:-1:-1;;;;;3545:11:7;;;3513:45;;;;;;;;:5;;;:23;;:45;;;;;:5;:45;;;;;:5;;:45;;;5:2:-1;;;;30:1;27;20:12;5:2;3513:45:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;3584:11:7;;;3576:42;;;-1:-1:-1;;;;;3576:42:7;;;;-1:-1:-1;;;;;3584:11:7;;;;-1:-1:-1;3576:40:7;;-1:-1:-1;3576:42:7;;;;;3584:11;3576:42;;;;;;3584:11;;3576:42;;;5:2:-1;;;;30:1;27;20:12;5:2;3576:42:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3576:42:7;;;;3340:293;3037:878;;;630:19;3820:15;:37;3799:18;:58;3871:18;:33;;-1:-1:-1;;;;;;3871:33:7;-1:-1:-1;;;;;3871:33:7;;;;;3037:878;2891:1030;:::o;2572:129::-;1625:13;;-1:-1:-1;;;;;1625:13:7;1611:10;:27;1603:62;;;;;-1:-1:-1;;;;;1603:62:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;2662:12;:32;;-1:-1:-1;;;;;;2662:32:7;-1:-1:-1;;;;;2662:32:7;;;;;;;;;;2572:129::o;6627:629::-;6748:4;6768:11;;-1:-1:-1;;;;;6768:11:7;:27;6764:109;;6813:11;;;;;;;;;-1:-1:-1;;;;;6813:11:7;-1:-1:-1;;;;;6805:30:7;;6836:3;6841:7;6850:6;6858;6866:4;6805:66;;;;;;;;;;;;;-1:-1:-1;;;;;6805:66:7;-1:-1:-1;;;;;6805:66:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;6805:66:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6805:66:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6805:66:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6805:66:7;;-1:-1:-1;6798:73:7;;6764:109;7053:4;7043:15;;7037:22;7093:4;7083:15;;7077:22;7141:4;7131:15;;7125:22;6883:9;7117:31;7192:57;7202:37;7210:3;7215:7;7224:6;7232;7202:7;:37::i;:::-;7241:1;7244;7247;7192:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;7192:57:7;;-1:-1:-1;;7192:57:7;;7175:13;;-1:-1:-1;;;;;7175:74:7;;;:13;;:74;;6627:629;-1:-1:-1;;;;;;;;;;6627:629:7:o;5692:246::-;5828:10;5783:7;5810:29;;;:17;:29;;;;;;;;5802:82;;;;-1:-1:-1;;;;;5802:82:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5901:30;5911:5;5918:3;5923:7;5901:9;:30::i;857:25::-;;;-1:-1:-1;;;;;857:25:7;;:::o;4684:703::-;4801:7;4824:11;;-1:-1:-1;;;;;4824:11:7;:27;4820:114;;4869:11;;;;;;;;;-1:-1:-1;;;;;4869:11:7;-1:-1:-1;;;;;4861:35:7;;4897:3;4902:7;4911:6;4919;4927:4;4861:71;;;;;;;;;;;;;-1:-1:-1;;;;;4861:71:7;-1:-1:-1;;;;;4861:71:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4861:71:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4861:71:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;4820:114:7;4952:14;;;;:6;:14;;;;;;;;:23;4944:60;;;;;-1:-1:-1;;;;;4944:60:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;5022:45;5032:3;5037:7;5046:6;5054;5062:4;5022:9;:45::i;:::-;5014:75;;;;;-1:-1:-1;;;;;5014:75:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;5132:3;;5099:19;;5137:5;;-1:-1:-1;;;5132:3:7;;;;5122:13;;5152:14;;;;:6;:14;;;;;;:21;;-1:-1:-1;;5152:21:7;5169:4;5152:21;;;5183:5;;;:36;;-1:-1:-1;;;;;5183:36:7;;-1:-1:-1;;;;;5183:36:7;;;;;;;;;;5121:21;;;;5199:19;;;5183:36;;;;;;5121:21;;-1:-1:-1;5183:5:7;;;;:10;;:36;;;;;5152:14;5183:36;;;;;5152:14;5183:5;:36;;;5:2:-1;;;;30:1;27;20:12;5:2;5183:36:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;5229:5:7;;;5240:12;;5229:37;;;-1:-1:-1;;;;;5229:37:7;;-1:-1:-1;;;;;5240:12:7;;;5229:37;;;;;;;;;;;;;;:5;;;-1:-1:-1;5229:10:7;;-1:-1:-1;5229:37:7;;;;;:5;;:37;;;;;;;:5;;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;5229:37:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5229:37:7;;;;5306:11;;5292:3;-1:-1:-1;;;;;5281:37:7;;5297:7;5281:37;;;;;;;;;;;;;;;;;;5328:11;:16;;5343:1;5328:16;;;5361:19;;;;4684:703;-1:-1:-1;;;;;4684:703:7:o;5944:576::-;6031:7;6054:11;;-1:-1:-1;;;;;6054:11:7;:27;6050:100;;6099:11;;;6091:57;;-1:-1:-1;;;;;6091:57:7;;-1:-1:-1;;;;;6091:57:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6099:11;;;;;6091:36;;6128:5;;6135:3;;6140:7;;6091:57;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;6091:57:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6091:57:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6091:57:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6091:57:7;;-1:-1:-1;6084:64:7;;6050:100;6167:10;;6159:47;;;;;-1:-1:-1;;;;;6159:47:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;6250:3;;6217:19;;6255:5;;-1:-1:-1;;;6250:3:7;;;;6240:13;;6312:5;;;:26;;;-1:-1:-1;;;;;6312:26:7;;-1:-1:-1;;;;;6312:26:7;;;;;;;;;;;;;;;;;;6239:21;;;;;-1:-1:-1;6312:5:7;;:10;;:26;;;;;:5;;:26;;;;;;;;:5;;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;6312:26:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;6348:5:7;;;6359:12;;6348:37;;;-1:-1:-1;;;;;6348:37:7;;-1:-1:-1;;;;;6359:12:7;;;6348:37;;;;;;;;;;;;;;:5;;;-1:-1:-1;6348:10:7;;-1:-1:-1;6348:37:7;;;;;:5;;:37;;;;;;;:5;;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;6348:37:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6348:37:7;;;;6439:11;;6413:3;6401:50;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;6401:50:7;;;;;;;;;;;;6418:19;;;6401:50;;;;;;-1:-1:-1;6401:50:7;;-1:-1:-1;6401:50:7;;;;;;;-1:-1:-1;6401:50:7;6461:11;:16;;6476:1;6461:16;;;6494:19;;;;5944:576;-1:-1:-1;;;5944:576:7:o", + "source": "pragma solidity ^0.5.8;\n\nimport \"./ERC20Shifted.sol\";\n\ncontract Shifter {\n /// @notice Shifter can be upgraded by setting a `nextShifter`. The\n /// forwarding address is only set after a delay has passed.\n /// This upgradability pattern is not as sophisticated as a DelegateProxy,\n /// but is less error prone. It's downsides are higher gas fees when using\n /// the old address, and every function needing to forward the call,\n /// including storage getters.\n address public nextShifter;\n address public pendingNextShifter;\n uint256 public shifterUpgradeTime;\n uint256 constant shifterUpgradeDelay = 0.5 days + 0.5 days;\n\n /// @notice A set of contracts that can call burn on behalf of a user\n mapping (address=>bool) public authorizedWrapper;\n\n /// @notice Each Shifter token is tied to a specific shifted token.\n ERC20Shifted public token;\n\n /// @notice The mintAuthority is an address that can sign mint requests.\n address public mintAuthority;\n\n /// @notice When tokens a burnt, a portion of the tokens are forwarded to\n /// a fee recipient.\n address public feeRecipient;\n\n /// @notice The burning fee in bips.\n uint16 public fee;\n\n /// @notice Each nHash can only be seen once.\n mapping (bytes32=>bool) public status;\n\n uint256 public nextShiftID = 0;\n\n event LogShiftIn(address indexed _to, uint256 _amount, uint256 indexed _shiftID);\n event LogShiftOut(bytes indexed _to, uint256 _amount, uint256 indexed _shiftID);\n\n /// @notice Only allow the Darknode Payment contract.\n modifier onlyMintAuthority() {\n require(msg.sender == mintAuthority, \"must be mint authority\");\n _;\n }\n\n constructor(address _previousShifter, ERC20Shifted _token, address _feeRecipient, address _mintAuthority, uint16 _fee) public {\n authorizedWrapper[_previousShifter] = true;\n token = _token;\n mintAuthority = _mintAuthority;\n fee = _fee;\n feeRecipient = _feeRecipient;\n }\n\n /// @notice Claims ownership of the token passed in to the constructor.\n /// `transferStoreOwnership` must have previously been called.\n /// Anyone can call this function.\n function claimTokenOwnership() public {\n token.claimOwnership();\n }\n\n function authorizeWrapper(address _wrapper, bool authorized) public onlyMintAuthority {\n authorizedWrapper[_wrapper] = authorized;\n }\n\n /// @notice Allow the mint authority to update the fee recipient.\n /// @param _nextFeeRecipient The address to start paying fees to.\n function updateFeeRecipient(address _nextFeeRecipient) public onlyMintAuthority {\n feeRecipient = _nextFeeRecipient;\n }\n\n /// @notice Allows the mint authority to initiate an ownership transfer of\n /// the token.\n /// @param _nextShifter The address to transfer the ownership to, or 0x0.\n function upgradeShifter(address _nextShifter) public onlyMintAuthority {\n /* solium-disable-next-line security/no-block-members */\n if (_nextShifter == pendingNextShifter && block.timestamp >= shifterUpgradeTime) {\n // If the delay has passed and the next shifter isn't been changed,\n // transfer the token to the next shifter and start pointing to it.\n\n nextShifter = pendingNextShifter;\n\n if (_nextShifter == address(0x0)) {\n require(token.owner() == address(this), \"must be owner of token to reset upgrade\");\n } else {\n token.transferOwnership(address(nextShifter));\n Shifter(nextShifter).claimTokenOwnership();\n }\n } else {\n // Start a timer so allow the shifter to be upgraded.\n\n /* solium-disable-next-line security/no-block-members */\n shifterUpgradeTime = block.timestamp + shifterUpgradeDelay;\n pendingNextShifter = _nextShifter;\n }\n }\n\n /// @notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.\n function shiftIn(uint256 _amount, bytes32 _nHash, bytes32 _pHash, bytes memory _sig) public returns (uint256) {\n return _shiftIn(msg.sender, _amount, _nHash, _pHash, _sig);\n }\n\n /// @notice Callable by the previous Shifter if it has been upgraded.\n function forwardShiftIn(address _to, uint256 _amount, bytes32 _nHash, bytes32 _pHash, bytes memory _sig) public returns (uint256) {\n require(authorizedWrapper[msg.sender], \"not authorized to mint on behalf of user\");\n return _shiftIn(_to, _amount, _nHash, _pHash, _sig);\n }\n\n /// @notice shiftIn mints new tokens after verifying the signature and\n /// transfers the tokens to `_to`.\n function _shiftIn(address _to, uint256 _amount, bytes32 _nHash, bytes32 _pHash, bytes memory _sig) internal returns (uint256) {\n if (nextShifter != address(0x0)) {return Shifter(nextShifter).forwardShiftIn(_to, _amount, _nHash, _pHash, _sig);}\n\n require(status[_nHash] == false, \"nonce hash already spent\");\n require(verifySig(_to, _amount, _nHash, _pHash, _sig), \"invalid signature\");\n uint256 absoluteFee = (_amount * fee)/10000;\n status[_nHash] = true;\n token.mint(_to, _amount-absoluteFee);\n token.mint(feeRecipient, absoluteFee);\n emit LogShiftIn(_to, _amount, nextShiftID);\n nextShiftID += 1;\n return _amount-absoluteFee;\n }\n\n /// @notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.\n function shiftOut(bytes memory _to, uint256 _amount) public returns (uint256) {\n return _shiftOut(msg.sender, _to, _amount);\n }\n\n /// @notice Callable by the previous Shifter if it has been upgraded.\n function forwardShiftOut(address _from, bytes memory _to, uint256 _amount) public returns (uint256) {\n require(authorizedWrapper[msg.sender], \"not authorized to burn on behalf of user\");\n return _shiftOut(_from, _to, _amount);\n }\n\n function _shiftOut(address _from, bytes memory _to, uint256 _amount) internal returns (uint256) {\n if (nextShifter != address(0x0)) {return Shifter(nextShifter).forwardShiftOut(_from, _to, _amount);}\n require(_to.length != 0, \"to address is empty\");\n\n uint256 absoluteFee = (_amount * fee)/10000;\n\n // Burn full amount and mint fee\n token.burn(_from, _amount);\n token.mint(feeRecipient, absoluteFee);\n\n emit LogShiftOut(_to, _amount-absoluteFee, nextShiftID);\n nextShiftID += 1;\n return _amount-absoluteFee;\n }\n\n /// @notice verifySig checks the the provided signature matches the provided\n /// parameters.\n function verifySig(address _to, uint256 _amount, bytes32 _nHash, bytes32 _pHash, bytes memory _sig) public view returns (bool) {\n if (nextShifter != address(0x0)) {return Shifter(nextShifter).verifySig(_to, _amount, _nHash, _pHash, _sig);}\n\n bytes32 r;\n bytes32 s;\n uint8 v;\n /* solium-disable-next-line */ /* solhint-disable-next-line */\n assembly {\n r := mload(add(_sig, 0x20))\n s := mload(add(_sig, 0x40))\n v := byte(0, mload(add(_sig, 0x60)))\n }\n\n return mintAuthority == ecrecover(sigHash(_to, _amount, _nHash, _pHash), v, r, s);\n }\n\n /// @notice sigHash hashes the parameters so that they can be signed.\n function sigHash(address _to, uint256 _amount, bytes32 _nHash, bytes32 _pHash) public view returns (bytes32) {\n if (nextShifter != address(0x0)) {return Shifter(nextShifter).sigHash(_to, _amount, _nHash, _pHash);}\n return keccak256(abi.encode(address(token), _to, _amount, _nHash, _pHash));\n }\n}\n\n/* solium-disable no-empty-blocks */\ncontract BTCShifter is Shifter {\n constructor(address _previousShifter, ERC20Shifted _token, address _feeRecipient, address _mintAuthority, uint16 _fee)\n Shifter(_previousShifter, _token, _feeRecipient, _mintAuthority, _fee) public {\n }\n}\n\ncontract ZECShifter is Shifter {\n constructor(address _previousShifter, ERC20Shifted _token, address _feeRecipient, address _mintAuthority, uint16 _fee)\n Shifter(_previousShifter, _token, _feeRecipient, _mintAuthority, _fee) public {\n }\n}", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol", + "exportedSymbols": { + "BTCShifter": [ + 3465 + ], + "Shifter": [ + 3441 + ], + "ZECShifter": [ + 3489 + ] + }, + "id": 3490, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2867, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "file": "./ERC20Shifted.sol", + "id": 2868, + "nodeType": "ImportDirective", + "scope": 3490, + "sourceUnit": 2866, + "src": "25:28:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3441, + "linearizedBaseContracts": [ + 3441 + ], + "name": "Shifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2870, + "name": "nextShifter", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "481:26:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2869, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "481:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2872, + "name": "pendingNextShifter", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "513:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2871, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "513:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2874, + "name": "shifterUpgradeTime", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "552:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2873, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "552:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 2879, + "name": "shifterUpgradeDelay", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "591:58:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2875, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "591:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "302e35", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "630:8:7", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_43200_by_1", + "typeString": "int_const 43200" + }, + "value": "0.5" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "302e35", + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "641:8:7", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_43200_by_1", + "typeString": "int_const 43200" + }, + "value": "0.5" + }, + "src": "630:19:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2883, + "name": "authorizedWrapper", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "730:48:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 2882, + "keyType": { + "id": 2880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "739:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "730:23:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 2881, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "748:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2885, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "857:25:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 2884, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "857:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2887, + "name": "mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "966:28:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2886, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2889, + "name": "feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1104:27:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1104:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2891, + "name": "fee", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1179:17:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2890, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1179:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2895, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1253:37:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 2894, + "keyType": { + "id": 2892, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1262:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1253:23:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 2893, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1271:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2898, + "name": "nextShiftID", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1297:30:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1297:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 2897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1326:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 2906, + "name": "LogShiftIn", + "nodeType": "EventDefinition", + "parameters": { + "id": 2905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2900, + "indexed": true, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1351:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2899, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1351:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2902, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1372:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2901, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1372:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2904, + "indexed": true, + "name": "_shiftID", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1389:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2903, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1389:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1350:64:7" + }, + "src": "1334:81:7" + }, + { + "anonymous": false, + "documentation": null, + "id": 2914, + "name": "LogShiftOut", + "nodeType": "EventDefinition", + "parameters": { + "id": 2913, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2908, + "indexed": true, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1438:17:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2907, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1438:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2910, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1457:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2909, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1457:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2912, + "indexed": true, + "name": "_shiftID", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1474:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2911, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1474:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1437:62:7" + }, + "src": "1420:80:7" + }, + { + "body": { + "id": 2925, + "nodeType": "Block", + "src": "1593:90:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "1611:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1611:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2919, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "1625:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1611:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206d696e7420617574686f72697479", + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1640:24:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_08f5b9e01a8f2dc96554e860d9dabb9526a5f2869857ae4bb74eefaa701ebf43", + "typeString": "literal_string \"must be mint authority\"" + }, + "value": "must be mint authority" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_08f5b9e01a8f2dc96554e860d9dabb9526a5f2869857ae4bb74eefaa701ebf43", + "typeString": "literal_string \"must be mint authority\"" + } + ], + "id": 2916, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "1603:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1603:62:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2923, + "nodeType": "ExpressionStatement", + "src": "1603:62:7" + }, + { + "id": 2924, + "nodeType": "PlaceholderStatement", + "src": "1675:1:7" + } + ] + }, + "documentation": "@notice Only allow the Darknode Payment contract.", + "id": 2926, + "name": "onlyMintAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 2915, + "nodeType": "ParameterList", + "parameters": [], + "src": "1590:2:7" + }, + "src": "1564:119:7", + "visibility": "internal" + }, + { + "body": { + "id": 2961, + "nodeType": "Block", + "src": "1815:181:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2939, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "1825:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2941, + "indexExpression": { + "argumentTypes": null, + "id": 2940, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2928, + "src": "1843:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1825:35:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1863:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1825:42:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "1825:42:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2945, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "1877:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2946, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2930, + "src": "1885:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "src": "1877:14:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2948, + "nodeType": "ExpressionStatement", + "src": "1877:14:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2949, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "1901:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2950, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2934, + "src": "1917:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1901:30:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2952, + "nodeType": "ExpressionStatement", + "src": "1901:30:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2953, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "1941:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2954, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "1947:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "1941:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 2956, + "nodeType": "ExpressionStatement", + "src": "1941:10:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2957, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "1961:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2958, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2932, + "src": "1976:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1961:28:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2960, + "nodeType": "ExpressionStatement", + "src": "1961:28:7" + } + ] + }, + "documentation": null, + "id": 2962, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2928, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1701:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1701:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2930, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1727:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 2929, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "1727:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2932, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1748:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2931, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1748:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2934, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1771:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2933, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1771:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2936, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1795:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2935, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1795:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1700:107:7" + }, + "returnParameters": { + "id": 2938, + "nodeType": "ParameterList", + "parameters": [], + "src": "1815:0:7" + }, + "scope": 3441, + "src": "1689:307:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2970, + "nodeType": "Block", + "src": "2238:39:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2965, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "2248:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "2248:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2248:22:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2969, + "nodeType": "ExpressionStatement", + "src": "2248:22:7" + } + ] + }, + "documentation": "@notice Claims ownership of the token passed in to the constructor.\n `transferStoreOwnership` must have previously been called.\n Anyone can call this function.", + "id": 2971, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimTokenOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2963, + "nodeType": "ParameterList", + "parameters": [], + "src": "2228:2:7" + }, + "returnParameters": { + "id": 2964, + "nodeType": "ParameterList", + "parameters": [], + "src": "2238:0:7" + }, + "scope": 3441, + "src": "2200:77:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2986, + "nodeType": "Block", + "src": "2369:57:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2980, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "2379:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2982, + "indexExpression": { + "argumentTypes": null, + "id": 2981, + "name": "_wrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2973, + "src": "2397:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2379:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2983, + "name": "authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2975, + "src": "2409:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2379:40:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2985, + "nodeType": "ExpressionStatement", + "src": "2379:40:7" + } + ] + }, + "documentation": null, + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2978, + "modifierName": { + "argumentTypes": null, + "id": 2977, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2351:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2351:17:7" + } + ], + "name": "authorizeWrapper", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2973, + "name": "_wrapper", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2309:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2972, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2309:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2975, + "name": "authorized", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2327:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2974, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2327:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2308:35:7" + }, + "returnParameters": { + "id": 2979, + "nodeType": "ParameterList", + "parameters": [], + "src": "2369:0:7" + }, + "scope": 3441, + "src": "2283:143:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2998, + "nodeType": "Block", + "src": "2652:49:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2994, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "2662:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2995, + "name": "_nextFeeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2989, + "src": "2677:17:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2662:32:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2997, + "nodeType": "ExpressionStatement", + "src": "2662:32:7" + } + ] + }, + "documentation": "@notice Allow the mint authority to update the fee recipient.\n @param _nextFeeRecipient The address to start paying fees to.", + "id": 2999, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2992, + "modifierName": { + "argumentTypes": null, + "id": 2991, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2634:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2634:17:7" + } + ], + "name": "updateFeeRecipient", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2989, + "name": "_nextFeeRecipient", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "2600:25:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2988, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2600:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2599:27:7" + }, + "returnParameters": { + "id": 2993, + "nodeType": "ParameterList", + "parameters": [], + "src": "2652:0:7" + }, + "scope": 3441, + "src": "2572:129:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3065, + "nodeType": "Block", + "src": "2962:959:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3006, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3041:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3007, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3057:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3041:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3009, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3079:5:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3079:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3011, + "name": "shifterUpgradeTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2874, + "src": "3098:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3079:37:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3041:75:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3063, + "nodeType": "Block", + "src": "3649:266:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3052, + "name": "shifterUpgradeTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2874, + "src": "3799:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3053, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3820:5:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3820:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 3055, + "name": "shifterUpgradeDelay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2879, + "src": "3838:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3820:37:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3799:58:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3058, + "nodeType": "ExpressionStatement", + "src": "3799:58:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3059, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3871:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3060, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3892:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3871:33:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3062, + "nodeType": "ExpressionStatement", + "src": "3871:33:7" + } + ] + }, + "id": 3064, + "nodeType": "IfStatement", + "src": "3037:878:7", + "trueBody": { + "id": 3051, + "nodeType": "Block", + "src": "3118:525:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3014, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3293:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3015, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3307:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3293:32:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3017, + "nodeType": "ExpressionStatement", + "src": "3293:32:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3018, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3344:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3020, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3368:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3360:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3360:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3344:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3049, + "nodeType": "Block", + "src": "3495:138:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3039, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3545:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3537:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3537:20:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3035, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "3513:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3661, + "src": "3513:23:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3513:45:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3042, + "nodeType": "ExpressionStatement", + "src": "3513:45:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3044, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3584:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3043, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "3576:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3576:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimTokenOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 2971, + "src": "3576:40:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3576:42:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3048, + "nodeType": "ExpressionStatement", + "src": "3576:42:7" + } + ] + }, + "id": 3050, + "nodeType": "IfStatement", + "src": "3340:293:7", + "trueBody": { + "id": 3034, + "nodeType": "Block", + "src": "3374:115:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3024, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "3400:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 3597, + "src": "3400:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3400:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3028, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7264, + "src": "3425:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + ], + "id": 3027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3417:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3417:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3400:30:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206f776e6572206f6620746f6b656e20746f2072657365742075706772616465", + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3432:41:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_299cb3bd138e36f9f827591c27e77de5560b906cd865ed5195ddc1f0aae46f15", + "typeString": "literal_string \"must be owner of token to reset upgrade\"" + }, + "value": "must be owner of token to reset upgrade" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_299cb3bd138e36f9f827591c27e77de5560b906cd865ed5195ddc1f0aae46f15", + "typeString": "literal_string \"must be owner of token to reset upgrade\"" + } + ], + "id": 3023, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3392:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3033, + "nodeType": "ExpressionStatement", + "src": "3392:82:7" + } + ] + } + } + ] + } + } + ] + }, + "documentation": "@notice Allows the mint authority to initiate an ownership transfer of\n the token.\n @param _nextShifter The address to transfer the ownership to, or 0x0.", + "id": 3066, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3004, + "modifierName": { + "argumentTypes": null, + "id": 3003, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2944:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2944:17:7" + } + ], + "name": "upgradeShifter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3001, + "name": "_nextShifter", + "nodeType": "VariableDeclaration", + "scope": 3066, + "src": "2915:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3000, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2915:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2914:22:7" + }, + "returnParameters": { + "id": 3005, + "nodeType": "ParameterList", + "parameters": [], + "src": "2962:0:7" + }, + "scope": 3441, + "src": "2891:1030:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3088, + "nodeType": "Block", + "src": "4119:75:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3080, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4145:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4145:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3082, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3068, + "src": "4157:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3083, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "4166:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3084, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3072, + "src": "4174:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3085, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "4182:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3079, + "name": "_shiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "4136:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) returns (uint256)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:51:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3078, + "id": 3087, + "nodeType": "Return", + "src": "4129:58:7" + } + ] + }, + "documentation": "@notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.", + "id": 3089, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "shiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3068, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4026:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3067, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4026:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3070, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4043:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3069, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4043:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3072, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4059:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3071, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4059:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3074, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4075:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3073, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4075:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4025:68:7" + }, + "returnParameters": { + "id": 3078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3077, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4110:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4110:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4109:9:7" + }, + "scope": 3441, + "src": "4009:185:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3120, + "nodeType": "Block", + "src": "4404:160:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3105, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "4422:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3108, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3106, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4440:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4440:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4422:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a656420746f206d696e74206f6e20626568616c66206f662075736572", + "id": 3109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4453:42:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06dd9cdc4f8ac8c225724ebd1b1aca99ad890829beb5c8aa163f4396c357daf9", + "typeString": "literal_string \"not authorized to mint on behalf of user\"" + }, + "value": "not authorized to mint on behalf of user" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06dd9cdc4f8ac8c225724ebd1b1aca99ad890829beb5c8aa163f4396c357daf9", + "typeString": "literal_string \"not authorized to mint on behalf of user\"" + } + ], + "id": 3104, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4414:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4414:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3111, + "nodeType": "ExpressionStatement", + "src": "4414:82:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3113, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3091, + "src": "4522:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3114, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3093, + "src": "4527:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3115, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3095, + "src": "4536:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3116, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3097, + "src": "4544:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3117, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3099, + "src": "4552:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3112, + "name": "_shiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "4513:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) returns (uint256)" + } + }, + "id": 3118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4513:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3103, + "id": 3119, + "nodeType": "Return", + "src": "4506:51:7" + } + ] + }, + "documentation": "@notice Callable by the previous Shifter if it has been upgraded.", + "id": 3121, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forwardShiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3100, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3091, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4298:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4298:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3093, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4311:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3092, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4311:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3095, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4328:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3094, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4328:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3097, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4344:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3096, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4344:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3099, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4360:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3098, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4360:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4297:81:7" + }, + "returnParameters": { + "id": 3103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3102, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4395:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4395:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4394:9:7" + }, + "scope": 3441, + "src": "4274:290:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3219, + "nodeType": "Block", + "src": "4810:577:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3136, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "4824:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4847:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4839:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4839:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4824:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3153, + "nodeType": "IfStatement", + "src": "4820:114:7", + "trueBody": { + "id": 3152, + "nodeType": "Block", + "src": "4853:81:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "4897:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3146, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "4902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3147, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "4911:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3148, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "4919:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3149, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3131, + "src": "4927:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3142, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "4869:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3141, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "4861:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4861:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "forwardShiftIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 3121, + "src": "4861:35:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) external returns (uint256)" + } + }, + "id": 3150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4861:71:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3135, + "id": 3151, + "nodeType": "Return", + "src": "4854:78:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3155, + "name": "status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2895, + "src": "4952:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 3157, + "indexExpression": { + "argumentTypes": null, + "id": 3156, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "4959:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4952:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 3158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4970:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "4952:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f6e6365206861736820616c7265616479207370656e74", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4977:26:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a3c38debfb7e0d2e1305193d750b2651fd0e6742e3fe145b7017bb3d0ded8b1c", + "typeString": "literal_string \"nonce hash already spent\"" + }, + "value": "nonce hash already spent" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a3c38debfb7e0d2e1305193d750b2651fd0e6742e3fe145b7017bb3d0ded8b1c", + "typeString": "literal_string \"nonce hash already spent\"" + } + ], + "id": 3154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4944:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4944:60:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3162, + "nodeType": "ExpressionStatement", + "src": "4944:60:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3165, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5032:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3166, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5037:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3167, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "5046:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3168, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "5054:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3169, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3131, + "src": "5062:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3164, + "name": "verifySig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3396, + "src": "5022:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) view returns (bool)" + } + }, + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5022:45:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c6964207369676e6174757265", + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5069:19:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12a179e1a73f41ef8e1ba2f259a99bc53b6ace3abb110ac2ea058e42c6104e1a", + "typeString": "literal_string \"invalid signature\"" + }, + "value": "invalid signature" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12a179e1a73f41ef8e1ba2f259a99bc53b6ace3abb110ac2ea058e42c6104e1a", + "typeString": "literal_string \"invalid signature\"" + } + ], + "id": 3163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5014:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5014:75:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3173, + "nodeType": "ExpressionStatement", + "src": "5014:75:7" + }, + { + "assignments": [ + 3175 + ], + "declarations": [ + { + "constant": false, + "id": 3175, + "name": "absoluteFee", + "nodeType": "VariableDeclaration", + "scope": 3219, + "src": "5099:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5099:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3182, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3176, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5122:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 3177, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "5132:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "5122:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3179, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5121:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 3180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5137:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "src": "5121:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5099:43:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3183, + "name": "status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2895, + "src": "5152:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 3185, + "indexExpression": { + "argumentTypes": null, + "id": 3184, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "5159:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5152:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5169:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5152:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3188, + "nodeType": "ExpressionStatement", + "src": "5152:21:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3192, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5194:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3193, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5199:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3194, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5207:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5199:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3189, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "5183:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "5183:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5183:36:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3197, + "nodeType": "ExpressionStatement", + "src": "5183:36:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3201, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "5240:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3202, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5254:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3198, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "5229:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "5229:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5229:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3204, + "nodeType": "ExpressionStatement", + "src": "5229:37:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3206, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5292:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3207, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5297:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3208, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "5306:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3205, + "name": "LogShiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "5281:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5281:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3210, + "nodeType": "EmitStatement", + "src": "5276:42:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3211, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "5328:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 3212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5343:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5328:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3214, + "nodeType": "ExpressionStatement", + "src": "5328:16:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3215, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5361:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3216, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5369:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5361:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3135, + "id": 3218, + "nodeType": "Return", + "src": "5354:26:7" + } + ] + }, + "documentation": "@notice shiftIn mints new tokens after verifying the signature and\n transfers the tokens to `_to`.", + "id": 3220, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_shiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3123, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4702:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4702:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3125, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4715:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3127, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4732:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3126, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4732:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3129, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4748:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3128, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4748:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3131, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4764:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3130, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4764:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4701:81:7" + }, + "returnParameters": { + "id": 3135, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3134, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4801:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4801:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4800:9:7" + }, + "scope": 3441, + "src": "4684:703:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3236, + "nodeType": "Block", + "src": "5553:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3230, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5580:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5580:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3232, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "5592:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3233, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3224, + "src": "5597:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3229, + "name": "_shiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3338, + "src": "5570:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) returns (uint256)" + } + }, + "id": 3234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5570:35:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3228, + "id": 3235, + "nodeType": "Return", + "src": "5563:42:7" + } + ] + }, + "documentation": "@notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.", + "id": 3237, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "shiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3222, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5493:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3221, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5493:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3224, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5511:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5511:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5492:35:7" + }, + "returnParameters": { + "id": 3228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3227, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5544:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3226, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5544:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5543:9:7" + }, + "scope": 3441, + "src": "5475:137:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3262, + "nodeType": "Block", + "src": "5792:146:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3249, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "5810:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3252, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3250, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5828:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5828:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5810:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a656420746f206275726e206f6e20626568616c66206f662075736572", + "id": 3253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5841:42:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4f7aa97ad077f6bfffb0e536a46ef12a6c51d9f1184830d3b8860b484f78d9ff", + "typeString": "literal_string \"not authorized to burn on behalf of user\"" + }, + "value": "not authorized to burn on behalf of user" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4f7aa97ad077f6bfffb0e536a46ef12a6c51d9f1184830d3b8860b484f78d9ff", + "typeString": "literal_string \"not authorized to burn on behalf of user\"" + } + ], + "id": 3248, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5802:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3255, + "nodeType": "ExpressionStatement", + "src": "5802:82:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3257, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3239, + "src": "5911:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3258, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3241, + "src": "5918:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3259, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3243, + "src": "5923:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3256, + "name": "_shiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3338, + "src": "5901:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) returns (uint256)" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5901:30:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3247, + "id": 3261, + "nodeType": "Return", + "src": "5894:37:7" + } + ] + }, + "documentation": "@notice Callable by the previous Shifter if it has been upgraded.", + "id": 3263, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forwardShiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3239, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5717:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5717:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3241, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5732:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3240, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5732:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3243, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5750:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5750:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5716:50:7" + }, + "returnParameters": { + "id": 3247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3246, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5783:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5783:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5782:9:7" + }, + "scope": 3441, + "src": "5692:246:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3337, + "nodeType": "Block", + "src": "6040:480:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3274, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6054:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6077:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6069:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6069:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6054:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3289, + "nodeType": "IfStatement", + "src": "6050:100:7", + "trueBody": { + "id": 3288, + "nodeType": "Block", + "src": "6083:67:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3283, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3265, + "src": "6128:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3284, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6135:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3285, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6140:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3280, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6099:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3279, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "6091:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6091:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "forwardShiftOut", + "nodeType": "MemberAccess", + "referencedDeclaration": 3263, + "src": "6091:36:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) external returns (uint256)" + } + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6091:57:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3273, + "id": 3287, + "nodeType": "Return", + "src": "6084:64:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3291, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6167:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6167:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6181:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6167:15:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f206164647265737320697320656d707479", + "id": 3295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6184:21:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3387226d3456c87662abc983f9678c21ff0a40cda11ae06c03a4afde3892adc1", + "typeString": "literal_string \"to address is empty\"" + }, + "value": "to address is empty" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3387226d3456c87662abc983f9678c21ff0a40cda11ae06c03a4afde3892adc1", + "typeString": "literal_string \"to address is empty\"" + } + ], + "id": 3290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "6159:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6159:47:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3297, + "nodeType": "ExpressionStatement", + "src": "6159:47:7" + }, + { + "assignments": [ + 3299 + ], + "declarations": [ + { + "constant": false, + "id": 3299, + "name": "absoluteFee", + "nodeType": "VariableDeclaration", + "scope": 3337, + "src": "6217:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6217:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3306, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3300, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6240:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 3301, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "6250:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "6240:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3303, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6239:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6255:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "src": "6239:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6217:43:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3310, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3265, + "src": "6323:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3311, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6330:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3307, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "6312:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2837, + "src": "6312:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6312:26:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3313, + "nodeType": "ExpressionStatement", + "src": "6312:26:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3317, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "6359:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3318, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6373:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3314, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "6348:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "6348:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6348:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3320, + "nodeType": "ExpressionStatement", + "src": "6348:37:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3322, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6413:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3323, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6418:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3324, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6426:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6418:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3326, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "6439:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3321, + "name": "LogShiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2914, + "src": "6401:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes memory,uint256,uint256)" + } + }, + "id": 3327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6401:50:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3328, + "nodeType": "EmitStatement", + "src": "6396:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3329, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "6461:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6476:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6461:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3332, + "nodeType": "ExpressionStatement", + "src": "6461:16:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3333, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6494:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3334, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6502:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6494:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3273, + "id": 3336, + "nodeType": "Return", + "src": "6487:26:7" + } + ] + }, + "documentation": null, + "id": 3338, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_shiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3265, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5963:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3264, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5963:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3267, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5978:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3266, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5978:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3269, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5996:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5996:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5962:50:7" + }, + "returnParameters": { + "id": 3273, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3272, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "6031:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3271, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6031:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6030:9:7" + }, + "scope": 3441, + "src": "5944:576:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3395, + "nodeType": "Block", + "src": "6754:502:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3353, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6768:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6791:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6783:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6783:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6768:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3370, + "nodeType": "IfStatement", + "src": "6764:109:7", + "trueBody": { + "id": 3369, + "nodeType": "Block", + "src": "6797:76:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3362, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "6836:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3363, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3342, + "src": "6841:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3364, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3344, + "src": "6850:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3365, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "6858:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3366, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3348, + "src": "6866:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3359, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6813:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3358, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "6805:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6805:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "verifySig", + "nodeType": "MemberAccess", + "referencedDeclaration": 3396, + "src": "6805:30:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) view external returns (bool)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6805:66:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3352, + "id": 3368, + "nodeType": "Return", + "src": "6798:73:7" + } + ] + } + }, + { + "assignments": [ + 3372 + ], + "declarations": [ + { + "constant": false, + "id": 3372, + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6883:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3371, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6883:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6883:9:7" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6902:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3374, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3376, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6902:9:7" + }, + { + "assignments": [ + 3378 + ], + "declarations": [ + { + "constant": false, + "id": 3378, + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6921:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3377, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6921:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3379, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6921:7:7" + }, + { + "externalReferences": [ + { + "r": { + "declaration": 3372, + "isOffset": false, + "isSlot": false, + "src": "7032:1:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7047:4:7", + "valueSize": 1 + } + }, + { + "v": { + "declaration": 3378, + "isOffset": false, + "isSlot": false, + "src": "7112:1:7", + "valueSize": 1 + } + }, + { + "s": { + "declaration": 3375, + "isOffset": false, + "isSlot": false, + "src": "7072:1:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7087:4:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7135:4:7", + "valueSize": 1 + } + } + ], + "id": 3380, + "nodeType": "InlineAssembly", + "operations": "{\n r := mload(add(_sig, 0x20))\n s := mload(add(_sig, 0x40))\n v := byte(0, mload(add(_sig, 0x60)))\n}", + "src": "7009:149:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3381, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "7175:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3384, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "7210:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3385, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3342, + "src": "7215:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3386, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3344, + "src": "7224:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3387, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "7232:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3383, + "name": "sigHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3440, + "src": "7202:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,bytes32,bytes32) view returns (bytes32)" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7202:37:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3389, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3378, + "src": "7241:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 3390, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "7244:1:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3391, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "7247:1:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3382, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7194, + "src": "7192:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 3392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7192:57:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7175:74:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3352, + "id": 3394, + "nodeType": "Return", + "src": "7168:81:7" + } + ] + }, + "documentation": "@notice verifySig checks the the provided signature matches the provided\n parameters.", + "id": 3396, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verifySig", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3349, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3340, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6646:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3339, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6646:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3342, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6659:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6659:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3344, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6676:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3343, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3346, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6692:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3345, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6692:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3348, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6708:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3347, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6708:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6645:81:7" + }, + "returnParameters": { + "id": 3352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3351, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6748:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3350, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6748:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6747:6:7" + }, + "scope": 3441, + "src": "6627:629:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3439, + "nodeType": "Block", + "src": "7445:201:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3409, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "7459:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7482:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7474:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7474:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7459:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3425, + "nodeType": "IfStatement", + "src": "7455:101:7", + "trueBody": { + "id": 3424, + "nodeType": "Block", + "src": "7488:68:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3418, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "7525:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3419, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3400, + "src": "7530:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3420, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3402, + "src": "7539:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3421, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3404, + "src": "7547:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3415, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "7504:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3414, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "7496:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sigHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 3440, + "src": "7496:28:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,bytes32,bytes32) view external returns (bytes32)" + } + }, + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:58:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3408, + "id": 3423, + "nodeType": "Return", + "src": "7489:65:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3430, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "7601:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + ], + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7593:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7593:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3432, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "7609:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3433, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3400, + "src": "7614:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3434, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3402, + "src": "7623:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3435, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3404, + "src": "7631:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3427, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7189, + "src": "7582:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7582:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7582:56:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3426, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7196, + "src": "7572:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 3437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7572:67:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3408, + "id": 3438, + "nodeType": "Return", + "src": "7565:74:7" + } + ] + }, + "documentation": "@notice sigHash hashes the parameters so that they can be signed.", + "id": 3440, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sigHash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3398, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7353:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3397, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7353:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3400, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7366:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7366:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3402, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7383:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3401, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3404, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7399:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3403, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7399:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7352:62:7" + }, + "returnParameters": { + "id": 3408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3407, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7436:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3406, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7436:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7435:9:7" + }, + "scope": 3441, + "src": "7336:310:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "55:7593:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3442, + "name": "Shifter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3441, + "src": "7710:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3443, + "nodeType": "InheritanceSpecifier", + "src": "7710:7:7" + } + ], + "contractDependencies": [ + 3441 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3465, + "linearizedBaseContracts": [ + 3465, + 3441 + ], + "name": "BTCShifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 3463, + "nodeType": "Block", + "src": "7929:7:7", + "statements": [] + }, + "documentation": null, + "id": 3464, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 3456, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "7859:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3457, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3447, + "src": "7877:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + { + "argumentTypes": null, + "id": 3458, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "7885:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3459, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3451, + "src": "7900:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3460, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3453, + "src": "7916:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 3461, + "modifierName": { + "argumentTypes": null, + "id": 3455, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "7851:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7851:70:7" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3445, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7736:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3444, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7736:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3447, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7762:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 3446, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "7762:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3449, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7783:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7783:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3451, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7806:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3450, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7806:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3453, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7830:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3452, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "7830:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7735:107:7" + }, + "returnParameters": { + "id": 3462, + "nodeType": "ParameterList", + "parameters": [], + "src": "7929:0:7" + }, + "scope": 3465, + "src": "7724:212:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "7687:251:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3466, + "name": "Shifter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3441, + "src": "7963:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3467, + "nodeType": "InheritanceSpecifier", + "src": "7963:7:7" + } + ], + "contractDependencies": [ + 3441 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3489, + "linearizedBaseContracts": [ + 3489, + 3441 + ], + "name": "ZECShifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 3487, + "nodeType": "Block", + "src": "8182:7:7", + "statements": [] + }, + "documentation": null, + "id": 3488, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 3480, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "8112:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3481, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "8130:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + { + "argumentTypes": null, + "id": 3482, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3473, + "src": "8138:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3483, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3475, + "src": "8153:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3484, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3477, + "src": "8169:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 3485, + "modifierName": { + "argumentTypes": null, + "id": 3479, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "8104:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8104:70:7" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3469, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "7989:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7989:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3471, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8015:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 3470, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "8015:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3473, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8036:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8036:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3475, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8059:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3474, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8059:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3477, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8083:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3476, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "8083:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7988:107:7" + }, + "returnParameters": { + "id": 3486, + "nodeType": "ParameterList", + "parameters": [], + "src": "8182:0:7" + }, + "scope": 3489, + "src": "7977:212:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "7940:251:7" + } + ], + "src": "0:8191:7" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/Shifter.sol", + "exportedSymbols": { + "BTCShifter": [ + 3465 + ], + "Shifter": [ + 3441 + ], + "ZECShifter": [ + 3489 + ] + }, + "id": 3490, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2867, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "file": "./ERC20Shifted.sol", + "id": 2868, + "nodeType": "ImportDirective", + "scope": 3490, + "sourceUnit": 2866, + "src": "25:28:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3441, + "linearizedBaseContracts": [ + 3441 + ], + "name": "Shifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2870, + "name": "nextShifter", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "481:26:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2869, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "481:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2872, + "name": "pendingNextShifter", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "513:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2871, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "513:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2874, + "name": "shifterUpgradeTime", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "552:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2873, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "552:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 2879, + "name": "shifterUpgradeDelay", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "591:58:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2875, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "591:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "302e35", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "630:8:7", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_43200_by_1", + "typeString": "int_const 43200" + }, + "value": "0.5" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "302e35", + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "641:8:7", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_43200_by_1", + "typeString": "int_const 43200" + }, + "value": "0.5" + }, + "src": "630:19:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2883, + "name": "authorizedWrapper", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "730:48:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 2882, + "keyType": { + "id": 2880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "739:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "730:23:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 2881, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "748:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2885, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "857:25:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 2884, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "857:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2887, + "name": "mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "966:28:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2886, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2889, + "name": "feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1104:27:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1104:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2891, + "name": "fee", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1179:17:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2890, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1179:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2895, + "name": "status", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1253:37:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 2894, + "keyType": { + "id": 2892, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1262:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1253:23:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 2893, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1271:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2898, + "name": "nextShiftID", + "nodeType": "VariableDeclaration", + "scope": 3441, + "src": "1297:30:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1297:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 2897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1326:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 2906, + "name": "LogShiftIn", + "nodeType": "EventDefinition", + "parameters": { + "id": 2905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2900, + "indexed": true, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1351:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2899, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1351:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2902, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1372:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2901, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1372:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2904, + "indexed": true, + "name": "_shiftID", + "nodeType": "VariableDeclaration", + "scope": 2906, + "src": "1389:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2903, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1389:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1350:64:7" + }, + "src": "1334:81:7" + }, + { + "anonymous": false, + "documentation": null, + "id": 2914, + "name": "LogShiftOut", + "nodeType": "EventDefinition", + "parameters": { + "id": 2913, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2908, + "indexed": true, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1438:17:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2907, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1438:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2910, + "indexed": false, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1457:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2909, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1457:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2912, + "indexed": true, + "name": "_shiftID", + "nodeType": "VariableDeclaration", + "scope": 2914, + "src": "1474:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2911, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1474:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1437:62:7" + }, + "src": "1420:80:7" + }, + { + "body": { + "id": 2925, + "nodeType": "Block", + "src": "1593:90:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "1611:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1611:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2919, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "1625:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1611:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206d696e7420617574686f72697479", + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1640:24:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_08f5b9e01a8f2dc96554e860d9dabb9526a5f2869857ae4bb74eefaa701ebf43", + "typeString": "literal_string \"must be mint authority\"" + }, + "value": "must be mint authority" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_08f5b9e01a8f2dc96554e860d9dabb9526a5f2869857ae4bb74eefaa701ebf43", + "typeString": "literal_string \"must be mint authority\"" + } + ], + "id": 2916, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "1603:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1603:62:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2923, + "nodeType": "ExpressionStatement", + "src": "1603:62:7" + }, + { + "id": 2924, + "nodeType": "PlaceholderStatement", + "src": "1675:1:7" + } + ] + }, + "documentation": "@notice Only allow the Darknode Payment contract.", + "id": 2926, + "name": "onlyMintAuthority", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 2915, + "nodeType": "ParameterList", + "parameters": [], + "src": "1590:2:7" + }, + "src": "1564:119:7", + "visibility": "internal" + }, + { + "body": { + "id": 2961, + "nodeType": "Block", + "src": "1815:181:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2939, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "1825:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2941, + "indexExpression": { + "argumentTypes": null, + "id": 2940, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2928, + "src": "1843:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1825:35:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1863:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1825:42:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "1825:42:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2945, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "1877:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2946, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2930, + "src": "1885:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "src": "1877:14:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2948, + "nodeType": "ExpressionStatement", + "src": "1877:14:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2949, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "1901:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2950, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2934, + "src": "1917:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1901:30:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2952, + "nodeType": "ExpressionStatement", + "src": "1901:30:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2953, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "1941:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2954, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "1947:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "1941:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 2956, + "nodeType": "ExpressionStatement", + "src": "1941:10:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 2959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2957, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "1961:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2958, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2932, + "src": "1976:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1961:28:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2960, + "nodeType": "ExpressionStatement", + "src": "1961:28:7" + } + ] + }, + "documentation": null, + "id": 2962, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2928, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1701:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1701:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2930, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1727:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 2929, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "1727:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2932, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1748:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2931, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1748:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2934, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1771:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2933, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1771:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2936, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "1795:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2935, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1795:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1700:107:7" + }, + "returnParameters": { + "id": 2938, + "nodeType": "ParameterList", + "parameters": [], + "src": "1815:0:7" + }, + "scope": 3441, + "src": "1689:307:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2970, + "nodeType": "Block", + "src": "2238:39:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2965, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "2248:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "2248:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2248:22:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2969, + "nodeType": "ExpressionStatement", + "src": "2248:22:7" + } + ] + }, + "documentation": "@notice Claims ownership of the token passed in to the constructor.\n `transferStoreOwnership` must have previously been called.\n Anyone can call this function.", + "id": 2971, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimTokenOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2963, + "nodeType": "ParameterList", + "parameters": [], + "src": "2228:2:7" + }, + "returnParameters": { + "id": 2964, + "nodeType": "ParameterList", + "parameters": [], + "src": "2238:0:7" + }, + "scope": 3441, + "src": "2200:77:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2986, + "nodeType": "Block", + "src": "2369:57:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2980, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "2379:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2982, + "indexExpression": { + "argumentTypes": null, + "id": 2981, + "name": "_wrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2973, + "src": "2397:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2379:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2983, + "name": "authorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2975, + "src": "2409:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2379:40:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2985, + "nodeType": "ExpressionStatement", + "src": "2379:40:7" + } + ] + }, + "documentation": null, + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2978, + "modifierName": { + "argumentTypes": null, + "id": 2977, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2351:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2351:17:7" + } + ], + "name": "authorizeWrapper", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2973, + "name": "_wrapper", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2309:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2972, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2309:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2975, + "name": "authorized", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2327:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2974, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2327:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2308:35:7" + }, + "returnParameters": { + "id": 2979, + "nodeType": "ParameterList", + "parameters": [], + "src": "2369:0:7" + }, + "scope": 3441, + "src": "2283:143:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2998, + "nodeType": "Block", + "src": "2652:49:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2994, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "2662:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2995, + "name": "_nextFeeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2989, + "src": "2677:17:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2662:32:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2997, + "nodeType": "ExpressionStatement", + "src": "2662:32:7" + } + ] + }, + "documentation": "@notice Allow the mint authority to update the fee recipient.\n @param _nextFeeRecipient The address to start paying fees to.", + "id": 2999, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2992, + "modifierName": { + "argumentTypes": null, + "id": 2991, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2634:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2634:17:7" + } + ], + "name": "updateFeeRecipient", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2989, + "name": "_nextFeeRecipient", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "2600:25:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2988, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2600:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2599:27:7" + }, + "returnParameters": { + "id": 2993, + "nodeType": "ParameterList", + "parameters": [], + "src": "2652:0:7" + }, + "scope": 3441, + "src": "2572:129:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3065, + "nodeType": "Block", + "src": "2962:959:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3006, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3041:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3007, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3057:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3041:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3009, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3079:5:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3079:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3011, + "name": "shifterUpgradeTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2874, + "src": "3098:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3079:37:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3041:75:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3063, + "nodeType": "Block", + "src": "3649:266:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3052, + "name": "shifterUpgradeTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2874, + "src": "3799:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3053, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "3820:5:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3820:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 3055, + "name": "shifterUpgradeDelay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2879, + "src": "3838:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3820:37:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3799:58:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3058, + "nodeType": "ExpressionStatement", + "src": "3799:58:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3059, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3871:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3060, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3892:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3871:33:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3062, + "nodeType": "ExpressionStatement", + "src": "3871:33:7" + } + ] + }, + "id": 3064, + "nodeType": "IfStatement", + "src": "3037:878:7", + "trueBody": { + "id": 3051, + "nodeType": "Block", + "src": "3118:525:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3014, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3293:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3015, + "name": "pendingNextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2872, + "src": "3307:18:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3293:32:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3017, + "nodeType": "ExpressionStatement", + "src": "3293:32:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3018, + "name": "_nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "3344:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3020, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3368:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3360:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3360:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3344:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3049, + "nodeType": "Block", + "src": "3495:138:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3039, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3545:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3537:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3537:20:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3035, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "3513:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 3661, + "src": "3513:23:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3513:45:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3042, + "nodeType": "ExpressionStatement", + "src": "3513:45:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3044, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3584:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3043, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "3576:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3576:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "claimTokenOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 2971, + "src": "3576:40:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3576:42:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3048, + "nodeType": "ExpressionStatement", + "src": "3576:42:7" + } + ] + }, + "id": 3050, + "nodeType": "IfStatement", + "src": "3340:293:7", + "trueBody": { + "id": 3034, + "nodeType": "Block", + "src": "3374:115:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3024, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "3400:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 3597, + "src": "3400:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3400:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3028, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7264, + "src": "3425:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + ], + "id": 3027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3417:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3417:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3400:30:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6d757374206265206f776e6572206f6620746f6b656e20746f2072657365742075706772616465", + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3432:41:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_299cb3bd138e36f9f827591c27e77de5560b906cd865ed5195ddc1f0aae46f15", + "typeString": "literal_string \"must be owner of token to reset upgrade\"" + }, + "value": "must be owner of token to reset upgrade" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_299cb3bd138e36f9f827591c27e77de5560b906cd865ed5195ddc1f0aae46f15", + "typeString": "literal_string \"must be owner of token to reset upgrade\"" + } + ], + "id": 3023, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "3392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3392:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3033, + "nodeType": "ExpressionStatement", + "src": "3392:82:7" + } + ] + } + } + ] + } + } + ] + }, + "documentation": "@notice Allows the mint authority to initiate an ownership transfer of\n the token.\n @param _nextShifter The address to transfer the ownership to, or 0x0.", + "id": 3066, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3004, + "modifierName": { + "argumentTypes": null, + "id": 3003, + "name": "onlyMintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2926, + "src": "2944:17:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2944:17:7" + } + ], + "name": "upgradeShifter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3001, + "name": "_nextShifter", + "nodeType": "VariableDeclaration", + "scope": 3066, + "src": "2915:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3000, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2915:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2914:22:7" + }, + "returnParameters": { + "id": 3005, + "nodeType": "ParameterList", + "parameters": [], + "src": "2962:0:7" + }, + "scope": 3441, + "src": "2891:1030:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3088, + "nodeType": "Block", + "src": "4119:75:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3080, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4145:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4145:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3082, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3068, + "src": "4157:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3083, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "4166:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3084, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3072, + "src": "4174:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3085, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "4182:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3079, + "name": "_shiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "4136:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) returns (uint256)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:51:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3078, + "id": 3087, + "nodeType": "Return", + "src": "4129:58:7" + } + ] + }, + "documentation": "@notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.", + "id": 3089, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "shiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3068, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4026:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3067, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4026:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3070, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4043:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3069, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4043:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3072, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4059:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3071, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4059:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3074, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4075:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3073, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4075:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4025:68:7" + }, + "returnParameters": { + "id": 3078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3077, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3089, + "src": "4110:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4110:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4109:9:7" + }, + "scope": 3441, + "src": "4009:185:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3120, + "nodeType": "Block", + "src": "4404:160:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3105, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "4422:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3108, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3106, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "4440:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4440:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4422:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a656420746f206d696e74206f6e20626568616c66206f662075736572", + "id": 3109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4453:42:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06dd9cdc4f8ac8c225724ebd1b1aca99ad890829beb5c8aa163f4396c357daf9", + "typeString": "literal_string \"not authorized to mint on behalf of user\"" + }, + "value": "not authorized to mint on behalf of user" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06dd9cdc4f8ac8c225724ebd1b1aca99ad890829beb5c8aa163f4396c357daf9", + "typeString": "literal_string \"not authorized to mint on behalf of user\"" + } + ], + "id": 3104, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4414:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4414:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3111, + "nodeType": "ExpressionStatement", + "src": "4414:82:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3113, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3091, + "src": "4522:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3114, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3093, + "src": "4527:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3115, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3095, + "src": "4536:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3116, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3097, + "src": "4544:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3117, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3099, + "src": "4552:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3112, + "name": "_shiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "4513:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) returns (uint256)" + } + }, + "id": 3118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4513:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3103, + "id": 3119, + "nodeType": "Return", + "src": "4506:51:7" + } + ] + }, + "documentation": "@notice Callable by the previous Shifter if it has been upgraded.", + "id": 3121, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forwardShiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3100, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3091, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4298:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4298:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3093, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4311:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3092, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4311:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3095, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4328:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3094, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4328:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3097, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4344:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3096, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4344:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3099, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4360:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3098, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4360:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4297:81:7" + }, + "returnParameters": { + "id": 3103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3102, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3121, + "src": "4395:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4395:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4394:9:7" + }, + "scope": 3441, + "src": "4274:290:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3219, + "nodeType": "Block", + "src": "4810:577:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3136, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "4824:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4847:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4839:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4839:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4824:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3153, + "nodeType": "IfStatement", + "src": "4820:114:7", + "trueBody": { + "id": 3152, + "nodeType": "Block", + "src": "4853:81:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "4897:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3146, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "4902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3147, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "4911:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3148, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "4919:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3149, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3131, + "src": "4927:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3142, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "4869:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3141, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "4861:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4861:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "forwardShiftIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 3121, + "src": "4861:35:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) external returns (uint256)" + } + }, + "id": 3150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4861:71:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3135, + "id": 3151, + "nodeType": "Return", + "src": "4854:78:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3155, + "name": "status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2895, + "src": "4952:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 3157, + "indexExpression": { + "argumentTypes": null, + "id": 3156, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "4959:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4952:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 3158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4970:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "4952:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f6e6365206861736820616c7265616479207370656e74", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4977:26:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a3c38debfb7e0d2e1305193d750b2651fd0e6742e3fe145b7017bb3d0ded8b1c", + "typeString": "literal_string \"nonce hash already spent\"" + }, + "value": "nonce hash already spent" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a3c38debfb7e0d2e1305193d750b2651fd0e6742e3fe145b7017bb3d0ded8b1c", + "typeString": "literal_string \"nonce hash already spent\"" + } + ], + "id": 3154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "4944:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4944:60:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3162, + "nodeType": "ExpressionStatement", + "src": "4944:60:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3165, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5032:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3166, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5037:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3167, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "5046:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3168, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "5054:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3169, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3131, + "src": "5062:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3164, + "name": "verifySig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3396, + "src": "5022:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) view returns (bool)" + } + }, + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5022:45:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "696e76616c6964207369676e6174757265", + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5069:19:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12a179e1a73f41ef8e1ba2f259a99bc53b6ace3abb110ac2ea058e42c6104e1a", + "typeString": "literal_string \"invalid signature\"" + }, + "value": "invalid signature" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12a179e1a73f41ef8e1ba2f259a99bc53b6ace3abb110ac2ea058e42c6104e1a", + "typeString": "literal_string \"invalid signature\"" + } + ], + "id": 3163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5014:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5014:75:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3173, + "nodeType": "ExpressionStatement", + "src": "5014:75:7" + }, + { + "assignments": [ + 3175 + ], + "declarations": [ + { + "constant": false, + "id": 3175, + "name": "absoluteFee", + "nodeType": "VariableDeclaration", + "scope": 3219, + "src": "5099:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5099:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3182, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3176, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5122:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 3177, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "5132:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "5122:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3179, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5121:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 3180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5137:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "src": "5121:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5099:43:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3183, + "name": "status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2895, + "src": "5152:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 3185, + "indexExpression": { + "argumentTypes": null, + "id": 3184, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3127, + "src": "5159:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5152:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5169:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5152:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3188, + "nodeType": "ExpressionStatement", + "src": "5152:21:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3192, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5194:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3193, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5199:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3194, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5207:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5199:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3189, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "5183:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "5183:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5183:36:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3197, + "nodeType": "ExpressionStatement", + "src": "5183:36:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3201, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "5240:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3202, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5254:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3198, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "5229:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "5229:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5229:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3204, + "nodeType": "ExpressionStatement", + "src": "5229:37:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3206, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3123, + "src": "5292:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3207, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5297:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3208, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "5306:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3205, + "name": "LogShiftIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2906, + "src": "5281:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5281:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3210, + "nodeType": "EmitStatement", + "src": "5276:42:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3211, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "5328:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 3212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5343:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5328:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3214, + "nodeType": "ExpressionStatement", + "src": "5328:16:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3215, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "5361:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3216, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "5369:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5361:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3135, + "id": 3218, + "nodeType": "Return", + "src": "5354:26:7" + } + ] + }, + "documentation": "@notice shiftIn mints new tokens after verifying the signature and\n transfers the tokens to `_to`.", + "id": 3220, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_shiftIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3123, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4702:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4702:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3125, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4715:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3127, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4732:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3126, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4732:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3129, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4748:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3128, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4748:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3131, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4764:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3130, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4764:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4701:81:7" + }, + "returnParameters": { + "id": 3135, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3134, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3220, + "src": "4801:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4801:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4800:9:7" + }, + "scope": 3441, + "src": "4684:703:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3236, + "nodeType": "Block", + "src": "5553:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3230, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5580:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5580:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3232, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "5592:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3233, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3224, + "src": "5597:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3229, + "name": "_shiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3338, + "src": "5570:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) returns (uint256)" + } + }, + "id": 3234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5570:35:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3228, + "id": 3235, + "nodeType": "Return", + "src": "5563:42:7" + } + ] + }, + "documentation": "@notice shiftOut burns tokens after taking a fee for the `_feeRecipient`.", + "id": 3237, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "shiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3222, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5493:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3221, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5493:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3224, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5511:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5511:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5492:35:7" + }, + "returnParameters": { + "id": 3228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3227, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3237, + "src": "5544:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3226, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5544:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5543:9:7" + }, + "scope": 3441, + "src": "5475:137:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3262, + "nodeType": "Block", + "src": "5792:146:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3249, + "name": "authorizedWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "5810:17:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3252, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3250, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7202, + "src": "5828:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5828:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5810:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420617574686f72697a656420746f206275726e206f6e20626568616c66206f662075736572", + "id": 3253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5841:42:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4f7aa97ad077f6bfffb0e536a46ef12a6c51d9f1184830d3b8860b484f78d9ff", + "typeString": "literal_string \"not authorized to burn on behalf of user\"" + }, + "value": "not authorized to burn on behalf of user" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4f7aa97ad077f6bfffb0e536a46ef12a6c51d9f1184830d3b8860b484f78d9ff", + "typeString": "literal_string \"not authorized to burn on behalf of user\"" + } + ], + "id": 3248, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "5802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5802:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3255, + "nodeType": "ExpressionStatement", + "src": "5802:82:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3257, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3239, + "src": "5911:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3258, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3241, + "src": "5918:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3259, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3243, + "src": "5923:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3256, + "name": "_shiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3338, + "src": "5901:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) returns (uint256)" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5901:30:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3247, + "id": 3261, + "nodeType": "Return", + "src": "5894:37:7" + } + ] + }, + "documentation": "@notice Callable by the previous Shifter if it has been upgraded.", + "id": 3263, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forwardShiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3239, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5717:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5717:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3241, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5732:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3240, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5732:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3243, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5750:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5750:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5716:50:7" + }, + "returnParameters": { + "id": 3247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3246, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3263, + "src": "5783:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5783:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5782:9:7" + }, + "scope": 3441, + "src": "5692:246:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3337, + "nodeType": "Block", + "src": "6040:480:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3274, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6054:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6077:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6069:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6069:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6054:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3289, + "nodeType": "IfStatement", + "src": "6050:100:7", + "trueBody": { + "id": 3288, + "nodeType": "Block", + "src": "6083:67:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3283, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3265, + "src": "6128:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3284, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6135:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 3285, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6140:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3280, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6099:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3279, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "6091:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6091:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "forwardShiftOut", + "nodeType": "MemberAccess", + "referencedDeclaration": 3263, + "src": "6091:36:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes memory,uint256) external returns (uint256)" + } + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6091:57:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3273, + "id": 3287, + "nodeType": "Return", + "src": "6084:64:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3291, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6167:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6167:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6181:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6167:15:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f206164647265737320697320656d707479", + "id": 3295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6184:21:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3387226d3456c87662abc983f9678c21ff0a40cda11ae06c03a4afde3892adc1", + "typeString": "literal_string \"to address is empty\"" + }, + "value": "to address is empty" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3387226d3456c87662abc983f9678c21ff0a40cda11ae06c03a4afde3892adc1", + "typeString": "literal_string \"to address is empty\"" + } + ], + "id": 3290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7205, + 7206 + ], + "referencedDeclaration": 7206, + "src": "6159:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6159:47:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3297, + "nodeType": "ExpressionStatement", + "src": "6159:47:7" + }, + { + "assignments": [ + 3299 + ], + "declarations": [ + { + "constant": false, + "id": 3299, + "name": "absoluteFee", + "nodeType": "VariableDeclaration", + "scope": 3337, + "src": "6217:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6217:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3306, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3300, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6240:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 3301, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2891, + "src": "6250:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "6240:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3303, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6239:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6255:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "src": "6239:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6217:43:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3310, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3265, + "src": "6323:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3311, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6330:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3307, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "6312:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2837, + "src": "6312:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6312:26:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3313, + "nodeType": "ExpressionStatement", + "src": "6312:26:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3317, + "name": "feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "6359:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3318, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6373:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3314, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "6348:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 2852, + "src": "6348:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6348:37:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3320, + "nodeType": "ExpressionStatement", + "src": "6348:37:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3322, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3267, + "src": "6413:3:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3323, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6418:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3324, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6426:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6418:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3326, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "6439:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3321, + "name": "LogShiftOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2914, + "src": "6401:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes memory,uint256,uint256)" + } + }, + "id": 3327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6401:50:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3328, + "nodeType": "EmitStatement", + "src": "6396:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3329, + "name": "nextShiftID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2898, + "src": "6461:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6476:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6461:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3332, + "nodeType": "ExpressionStatement", + "src": "6461:16:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3333, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "6494:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 3334, + "name": "absoluteFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3299, + "src": "6502:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6494:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3273, + "id": 3336, + "nodeType": "Return", + "src": "6487:26:7" + } + ] + }, + "documentation": null, + "id": 3338, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_shiftOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3265, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5963:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3264, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5963:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3267, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5978:16:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3266, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5978:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3269, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "5996:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5996:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5962:50:7" + }, + "returnParameters": { + "id": 3273, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3272, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3338, + "src": "6031:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3271, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6031:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6030:9:7" + }, + "scope": 3441, + "src": "5944:576:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3395, + "nodeType": "Block", + "src": "6754:502:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3353, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6768:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6791:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6783:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6783:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6768:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3370, + "nodeType": "IfStatement", + "src": "6764:109:7", + "trueBody": { + "id": 3369, + "nodeType": "Block", + "src": "6797:76:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3362, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "6836:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3363, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3342, + "src": "6841:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3364, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3344, + "src": "6850:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3365, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "6858:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3366, + "name": "_sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3348, + "src": "6866:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3359, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "6813:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3358, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "6805:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6805:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "verifySig", + "nodeType": "MemberAccess", + "referencedDeclaration": 3396, + "src": "6805:30:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes32,bytes32,bytes memory) view external returns (bool)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6805:66:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3352, + "id": 3368, + "nodeType": "Return", + "src": "6798:73:7" + } + ] + } + }, + { + "assignments": [ + 3372 + ], + "declarations": [ + { + "constant": false, + "id": 3372, + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6883:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3371, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6883:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6883:9:7" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6902:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3374, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3376, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6902:9:7" + }, + { + "assignments": [ + 3378 + ], + "declarations": [ + { + "constant": false, + "id": 3378, + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 3395, + "src": "6921:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3377, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6921:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3379, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "6921:7:7" + }, + { + "externalReferences": [ + { + "r": { + "declaration": 3372, + "isOffset": false, + "isSlot": false, + "src": "7032:1:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7047:4:7", + "valueSize": 1 + } + }, + { + "v": { + "declaration": 3378, + "isOffset": false, + "isSlot": false, + "src": "7112:1:7", + "valueSize": 1 + } + }, + { + "s": { + "declaration": 3375, + "isOffset": false, + "isSlot": false, + "src": "7072:1:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7087:4:7", + "valueSize": 1 + } + }, + { + "_sig": { + "declaration": 3348, + "isOffset": false, + "isSlot": false, + "src": "7135:4:7", + "valueSize": 1 + } + } + ], + "id": 3380, + "nodeType": "InlineAssembly", + "operations": "{\n r := mload(add(_sig, 0x20))\n s := mload(add(_sig, 0x40))\n v := byte(0, mload(add(_sig, 0x60)))\n}", + "src": "7009:149:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3381, + "name": "mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2887, + "src": "7175:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3384, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "7210:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3385, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3342, + "src": "7215:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3386, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3344, + "src": "7224:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3387, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "7232:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3383, + "name": "sigHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3440, + "src": "7202:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,bytes32,bytes32) view returns (bytes32)" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7202:37:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3389, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3378, + "src": "7241:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 3390, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "7244:1:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3391, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "7247:1:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3382, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7194, + "src": "7192:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 3392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7192:57:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7175:74:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3352, + "id": 3394, + "nodeType": "Return", + "src": "7168:81:7" + } + ] + }, + "documentation": "@notice verifySig checks the the provided signature matches the provided\n parameters.", + "id": 3396, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verifySig", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3349, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3340, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6646:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3339, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6646:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3342, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6659:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6659:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3344, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6676:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3343, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3346, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6692:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3345, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6692:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3348, + "name": "_sig", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6708:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3347, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6708:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6645:81:7" + }, + "returnParameters": { + "id": 3352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3351, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3396, + "src": "6748:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3350, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6748:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6747:6:7" + }, + "scope": 3441, + "src": "6627:629:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 3439, + "nodeType": "Block", + "src": "7445:201:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3409, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "7459:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307830", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7482:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7474:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7474:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7459:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3425, + "nodeType": "IfStatement", + "src": "7455:101:7", + "trueBody": { + "id": 3424, + "nodeType": "Block", + "src": "7488:68:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3418, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "7525:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3419, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3400, + "src": "7530:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3420, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3402, + "src": "7539:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3421, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3404, + "src": "7547:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3415, + "name": "nextShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "7504:11:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3414, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "7496:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:20:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sigHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 3440, + "src": "7496:28:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,bytes32,bytes32) view external returns (bytes32)" + } + }, + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:58:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3408, + "id": 3423, + "nodeType": "Return", + "src": "7489:65:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3430, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "7601:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + ], + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7593:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7593:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3432, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "7609:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3433, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3400, + "src": "7614:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3434, + "name": "_nHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3402, + "src": "7623:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3435, + "name": "_pHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3404, + "src": "7631:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 3427, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7189, + "src": "7582:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7582:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7582:56:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3426, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7196, + "src": "7572:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 3437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7572:67:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3408, + "id": 3438, + "nodeType": "Return", + "src": "7565:74:7" + } + ] + }, + "documentation": "@notice sigHash hashes the parameters so that they can be signed.", + "id": 3440, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sigHash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3398, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7353:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3397, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7353:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3400, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7366:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7366:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3402, + "name": "_nHash", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7383:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3401, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3404, + "name": "_pHash", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7399:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3403, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7399:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7352:62:7" + }, + "returnParameters": { + "id": 3408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3407, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 3440, + "src": "7436:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3406, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7436:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7435:9:7" + }, + "scope": 3441, + "src": "7336:310:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "55:7593:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3442, + "name": "Shifter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3441, + "src": "7710:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3443, + "nodeType": "InheritanceSpecifier", + "src": "7710:7:7" + } + ], + "contractDependencies": [ + 3441 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3465, + "linearizedBaseContracts": [ + 3465, + 3441 + ], + "name": "BTCShifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 3463, + "nodeType": "Block", + "src": "7929:7:7", + "statements": [] + }, + "documentation": null, + "id": 3464, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 3456, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "7859:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3457, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3447, + "src": "7877:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + { + "argumentTypes": null, + "id": 3458, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "7885:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3459, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3451, + "src": "7900:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3460, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3453, + "src": "7916:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 3461, + "modifierName": { + "argumentTypes": null, + "id": 3455, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "7851:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7851:70:7" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3445, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7736:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3444, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7736:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3447, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7762:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 3446, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "7762:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3449, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7783:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7783:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3451, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7806:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3450, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7806:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3453, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 3464, + "src": "7830:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3452, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "7830:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7735:107:7" + }, + "returnParameters": { + "id": 3462, + "nodeType": "ParameterList", + "parameters": [], + "src": "7929:0:7" + }, + "scope": 3465, + "src": "7724:212:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "7687:251:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3466, + "name": "Shifter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3441, + "src": "7963:7:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Shifter_$3441", + "typeString": "contract Shifter" + } + }, + "id": 3467, + "nodeType": "InheritanceSpecifier", + "src": "7963:7:7" + } + ], + "contractDependencies": [ + 3441 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3489, + "linearizedBaseContracts": [ + 3489, + 3441 + ], + "name": "ZECShifter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 3487, + "nodeType": "Block", + "src": "8182:7:7", + "statements": [] + }, + "documentation": null, + "id": 3488, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 3480, + "name": "_previousShifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "8112:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3481, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "8130:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + { + "argumentTypes": null, + "id": 3482, + "name": "_feeRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3473, + "src": "8138:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3483, + "name": "_mintAuthority", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3475, + "src": "8153:14:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3484, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3477, + "src": "8169:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 3485, + "modifierName": { + "argumentTypes": null, + "id": 3479, + "name": "Shifter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "8104:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Shifter_$3441_$", + "typeString": "type(contract Shifter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8104:70:7" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3469, + "name": "_previousShifter", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "7989:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7989:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3471, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8015:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + }, + "typeName": { + "contractScope": null, + "id": 3470, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "8015:12:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3473, + "name": "_feeRecipient", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8036:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8036:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3475, + "name": "_mintAuthority", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8059:22:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3474, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8059:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3477, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 3488, + "src": "8083:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3476, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "8083:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7988:107:7" + }, + "returnParameters": { + "id": 3486, + "nodeType": "ParameterList", + "parameters": [], + "src": "8182:0:7" + }, + "scope": 3489, + "src": "7977:212:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 3490, + "src": "7940:251:7" + } + ], + "src": "0:8191:7" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0xd79c73d5d7701ff70ab30939dd980af7276ff21617d890ff2ce150f3b5ea3d94": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": true, + "name": "_shiftID", + "type": "uint256" + } + ], + "name": "LogShiftIn", + "type": "event", + "signature": "0xd79c73d5d7701ff70ab30939dd980af7276ff21617d890ff2ce150f3b5ea3d94" + }, + "0x1005efb915fb4efa25ffd0757ae0c14b27112a87bbfd7547daf01830cd499309": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_to", + "type": "bytes" + }, + { + "indexed": false, + "name": "_amount", + "type": "uint256" + }, + { + "indexed": true, + "name": "_shiftID", + "type": "uint256" + } + ], + "name": "LogShiftOut", + "type": "event", + "signature": "0x1005efb915fb4efa25ffd0757ae0c14b27112a87bbfd7547daf01830cd499309" + } + }, + "links": {}, + "address": "0x7dD16bf08e06de454C569121a22E58b279c348FB", + "transactionHash": "0xd4f800bb2b3dec0d39e7926574f0d07f8f067057760e49b34e1f3291094aa50e" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:21:48.614Z", + "devdoc": { + "methods": { + "updateFeeRecipient(address)": { + "params": { + "_nextFeeRecipient": "The address to start paying fees to." + } + }, + "upgradeShifter(address)": { + "params": { + "_nextShifter": "The address to transfer the ownership to, or 0x0." + } + } + } + }, + "userdoc": { + "methods": { + "claimTokenOwnership()": { + "notice": "Claims ownership of the token passed in to the constructor. `transferStoreOwnership` must have previously been called. Anyone can call this function." + }, + "forwardShiftIn(address,uint256,bytes32,bytes32,bytes)": { + "notice": "Callable by the previous Shifter if it has been upgraded." + }, + "forwardShiftOut(address,bytes,uint256)": { + "notice": "Callable by the previous Shifter if it has been upgraded." + }, + "shiftIn(uint256,bytes32,bytes32,bytes)": { + "notice": "shiftOut burns tokens after taking a fee for the `_feeRecipient`." + }, + "shiftOut(bytes,uint256)": { + "notice": "shiftOut burns tokens after taking a fee for the `_feeRecipient`." + }, + "sigHash(address,uint256,bytes32,bytes32)": { + "notice": "sigHash hashes the parameters so that they can be signed." + }, + "updateFeeRecipient(address)": { + "notice": "Allow the mint authority to update the fee recipient." + }, + "upgradeShifter(address)": { + "notice": "Allows the mint authority to initiate an ownership transfer of the token." + }, + "verifySig(address,uint256,bytes32,bytes32,bytes)": { + "notice": "verifySig checks the the provided signature matches the provided parameters." + } + } + } +} \ No newline at end of file diff --git a/build/devnet/zBTC.json b/build/devnet/zBTC.json new file mode 100644 index 00000000..994cd08b --- /dev/null +++ b/build/devnet/zBTC.json @@ -0,0 +1,2273 @@ +{ + "contractName": "zBTC", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "sender", + "type": "address" + }, + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See `IERC20.allowance`.\"},\"approve(address,uint256)\":{\"details\":\"See `IERC20.approve`. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See `IERC20.balanceOf`.\"},\"claimOwnership()\":{\"details\":\"Allows the pendingOwner address to finalize the transfer.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. * > Note that this information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including `IERC20.balanceOf` and `IERC20.transfer`.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"isOwner()\":{\"return\":\"true if `msg.sender` is the owner of the contract.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"return\":\"the address of the owner.\"},\"renounceOwnership()\":{\"details\":\"Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See `IERC20.totalSupply`.\"},\"transfer(address,uint256)\":{\"details\":\"See `IERC20.transfer`. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See `IERC20.transferFrom`. * Emits an `Approval` event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of `ERC20`; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `value`. - the caller must have allowance for `sender`'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Allows the current owner to set the pendingOwner address.\",\"params\":{\"newOwner\":\"The address to transfer ownership to.\"}}}},\"userdoc\":{\"methods\":{\"renounceOwnership()\":{\"notice\":\"Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"}}}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol\":\"zBTC\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol\":{\"keccak256\":\"0x709d74b45c3da97750300a49f14891cecf0aa4508b21eb9bb7bdde941b0d2825\",\"urls\":[\"bzzr://6d127237549773fb77ab60aa2f09b82b1476ce623014d3fad7bd3f7518f067d7\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", + "bytecode": "0x600b60808181527f536869667465642042544300000000000000000000000000000000000000000060a0908152610100604052600460c09081527f7a4254430000000000000000000000000000000000000000000000000000000060e0529192600891849184918491610074916003916100f4565b5081516100889060049060208501906100f4565b506005805460ff90921660ff199092169190911790555050600680546001600160a01b0319163317908190556040516001600160a01b0391909116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350505061018f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061013557805160ff1916838001178555610162565b82800160010185558215610162579182015b82811115610162578251825591602001919060010190610147565b5061016e929150610172565b5090565b61018c91905b8082111561016e5760008155600101610178565b90565b610e8b8061019e6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063715018a6116100a25780639dc29fac116100715780639dc29fac1461030a578063a457c2d714610336578063a9059cbb14610362578063dd62ed3e1461038e578063f2fde38b146103bc57610116565b8063715018a6146102ce5780638da5cb5b146102d65780638f32d59b146102fa57806395d89b411461030257610116565b8063313ce567116100e9578063313ce56714610228578063395093511461024657806340c10f19146102725780634e71e0c8146102a057806370a08231146102a857610116565b806306fdde031461011b578063095ea7b31461019857806318160ddd146101d857806323b872dd146101f2575b600080fd5b6101236103e2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c4600480360360408110156101ae57600080fd5b506001600160a01b038135169060200135610478565b604080519115158252519081900360200190f35b6101e061048e565b60408051918252519081900360200190f35b6101c46004803603606081101561020857600080fd5b506001600160a01b03813581169160208101359091169060400135610494565b6102306104eb565b6040805160ff9092168252519081900360200190f35b6101c46004803603604081101561025c57600080fd5b506001600160a01b0381351690602001356104f4565b61029e6004803603604081101561028857600080fd5b506001600160a01b038135169060200135610530565b005b61029e61058d565b6101e0600480360360208110156102be57600080fd5b50356001600160a01b031661066a565b61029e610685565b6102de61071e565b604080516001600160a01b039092168252519081900360200190f35b6101c461072d565b61012361073e565b61029e6004803603604081101561032057600080fd5b506001600160a01b03813516906020013561079f565b6101c46004803603604081101561034c57600080fd5b506001600160a01b0381351690602001356107f8565b6101c46004803603604081101561037857600080fd5b506001600160a01b038135169060200135610834565b6101e0600480360360408110156103a457600080fd5b506001600160a01b0381358116916020013516610841565b61029e600480360360208110156103d257600080fd5b50356001600160a01b031661086c565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561046e5780601f106104435761010080835404028352916020019161046e565b820191906000526020600020905b81548152906001019060200180831161045157829003601f168201915b5050505050905090565b60006104853384846108e3565b50600192915050565b60025490565b60006104a18484846109d5565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546104e19186916104dc908663ffffffff610b1d16565b6108e3565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104859185906104dc908663ffffffff610b7d16565b61053861072d565b61057f5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6105898282610be1565b5050565b60055461010090046001600160a01b031633146105f45760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b6005546006546040516101009092046001600160a01b03908116929116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a360058054600680546001600160a01b0319166001600160a01b03610100840416179055610100600160a81b0319169055565b6001600160a01b031660009081526020819052604090205490565b61068d61072d565b6106d45760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b6006546001600160a01b031690565b6006546001600160a01b0316331490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561046e5780601f106104435761010080835404028352916020019161046e565b6107a761072d565b6107ee5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6105898282610cd4565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104859185906104dc908663ffffffff610b1d16565b60006104853384846109d5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61087461072d565b6108bb5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b03831661092b57604051600160e51b62461bcd028152600401808060200182810382526024815260200180610e3c6024913960400191505060405180910390fd5b6001600160a01b03821661097357604051600160e51b62461bcd028152600401808060200182810382526022815260200180610dd46022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610a1d57604051600160e51b62461bcd028152600401808060200182810382526025815260200180610e176025913960400191505060405180910390fd5b6001600160a01b038216610a6557604051600160e51b62461bcd028152600401808060200182810382526023815260200180610db16023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610a8e908263ffffffff610b1d16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610ac3908263ffffffff610b7d16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610b775760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610bda5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610c3f5760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254610c52908263ffffffff610b7d16565b6002556001600160a01b038216600090815260208190526040902054610c7e908263ffffffff610b7d16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610d1c57604051600160e51b62461bcd028152600401808060200182810382526021815260200180610df66021913960400191505060405180910390fd5b600254610d2f908263ffffffff610b1d16565b6002556001600160a01b038216600090815260208190526040902054610d5b908263ffffffff610b1d16565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a723058205c19f4830f6dbc065e98307702258d05fe1c9de6f0686ba087ff86db0a6a873f0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063715018a6116100a25780639dc29fac116100715780639dc29fac1461030a578063a457c2d714610336578063a9059cbb14610362578063dd62ed3e1461038e578063f2fde38b146103bc57610116565b8063715018a6146102ce5780638da5cb5b146102d65780638f32d59b146102fa57806395d89b411461030257610116565b8063313ce567116100e9578063313ce56714610228578063395093511461024657806340c10f19146102725780634e71e0c8146102a057806370a08231146102a857610116565b806306fdde031461011b578063095ea7b31461019857806318160ddd146101d857806323b872dd146101f2575b600080fd5b6101236103e2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c4600480360360408110156101ae57600080fd5b506001600160a01b038135169060200135610478565b604080519115158252519081900360200190f35b6101e061048e565b60408051918252519081900360200190f35b6101c46004803603606081101561020857600080fd5b506001600160a01b03813581169160208101359091169060400135610494565b6102306104eb565b6040805160ff9092168252519081900360200190f35b6101c46004803603604081101561025c57600080fd5b506001600160a01b0381351690602001356104f4565b61029e6004803603604081101561028857600080fd5b506001600160a01b038135169060200135610530565b005b61029e61058d565b6101e0600480360360208110156102be57600080fd5b50356001600160a01b031661066a565b61029e610685565b6102de61071e565b604080516001600160a01b039092168252519081900360200190f35b6101c461072d565b61012361073e565b61029e6004803603604081101561032057600080fd5b506001600160a01b03813516906020013561079f565b6101c46004803603604081101561034c57600080fd5b506001600160a01b0381351690602001356107f8565b6101c46004803603604081101561037857600080fd5b506001600160a01b038135169060200135610834565b6101e0600480360360408110156103a457600080fd5b506001600160a01b0381358116916020013516610841565b61029e600480360360208110156103d257600080fd5b50356001600160a01b031661086c565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561046e5780601f106104435761010080835404028352916020019161046e565b820191906000526020600020905b81548152906001019060200180831161045157829003601f168201915b5050505050905090565b60006104853384846108e3565b50600192915050565b60025490565b60006104a18484846109d5565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546104e19186916104dc908663ffffffff610b1d16565b6108e3565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104859185906104dc908663ffffffff610b7d16565b61053861072d565b61057f5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6105898282610be1565b5050565b60055461010090046001600160a01b031633146105f45760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b6005546006546040516101009092046001600160a01b03908116929116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a360058054600680546001600160a01b0319166001600160a01b03610100840416179055610100600160a81b0319169055565b6001600160a01b031660009081526020819052604090205490565b61068d61072d565b6106d45760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b6006546001600160a01b031690565b6006546001600160a01b0316331490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561046e5780601f106104435761010080835404028352916020019161046e565b6107a761072d565b6107ee5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6105898282610cd4565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104859185906104dc908663ffffffff610b1d16565b60006104853384846109d5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61087461072d565b6108bb5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b03831661092b57604051600160e51b62461bcd028152600401808060200182810382526024815260200180610e3c6024913960400191505060405180910390fd5b6001600160a01b03821661097357604051600160e51b62461bcd028152600401808060200182810382526022815260200180610dd46022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610a1d57604051600160e51b62461bcd028152600401808060200182810382526025815260200180610e176025913960400191505060405180910390fd5b6001600160a01b038216610a6557604051600160e51b62461bcd028152600401808060200182810382526023815260200180610db16023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610a8e908263ffffffff610b1d16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610ac3908263ffffffff610b7d16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610b775760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610bda5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610c3f5760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254610c52908263ffffffff610b7d16565b6002556001600160a01b038216600090815260208190526040902054610c7e908263ffffffff610b7d16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610d1c57604051600160e51b62461bcd028152600401808060200182810382526021815260200180610df66021913960400191505060405180910390fd5b600254610d2f908263ffffffff610b1d16565b6002556001600160a01b038216600090815260208190526040902054610d5b908263ffffffff610b1d16565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a723058205c19f4830f6dbc065e98307702258d05fe1c9de6f0686ba087ff86db0a6a873f0029", + "sourceMap": "263:128:6:-;652:58;263:128;;;;;;;;;652:58;263:128;;;;;;;;;652:58;;705:1;;652:58;;263:128;;705:1;;504:12:33;;:5;;:12;:::i;:::-;-1:-1:-1;526:16:33;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;552:9:33;:20;;;;;;-1:-1:-1;;552:20:33;;;;;;;;;-1:-1:-1;;528:6:10;:19;;-1:-1:-1;;;;;;528:19:10;537:10;528:19;;;;;562:40;;-1:-1:-1;;;;;595:6:10;;;;;552:9:33;;562:40:10;;552:9:33;;562:40:10;263:128:6;;;652:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;652:58:6;;;-1:-1:-1;652:58:6;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "652:58:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;652:58:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;644:81:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;644:81:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2453:145:31;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2453:145:31;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1514:89;;;:::i;:::-;;;;;;;;;;;;;;;;3055:252;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3055:252:31;;;;;;;;;;;;;;;;;:::i;1478:81:33:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3702:203:31;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3702:203:31;;;;;;;;:::i;504:97:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;504:97:6;;;;;;;;:::i;:::-;;2146:177:10;;;:::i;1661:108:31:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1661:108:31;-1:-1:-1;;;;;1661:108:31;;:::i;1668:137:10:-;;;:::i;672:77::-;;;:::i;:::-;;;;-1:-1:-1;;;;;672:77:10;;;;;;;;;;;;;;1224:90;;;:::i;838:85:33:-;;;:::i;397:101:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;397:101:6;;;;;;;;:::i;4392:213:31:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4392:213:31;;;;;;;;:::i;1972:153::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1972:153:31;;;;;;;;:::i;2183:132::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2183:132:31;;;;;;;;;;:::i;1955:101:10:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1955:101:10;-1:-1:-1;;;;;1955:101:10;;:::i;644:81:33:-;713:5;706:12;;;;;;;;-1:-1:-1;;706:12:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;681:13;;706:12;;713:5;;706:12;;713:5;706:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;644:81;:::o;2453:145:31:-;2518:4;2534:36;2543:10;2555:7;2564:5;2534:8;:36::i;:::-;-1:-1:-1;2587:4:31;2453:145;;;;:::o;1514:89::-;1584:12;;1514:89;:::o;3055:252::-;3144:4;3160:36;3170:6;3178:9;3189:6;3160:9;:36::i;:::-;-1:-1:-1;;;;;3235:19:31;;;;;;:11;:19;;;;;;;;3223:10;3235:31;;;;;;;;;3206:73;;3215:6;;3235:43;;3271:6;3235:43;:35;:43;:::i;:::-;3206:8;:73::i;:::-;-1:-1:-1;3296:4:31;3055:252;;;;;:::o;1478:81:33:-;1543:9;;;;1478:81;:::o;3702:203:31:-;3807:10;3782:4;3828:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;3828:32:31;;;;;;;;;;3782:4;;3798:79;;3819:7;;3828:48;;3865:10;3828:48;:36;:48;:::i;504:97:6:-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;575:19:6;581:3;586:7;575:5;:19::i;:::-;504:97;;:::o;2146:177:10:-;1081:13;;;;;-1:-1:-1;;;;;1081:13:10;1067:10;:27;1059:61;;;;;-1:-1:-1;;;;;1059:61:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;2238:13;;2230:6;;2209:43;;2238:13;;;;-1:-1:-1;;;;;2238:13:10;;;;2230:6;;;2209:43;;2230:6;;2209:43;2269:13;;;2260:6;:22;;-1:-1:-1;;;;;;2260:22:10;-1:-1:-1;;;;;2269:13:10;;;;2260:22;;;-1:-1:-1;;;;;;2290:26:10;;;2146:177::o;1661:108:31:-;-1:-1:-1;;;;;1744:18:31;1718:7;1744:18;;;;;;;;;;;;1661:108::o;1668:137:10:-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;1750:6;;1729:40;;1766:1;;-1:-1:-1;;;;;1750:6:10;;1729:40;;1766:1;;1729:40;1779:6;:19;;-1:-1:-1;;;;;;1779:19:10;;;1668:137::o;672:77::-;736:6;;-1:-1:-1;;;;;736:6:10;672:77;:::o;1224:90::-;1301:6;;-1:-1:-1;;;;;1301:6:10;1287:10;:20;;1224:90::o;838:85:33:-;909:7;902:14;;;;;;;;-1:-1:-1;;902:14:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;877:13;;902:14;;909:7;;902:14;;909:7;902:14;;;;;;;;;;;;;;;;;;;;;;;;397:101:6;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;470:21:6;476:5;483:7;470:5;:21::i;4392:213:31:-;4502:10;4477:4;4523:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;4523:32:31;;;;;;;;;;4477:4;;4493:84;;4514:7;;4523:53;;4560:15;4523:53;:36;:53;:::i;1972:153::-;2041:4;2057:40;2067:10;2079:9;2090:6;2057:9;:40::i;2183:132::-;-1:-1:-1;;;;;2281:18:31;;;2255:7;2281:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;2183:132::o;1955:101:10:-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;2025:13;:24;;-1:-1:-1;;;;;2025:24:10;;;;;-1:-1:-1;;;;;;2025:24:10;;;;;;;;;1955:101::o;7117:329:31:-;-1:-1:-1;;;;;7209:19:31;;7201:68;;;;-1:-1:-1;;;;;7201:68:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7287:21:31;;7279:68;;;;-1:-1:-1;;;;;7279:68:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7358:18:31;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:35;;;7408:31;;;;;;;;;;;;;;;;;7117:329;;;:::o;5079:422::-;-1:-1:-1;;;;;5176:20:31;;5168:70;;;;-1:-1:-1;;;;;5168:70:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5256:23:31;;5248:71;;;;-1:-1:-1;;;;;5248:71:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5350:17:31;;:9;:17;;;;;;;;;;;:29;;5372:6;5350:29;:21;:29;:::i;:::-;-1:-1:-1;;;;;5330:17:31;;;:9;:17;;;;;;;;;;;:49;;;;5412:20;;;;;;;:32;;5437:6;5412:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;5389:20:31;;;:9;:20;;;;;;;;;;;;:55;;;;5459:35;;;;;;;5389:20;;5459:35;;;;;;;;;;;;;5079:422;;;:::o;1274:179:29:-;1332:7;1364:1;1359;:6;;1351:49;;;;;-1:-1:-1;;;;;1351:49:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:29;;;1274:179::o;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:29:o;5771:302:31:-;-1:-1:-1;;;;;5846:21:31;;5838:65;;;;;-1:-1:-1;;;;;5838:65:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;5929:12;;:24;;5946:6;5929:24;:16;:24;:::i;:::-;5914:12;:39;-1:-1:-1;;;;;5984:18:31;;:9;:18;;;;;;;;;;;:30;;6007:6;5984:30;:22;:30;:::i;:::-;-1:-1:-1;;;;;5963:18:31;;:9;:18;;;;;;;;;;;:51;;;;6029:37;;;;;;;5963:18;;:9;;6029:37;;;;;;;;;;5771:302;;:::o;6392:300::-;-1:-1:-1;;;;;6466:21:31;;6458:67;;;;-1:-1:-1;;;;;6458:67:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6551:12;;:23;;6568:5;6551:23;:16;:23;:::i;:::-;6536:12;:38;-1:-1:-1;;;;;6605:18:31;;:9;:18;;;;;;;;;;;:29;;6628:5;6605:29;:22;:29;:::i;:::-;-1:-1:-1;;;;;6584:18:31;;:9;:18;;;;;;;;;;;:50;;;;6649:36;;;;;;;6584:9;;6649:36;;;;;;;;;;;6392:300;;:::o", + "source": "pragma solidity ^0.5.8;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\";\n\nimport \"../libraries/Claimable.sol\";\n\ncontract ERC20Shifted is ERC20, ERC20Detailed, Claimable {\n constructor(string memory _name, string memory _symbol, uint8 _decimals) public ERC20Detailed(_name, _symbol, _decimals) {\n }\n\n function burn(address _from, uint256 _amount) public onlyOwner {\n _burn(_from, _amount);\n }\n\n function mint(address _to, uint256 _amount) public onlyOwner {\n _mint(_to, _amount);\n }\n}\n\n/* solium-disable-next-line no-empty-blocks */\ncontract zBTC is ERC20Shifted(\"Shifted BTC\", \"zBTC\", 8) {}\n\n/* solium-disable-next-line no-empty-blocks */\ncontract zZEC is ERC20Shifted(\"Shifted ZEC\", \"zZEC\", 8) {}\n", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "exportedSymbols": { + "ERC20Shifted": [ + 2853 + ], + "zBTC": [ + 2859 + ], + "zZEC": [ + 2865 + ] + }, + "id": 2866, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2798, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 2799, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 6909, + "src": "25:63:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "id": 2800, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 6998, + "src": "89:71:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 2801, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 3684, + "src": "162:36:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2802, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6908, + "src": "225:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 2803, + "nodeType": "InheritanceSpecifier", + "src": "225:5:6" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2804, + "name": "ERC20Detailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6997, + "src": "232:13:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Detailed_$6997", + "typeString": "contract ERC20Detailed" + } + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "232:13:6" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2806, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "247:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 2807, + "nodeType": "InheritanceSpecifier", + "src": "247:9:6" + } + ], + "contractDependencies": [ + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2853, + "linearizedBaseContracts": [ + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "ERC20Shifted", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 2821, + "nodeType": "Block", + "src": "384:7:6", + "statements": [] + }, + "documentation": null, + "id": 2822, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 2816, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2809, + "src": "357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2817, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "364:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2818, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2813, + "src": "373:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2819, + "modifierName": { + "argumentTypes": null, + "id": 2815, + "name": "ERC20Detailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6997, + "src": "343:13:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$6997_$", + "typeString": "type(contract ERC20Detailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "343:40:6" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "275:19:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2808, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "275:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "296:21:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2810, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "296:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2813, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "319:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2812, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "319:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "274:61:6" + }, + "returnParameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [], + "src": "384:0:6" + }, + "scope": 2853, + "src": "263:128:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2836, + "nodeType": "Block", + "src": "460:38:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2832, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2824, + "src": "476:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2833, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "483:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2831, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6837, + "src": "470:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "470:21:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2835, + "nodeType": "ExpressionStatement", + "src": "470:21:6" + } + ] + }, + "documentation": null, + "id": 2837, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2829, + "modifierName": { + "argumentTypes": null, + "id": 2828, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "450:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "450:9:6" + } + ], + "name": "burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2827, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2824, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 2837, + "src": "411:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2823, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "411:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2826, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2837, + "src": "426:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "426:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "410:32:6" + }, + "returnParameters": { + "id": 2830, + "nodeType": "ParameterList", + "parameters": [], + "src": "460:0:6" + }, + "scope": 2853, + "src": "397:101:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2851, + "nodeType": "Block", + "src": "565:36:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2847, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "581:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2848, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "586:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2846, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "575:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "575:19:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2850, + "nodeType": "ExpressionStatement", + "src": "575:19:6" + } + ] + }, + "documentation": null, + "id": 2852, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2844, + "modifierName": { + "argumentTypes": null, + "id": 2843, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "555:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "555:9:6" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2839, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2852, + "src": "518:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2838, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "518:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2841, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2852, + "src": "531:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "531:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "517:30:6" + }, + "returnParameters": { + "id": 2845, + "nodeType": "ParameterList", + "parameters": [], + "src": "565:0:6" + }, + "scope": 2853, + "src": "504:97:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 2866, + "src": "200:403:6" + }, + { + "baseContracts": [ + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "5368696674656420425443", + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "682:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5b7cdfe4720efbe068c2fae0dfd573b6870888087097988833a5444e271135e6", + "typeString": "literal_string \"Shifted BTC\"" + }, + "value": "Shifted BTC" + }, + { + "argumentTypes": null, + "hexValue": "7a425443", + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "697:6:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed741460db96bfd5490e8b3fec6c7aacf0938024b0827570bed736021bc82885", + "typeString": "literal_string \"zBTC\"" + }, + "value": "zBTC" + }, + { + "argumentTypes": null, + "hexValue": "38", + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "705:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + } + ], + "baseName": { + "contractScope": null, + "id": 2854, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "669:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2858, + "nodeType": "InheritanceSpecifier", + "src": "669:38:6" + } + ], + "contractDependencies": [ + 2853, + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2859, + "linearizedBaseContracts": [ + 2859, + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "zBTC", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2866, + "src": "652:58:6" + }, + { + "baseContracts": [ + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "53686966746564205a4543", + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "789:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ba2f51eb5bfed8e20d802c70c38112c4bbd8840b74f9577079b1e33b8194882c", + "typeString": "literal_string \"Shifted ZEC\"" + }, + "value": "Shifted ZEC" + }, + { + "argumentTypes": null, + "hexValue": "7a5a4543", + "id": 2862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "804:6:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_410c024cae6bc7abf90472631cd541f8a156c45e8cc63e7a255a752e9bcacc76", + "typeString": "literal_string \"zZEC\"" + }, + "value": "zZEC" + }, + { + "argumentTypes": null, + "hexValue": "38", + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "812:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + } + ], + "baseName": { + "contractScope": null, + "id": 2860, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "776:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2864, + "nodeType": "InheritanceSpecifier", + "src": "776:38:6" + } + ], + "contractDependencies": [ + 2853, + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2865, + "linearizedBaseContracts": [ + 2865, + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "zZEC", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2866, + "src": "759:58:6" + } + ], + "src": "0:818:6" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "exportedSymbols": { + "ERC20Shifted": [ + 2853 + ], + "zBTC": [ + 2859 + ], + "zZEC": [ + 2865 + ] + }, + "id": 2866, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2798, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 2799, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 6909, + "src": "25:63:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "id": 2800, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 6998, + "src": "89:71:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 2801, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 3684, + "src": "162:36:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2802, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6908, + "src": "225:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 2803, + "nodeType": "InheritanceSpecifier", + "src": "225:5:6" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2804, + "name": "ERC20Detailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6997, + "src": "232:13:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Detailed_$6997", + "typeString": "contract ERC20Detailed" + } + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "232:13:6" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2806, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "247:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 2807, + "nodeType": "InheritanceSpecifier", + "src": "247:9:6" + } + ], + "contractDependencies": [ + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2853, + "linearizedBaseContracts": [ + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "ERC20Shifted", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 2821, + "nodeType": "Block", + "src": "384:7:6", + "statements": [] + }, + "documentation": null, + "id": 2822, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 2816, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2809, + "src": "357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2817, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "364:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2818, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2813, + "src": "373:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2819, + "modifierName": { + "argumentTypes": null, + "id": 2815, + "name": "ERC20Detailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6997, + "src": "343:13:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$6997_$", + "typeString": "type(contract ERC20Detailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "343:40:6" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "275:19:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2808, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "275:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "296:21:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2810, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "296:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2813, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "319:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2812, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "319:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "274:61:6" + }, + "returnParameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [], + "src": "384:0:6" + }, + "scope": 2853, + "src": "263:128:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2836, + "nodeType": "Block", + "src": "460:38:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2832, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2824, + "src": "476:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2833, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "483:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2831, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6837, + "src": "470:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "470:21:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2835, + "nodeType": "ExpressionStatement", + "src": "470:21:6" + } + ] + }, + "documentation": null, + "id": 2837, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2829, + "modifierName": { + "argumentTypes": null, + "id": 2828, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "450:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "450:9:6" + } + ], + "name": "burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2827, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2824, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 2837, + "src": "411:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2823, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "411:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2826, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2837, + "src": "426:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "426:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "410:32:6" + }, + "returnParameters": { + "id": 2830, + "nodeType": "ParameterList", + "parameters": [], + "src": "460:0:6" + }, + "scope": 2853, + "src": "397:101:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2851, + "nodeType": "Block", + "src": "565:36:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2847, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "581:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2848, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "586:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2846, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "575:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "575:19:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2850, + "nodeType": "ExpressionStatement", + "src": "575:19:6" + } + ] + }, + "documentation": null, + "id": 2852, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2844, + "modifierName": { + "argumentTypes": null, + "id": 2843, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "555:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "555:9:6" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2839, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2852, + "src": "518:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2838, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "518:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2841, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2852, + "src": "531:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "531:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "517:30:6" + }, + "returnParameters": { + "id": 2845, + "nodeType": "ParameterList", + "parameters": [], + "src": "565:0:6" + }, + "scope": 2853, + "src": "504:97:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 2866, + "src": "200:403:6" + }, + { + "baseContracts": [ + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "5368696674656420425443", + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "682:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5b7cdfe4720efbe068c2fae0dfd573b6870888087097988833a5444e271135e6", + "typeString": "literal_string \"Shifted BTC\"" + }, + "value": "Shifted BTC" + }, + { + "argumentTypes": null, + "hexValue": "7a425443", + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "697:6:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed741460db96bfd5490e8b3fec6c7aacf0938024b0827570bed736021bc82885", + "typeString": "literal_string \"zBTC\"" + }, + "value": "zBTC" + }, + { + "argumentTypes": null, + "hexValue": "38", + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "705:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + } + ], + "baseName": { + "contractScope": null, + "id": 2854, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "669:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2858, + "nodeType": "InheritanceSpecifier", + "src": "669:38:6" + } + ], + "contractDependencies": [ + 2853, + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2859, + "linearizedBaseContracts": [ + 2859, + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "zBTC", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2866, + "src": "652:58:6" + }, + { + "baseContracts": [ + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "53686966746564205a4543", + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "789:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ba2f51eb5bfed8e20d802c70c38112c4bbd8840b74f9577079b1e33b8194882c", + "typeString": "literal_string \"Shifted ZEC\"" + }, + "value": "Shifted ZEC" + }, + { + "argumentTypes": null, + "hexValue": "7a5a4543", + "id": 2862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "804:6:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_410c024cae6bc7abf90472631cd541f8a156c45e8cc63e7a255a752e9bcacc76", + "typeString": "literal_string \"zZEC\"" + }, + "value": "zZEC" + }, + { + "argumentTypes": null, + "hexValue": "38", + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "812:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + } + ], + "baseName": { + "contractScope": null, + "id": 2860, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "776:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2864, + "nodeType": "InheritanceSpecifier", + "src": "776:38:6" + } + ], + "contractDependencies": [ + 2853, + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2865, + "linearizedBaseContracts": [ + 2865, + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "zZEC", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2866, + "src": "759:58:6" + } + ], + "src": "0:818:6" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event", + "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + }, + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event", + "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" + } + }, + "links": {}, + "address": "0x2341D423440892081516b49e42Fa93aF5280c5f5", + "transactionHash": "0xbe50c1dd7a0ca95eabdeb08193a62cb3ff24652b3033f75c0e79c644ed865196" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:21:48.599Z", + "devdoc": { + "methods": { + "allowance(address,address)": { + "details": "See `IERC20.allowance`." + }, + "approve(address,uint256)": { + "details": "See `IERC20.approve`. * Requirements: * - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See `IERC20.balanceOf`." + }, + "claimOwnership()": { + "details": "Allows the pendingOwner address to finalize the transfer." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. * > Note that this information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including `IERC20.balanceOf` and `IERC20.transfer`." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address." + }, + "isOwner()": { + "return": "true if `msg.sender` is the owner of the contract." + }, + "name()": { + "details": "Returns the name of the token." + }, + "owner()": { + "return": "the address of the owner." + }, + "renounceOwnership()": { + "details": "Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See `IERC20.totalSupply`." + }, + "transfer(address,uint256)": { + "details": "See `IERC20.transfer`. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See `IERC20.transferFrom`. * Emits an `Approval` event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of `ERC20`; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `value`. - the caller must have allowance for `sender`'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Allows the current owner to set the pendingOwner address.", + "params": { + "newOwner": "The address to transfer ownership to." + } + } + } + }, + "userdoc": { + "methods": { + "renounceOwnership()": { + "notice": "Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + } + } + } +} \ No newline at end of file diff --git a/build/devnet/zZEC.json b/build/devnet/zZEC.json new file mode 100644 index 00000000..4b33c7ad --- /dev/null +++ b/build/devnet/zZEC.json @@ -0,0 +1,2273 @@ +{ + "contractName": "zZEC", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "sender", + "type": "address" + }, + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See `IERC20.allowance`.\"},\"approve(address,uint256)\":{\"details\":\"See `IERC20.approve`. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See `IERC20.balanceOf`.\"},\"claimOwnership()\":{\"details\":\"Allows the pendingOwner address to finalize the transfer.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. * > Note that this information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including `IERC20.balanceOf` and `IERC20.transfer`.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"isOwner()\":{\"return\":\"true if `msg.sender` is the owner of the contract.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"return\":\"the address of the owner.\"},\"renounceOwnership()\":{\"details\":\"Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See `IERC20.totalSupply`.\"},\"transfer(address,uint256)\":{\"details\":\"See `IERC20.transfer`. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See `IERC20.transferFrom`. * Emits an `Approval` event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of `ERC20`; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `value`. - the caller must have allowance for `sender`'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Allows the current owner to set the pendingOwner address.\",\"params\":{\"newOwner\":\"The address to transfer ownership to.\"}}}},\"userdoc\":{\"methods\":{\"renounceOwnership()\":{\"notice\":\"Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"}}}},\"settings\":{\"compilationTarget\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol\":\"zZEC\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol\":{\"keccak256\":\"0x709d74b45c3da97750300a49f14891cecf0aa4508b21eb9bb7bdde941b0d2825\",\"urls\":[\"bzzr://6d127237549773fb77ab60aa2f09b82b1476ce623014d3fad7bd3f7518f067d7\"]},\"/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol\":{\"keccak256\":\"0xfa4c3545747ccd03b8733406f39af690ef1a4fee3498c9fafd75373d31998fbc\",\"urls\":[\"bzzr://85d1cb19ca945d1bdf0930ed2b58b48d02a40af6f3941d564e7b1756afb81ea2\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", + "bytecode": "0x600b60808181527f53686966746564205a454300000000000000000000000000000000000000000060a0908152610100604052600460c09081527f7a5a45430000000000000000000000000000000000000000000000000000000060e0529192600891849184918491610074916003916100f4565b5081516100889060049060208501906100f4565b506005805460ff90921660ff199092169190911790555050600680546001600160a01b0319163317908190556040516001600160a01b0391909116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350505061018f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061013557805160ff1916838001178555610162565b82800160010185558215610162579182015b82811115610162578251825591602001919060010190610147565b5061016e929150610172565b5090565b61018c91905b8082111561016e5760008155600101610178565b90565b610e8b8061019e6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063715018a6116100a25780639dc29fac116100715780639dc29fac1461030a578063a457c2d714610336578063a9059cbb14610362578063dd62ed3e1461038e578063f2fde38b146103bc57610116565b8063715018a6146102ce5780638da5cb5b146102d65780638f32d59b146102fa57806395d89b411461030257610116565b8063313ce567116100e9578063313ce56714610228578063395093511461024657806340c10f19146102725780634e71e0c8146102a057806370a08231146102a857610116565b806306fdde031461011b578063095ea7b31461019857806318160ddd146101d857806323b872dd146101f2575b600080fd5b6101236103e2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c4600480360360408110156101ae57600080fd5b506001600160a01b038135169060200135610478565b604080519115158252519081900360200190f35b6101e061048e565b60408051918252519081900360200190f35b6101c46004803603606081101561020857600080fd5b506001600160a01b03813581169160208101359091169060400135610494565b6102306104eb565b6040805160ff9092168252519081900360200190f35b6101c46004803603604081101561025c57600080fd5b506001600160a01b0381351690602001356104f4565b61029e6004803603604081101561028857600080fd5b506001600160a01b038135169060200135610530565b005b61029e61058d565b6101e0600480360360208110156102be57600080fd5b50356001600160a01b031661066a565b61029e610685565b6102de61071e565b604080516001600160a01b039092168252519081900360200190f35b6101c461072d565b61012361073e565b61029e6004803603604081101561032057600080fd5b506001600160a01b03813516906020013561079f565b6101c46004803603604081101561034c57600080fd5b506001600160a01b0381351690602001356107f8565b6101c46004803603604081101561037857600080fd5b506001600160a01b038135169060200135610834565b6101e0600480360360408110156103a457600080fd5b506001600160a01b0381358116916020013516610841565b61029e600480360360208110156103d257600080fd5b50356001600160a01b031661086c565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561046e5780601f106104435761010080835404028352916020019161046e565b820191906000526020600020905b81548152906001019060200180831161045157829003601f168201915b5050505050905090565b60006104853384846108e3565b50600192915050565b60025490565b60006104a18484846109d5565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546104e19186916104dc908663ffffffff610b1d16565b6108e3565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104859185906104dc908663ffffffff610b7d16565b61053861072d565b61057f5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6105898282610be1565b5050565b60055461010090046001600160a01b031633146105f45760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b6005546006546040516101009092046001600160a01b03908116929116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a360058054600680546001600160a01b0319166001600160a01b03610100840416179055610100600160a81b0319169055565b6001600160a01b031660009081526020819052604090205490565b61068d61072d565b6106d45760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b6006546001600160a01b031690565b6006546001600160a01b0316331490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561046e5780601f106104435761010080835404028352916020019161046e565b6107a761072d565b6107ee5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6105898282610cd4565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104859185906104dc908663ffffffff610b1d16565b60006104853384846109d5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61087461072d565b6108bb5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b03831661092b57604051600160e51b62461bcd028152600401808060200182810382526024815260200180610e3c6024913960400191505060405180910390fd5b6001600160a01b03821661097357604051600160e51b62461bcd028152600401808060200182810382526022815260200180610dd46022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610a1d57604051600160e51b62461bcd028152600401808060200182810382526025815260200180610e176025913960400191505060405180910390fd5b6001600160a01b038216610a6557604051600160e51b62461bcd028152600401808060200182810382526023815260200180610db16023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610a8e908263ffffffff610b1d16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610ac3908263ffffffff610b7d16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610b775760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610bda5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610c3f5760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254610c52908263ffffffff610b7d16565b6002556001600160a01b038216600090815260208190526040902054610c7e908263ffffffff610b7d16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610d1c57604051600160e51b62461bcd028152600401808060200182810382526021815260200180610df66021913960400191505060405180910390fd5b600254610d2f908263ffffffff610b1d16565b6002556001600160a01b038216600090815260208190526040902054610d5b908263ffffffff610b1d16565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a723058209c0dfdae97a7df3d29f21594cdb41266ff8acd37fde5f9da7e6410e8bf24958a0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063715018a6116100a25780639dc29fac116100715780639dc29fac1461030a578063a457c2d714610336578063a9059cbb14610362578063dd62ed3e1461038e578063f2fde38b146103bc57610116565b8063715018a6146102ce5780638da5cb5b146102d65780638f32d59b146102fa57806395d89b411461030257610116565b8063313ce567116100e9578063313ce56714610228578063395093511461024657806340c10f19146102725780634e71e0c8146102a057806370a08231146102a857610116565b806306fdde031461011b578063095ea7b31461019857806318160ddd146101d857806323b872dd146101f2575b600080fd5b6101236103e2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c4600480360360408110156101ae57600080fd5b506001600160a01b038135169060200135610478565b604080519115158252519081900360200190f35b6101e061048e565b60408051918252519081900360200190f35b6101c46004803603606081101561020857600080fd5b506001600160a01b03813581169160208101359091169060400135610494565b6102306104eb565b6040805160ff9092168252519081900360200190f35b6101c46004803603604081101561025c57600080fd5b506001600160a01b0381351690602001356104f4565b61029e6004803603604081101561028857600080fd5b506001600160a01b038135169060200135610530565b005b61029e61058d565b6101e0600480360360208110156102be57600080fd5b50356001600160a01b031661066a565b61029e610685565b6102de61071e565b604080516001600160a01b039092168252519081900360200190f35b6101c461072d565b61012361073e565b61029e6004803603604081101561032057600080fd5b506001600160a01b03813516906020013561079f565b6101c46004803603604081101561034c57600080fd5b506001600160a01b0381351690602001356107f8565b6101c46004803603604081101561037857600080fd5b506001600160a01b038135169060200135610834565b6101e0600480360360408110156103a457600080fd5b506001600160a01b0381358116916020013516610841565b61029e600480360360208110156103d257600080fd5b50356001600160a01b031661086c565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561046e5780601f106104435761010080835404028352916020019161046e565b820191906000526020600020905b81548152906001019060200180831161045157829003601f168201915b5050505050905090565b60006104853384846108e3565b50600192915050565b60025490565b60006104a18484846109d5565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546104e19186916104dc908663ffffffff610b1d16565b6108e3565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104859185906104dc908663ffffffff610b7d16565b61053861072d565b61057f5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6105898282610be1565b5050565b60055461010090046001600160a01b031633146105f45760408051600160e51b62461bcd02815260206004820152601560248201527f6d7573742062652070656e64696e67206f776e65720000000000000000000000604482015290519081900360640190fd5b6005546006546040516101009092046001600160a01b03908116929116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a360058054600680546001600160a01b0319166001600160a01b03610100840416179055610100600160a81b0319169055565b6001600160a01b031660009081526020819052604090205490565b61068d61072d565b6106d45760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b6006546001600160a01b031690565b6006546001600160a01b0316331490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561046e5780601f106104435761010080835404028352916020019161046e565b6107a761072d565b6107ee5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b6105898282610cd4565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104859185906104dc908663ffffffff610b1d16565b60006104853384846109d5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61087461072d565b6108bb5760408051600160e51b62461bcd02815260206004820152600d6024820152600160991b6c36bab9ba1031329037bbb732b902604482015290519081900360640190fd5b600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b03831661092b57604051600160e51b62461bcd028152600401808060200182810382526024815260200180610e3c6024913960400191505060405180910390fd5b6001600160a01b03821661097357604051600160e51b62461bcd028152600401808060200182810382526022815260200180610dd46022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610a1d57604051600160e51b62461bcd028152600401808060200182810382526025815260200180610e176025913960400191505060405180910390fd5b6001600160a01b038216610a6557604051600160e51b62461bcd028152600401808060200182810382526023815260200180610db16023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610a8e908263ffffffff610b1d16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610ac3908263ffffffff610b7d16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610b775760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610bda5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610c3f5760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254610c52908263ffffffff610b7d16565b6002556001600160a01b038216600090815260208190526040902054610c7e908263ffffffff610b7d16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610d1c57604051600160e51b62461bcd028152600401808060200182810382526021815260200180610df66021913960400191505060405180910390fd5b600254610d2f908263ffffffff610b1d16565b6002556001600160a01b038216600090815260208190526040902054610d5b908263ffffffff610b1d16565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a723058209c0dfdae97a7df3d29f21594cdb41266ff8acd37fde5f9da7e6410e8bf24958a0029", + "sourceMap": "263:128:6:-;759:58;263:128;;;;;;;;;759:58;263:128;;;;;;;;;759:58;;812:1;;759:58;;263:128;;812:1;;504:12:33;;:5;;:12;:::i;:::-;-1:-1:-1;526:16:33;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;552:9:33;:20;;;;;;-1:-1:-1;;552:20:33;;;;;;;;;-1:-1:-1;;528:6:10;:19;;-1:-1:-1;;;;;;528:19:10;537:10;528:19;;;;;562:40;;-1:-1:-1;;;;;595:6:10;;;;;552:9:33;;562:40:10;;552:9:33;;562:40:10;263:128:6;;;759:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;759:58:6;;;-1:-1:-1;759:58:6;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "759:58:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;759:58:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;644:81:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;644:81:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2453:145:31;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2453:145:31;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1514:89;;;:::i;:::-;;;;;;;;;;;;;;;;3055:252;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3055:252:31;;;;;;;;;;;;;;;;;:::i;1478:81:33:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3702:203:31;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3702:203:31;;;;;;;;:::i;504:97:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;504:97:6;;;;;;;;:::i;:::-;;2146:177:10;;;:::i;1661:108:31:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1661:108:31;-1:-1:-1;;;;;1661:108:31;;:::i;1668:137:10:-;;;:::i;672:77::-;;;:::i;:::-;;;;-1:-1:-1;;;;;672:77:10;;;;;;;;;;;;;;1224:90;;;:::i;838:85:33:-;;;:::i;397:101:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;397:101:6;;;;;;;;:::i;4392:213:31:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4392:213:31;;;;;;;;:::i;1972:153::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1972:153:31;;;;;;;;:::i;2183:132::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2183:132:31;;;;;;;;;;:::i;1955:101:10:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1955:101:10;-1:-1:-1;;;;;1955:101:10;;:::i;644:81:33:-;713:5;706:12;;;;;;;;-1:-1:-1;;706:12:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;681:13;;706:12;;713:5;;706:12;;713:5;706:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;644:81;:::o;2453:145:31:-;2518:4;2534:36;2543:10;2555:7;2564:5;2534:8;:36::i;:::-;-1:-1:-1;2587:4:31;2453:145;;;;:::o;1514:89::-;1584:12;;1514:89;:::o;3055:252::-;3144:4;3160:36;3170:6;3178:9;3189:6;3160:9;:36::i;:::-;-1:-1:-1;;;;;3235:19:31;;;;;;:11;:19;;;;;;;;3223:10;3235:31;;;;;;;;;3206:73;;3215:6;;3235:43;;3271:6;3235:43;:35;:43;:::i;:::-;3206:8;:73::i;:::-;-1:-1:-1;3296:4:31;3055:252;;;;;:::o;1478:81:33:-;1543:9;;;;1478:81;:::o;3702:203:31:-;3807:10;3782:4;3828:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;3828:32:31;;;;;;;;;;3782:4;;3798:79;;3819:7;;3828:48;;3865:10;3828:48;:36;:48;:::i;504:97:6:-;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;575:19:6;581:3;586:7;575:5;:19::i;:::-;504:97;;:::o;2146:177:10:-;1081:13;;;;;-1:-1:-1;;;;;1081:13:10;1067:10;:27;1059:61;;;;;-1:-1:-1;;;;;1059:61:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;2238:13;;2230:6;;2209:43;;2238:13;;;;-1:-1:-1;;;;;2238:13:10;;;;2230:6;;;2209:43;;2230:6;;2209:43;2269:13;;;2260:6;:22;;-1:-1:-1;;;;;;2260:22:10;-1:-1:-1;;;;;2269:13:10;;;;2260:22;;;-1:-1:-1;;;;;;2290:26:10;;;2146:177::o;1661:108:31:-;-1:-1:-1;;;;;1744:18:31;1718:7;1744:18;;;;;;;;;;;;1661:108::o;1668:137:10:-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;1750:6;;1729:40;;1766:1;;-1:-1:-1;;;;;1750:6:10;;1729:40;;1766:1;;1729:40;1779:6;:19;;-1:-1:-1;;;;;;1779:19:10;;;1668:137::o;672:77::-;736:6;;-1:-1:-1;;;;;736:6:10;672:77;:::o;1224:90::-;1301:6;;-1:-1:-1;;;;;1301:6:10;1287:10;:20;;1224:90::o;838:85:33:-;909:7;902:14;;;;;;;;-1:-1:-1;;902:14:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;877:13;;902:14;;909:7;;902:14;;909:7;902:14;;;;;;;;;;;;;;;;;;;;;;;;397:101:6;876:9:10;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;470:21:6;476:5;483:7;470:5;:21::i;4392:213:31:-;4502:10;4477:4;4523:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;4523:32:31;;;;;;;;;;4477:4;;4493:84;;4514:7;;4523:53;;4560:15;4523:53;:36;:53;:::i;1972:153::-;2041:4;2057:40;2067:10;2079:9;2090:6;2057:9;:40::i;2183:132::-;-1:-1:-1;;;;;2281:18:31;;;2255:7;2281:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;2183:132::o;1955:101:10:-;876:9;:7;:9::i;:::-;868:35;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;-1:-1:-1;;;;;868:35:10;;;;;;;;;;;;;;;2025:13;:24;;-1:-1:-1;;;;;2025:24:10;;;;;-1:-1:-1;;;;;;2025:24:10;;;;;;;;;1955:101::o;7117:329:31:-;-1:-1:-1;;;;;7209:19:31;;7201:68;;;;-1:-1:-1;;;;;7201:68:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7287:21:31;;7279:68;;;;-1:-1:-1;;;;;7279:68:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7358:18:31;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:35;;;7408:31;;;;;;;;;;;;;;;;;7117:329;;;:::o;5079:422::-;-1:-1:-1;;;;;5176:20:31;;5168:70;;;;-1:-1:-1;;;;;5168:70:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5256:23:31;;5248:71;;;;-1:-1:-1;;;;;5248:71:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5350:17:31;;:9;:17;;;;;;;;;;;:29;;5372:6;5350:29;:21;:29;:::i;:::-;-1:-1:-1;;;;;5330:17:31;;;:9;:17;;;;;;;;;;;:49;;;;5412:20;;;;;;;:32;;5437:6;5412:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;5389:20:31;;;:9;:20;;;;;;;;;;;;:55;;;;5459:35;;;;;;;5389:20;;5459:35;;;;;;;;;;;;;5079:422;;;:::o;1274:179:29:-;1332:7;1364:1;1359;:6;;1351:49;;;;;-1:-1:-1;;;;;1351:49:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:29;;;1274:179::o;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:29:o;5771:302:31:-;-1:-1:-1;;;;;5846:21:31;;5838:65;;;;;-1:-1:-1;;;;;5838:65:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;5929:12;;:24;;5946:6;5929:24;:16;:24;:::i;:::-;5914:12;:39;-1:-1:-1;;;;;5984:18:31;;:9;:18;;;;;;;;;;;:30;;6007:6;5984:30;:22;:30;:::i;:::-;-1:-1:-1;;;;;5963:18:31;;:9;:18;;;;;;;;;;;:51;;;;6029:37;;;;;;;5963:18;;:9;;6029:37;;;;;;;;;;5771:302;;:::o;6392:300::-;-1:-1:-1;;;;;6466:21:31;;6458:67;;;;-1:-1:-1;;;;;6458:67:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6551:12;;:23;;6568:5;6551:23;:16;:23;:::i;:::-;6536:12;:38;-1:-1:-1;;;;;6605:18:31;;:9;:18;;;;;;;;;;;:29;;6628:5;6605:29;:22;:29;:::i;:::-;-1:-1:-1;;;;;6584:18:31;;:9;:18;;;;;;;;;;;:50;;;;6649:36;;;;;;;6584:9;;6649:36;;;;;;;;;;;6392:300;;:::o", + "source": "pragma solidity ^0.5.8;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\";\n\nimport \"../libraries/Claimable.sol\";\n\ncontract ERC20Shifted is ERC20, ERC20Detailed, Claimable {\n constructor(string memory _name, string memory _symbol, uint8 _decimals) public ERC20Detailed(_name, _symbol, _decimals) {\n }\n\n function burn(address _from, uint256 _amount) public onlyOwner {\n _burn(_from, _amount);\n }\n\n function mint(address _to, uint256 _amount) public onlyOwner {\n _mint(_to, _amount);\n }\n}\n\n/* solium-disable-next-line no-empty-blocks */\ncontract zBTC is ERC20Shifted(\"Shifted BTC\", \"zBTC\", 8) {}\n\n/* solium-disable-next-line no-empty-blocks */\ncontract zZEC is ERC20Shifted(\"Shifted ZEC\", \"zZEC\", 8) {}\n", + "sourcePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "ast": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "exportedSymbols": { + "ERC20Shifted": [ + 2853 + ], + "zBTC": [ + 2859 + ], + "zZEC": [ + 2865 + ] + }, + "id": 2866, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2798, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 2799, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 6909, + "src": "25:63:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "id": 2800, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 6998, + "src": "89:71:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 2801, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 3684, + "src": "162:36:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2802, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6908, + "src": "225:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 2803, + "nodeType": "InheritanceSpecifier", + "src": "225:5:6" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2804, + "name": "ERC20Detailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6997, + "src": "232:13:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Detailed_$6997", + "typeString": "contract ERC20Detailed" + } + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "232:13:6" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2806, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "247:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 2807, + "nodeType": "InheritanceSpecifier", + "src": "247:9:6" + } + ], + "contractDependencies": [ + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2853, + "linearizedBaseContracts": [ + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "ERC20Shifted", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 2821, + "nodeType": "Block", + "src": "384:7:6", + "statements": [] + }, + "documentation": null, + "id": 2822, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 2816, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2809, + "src": "357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2817, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "364:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2818, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2813, + "src": "373:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2819, + "modifierName": { + "argumentTypes": null, + "id": 2815, + "name": "ERC20Detailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6997, + "src": "343:13:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$6997_$", + "typeString": "type(contract ERC20Detailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "343:40:6" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "275:19:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2808, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "275:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "296:21:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2810, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "296:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2813, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "319:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2812, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "319:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "274:61:6" + }, + "returnParameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [], + "src": "384:0:6" + }, + "scope": 2853, + "src": "263:128:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2836, + "nodeType": "Block", + "src": "460:38:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2832, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2824, + "src": "476:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2833, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "483:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2831, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6837, + "src": "470:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "470:21:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2835, + "nodeType": "ExpressionStatement", + "src": "470:21:6" + } + ] + }, + "documentation": null, + "id": 2837, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2829, + "modifierName": { + "argumentTypes": null, + "id": 2828, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "450:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "450:9:6" + } + ], + "name": "burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2827, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2824, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 2837, + "src": "411:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2823, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "411:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2826, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2837, + "src": "426:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "426:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "410:32:6" + }, + "returnParameters": { + "id": 2830, + "nodeType": "ParameterList", + "parameters": [], + "src": "460:0:6" + }, + "scope": 2853, + "src": "397:101:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2851, + "nodeType": "Block", + "src": "565:36:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2847, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "581:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2848, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "586:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2846, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "575:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "575:19:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2850, + "nodeType": "ExpressionStatement", + "src": "575:19:6" + } + ] + }, + "documentation": null, + "id": 2852, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2844, + "modifierName": { + "argumentTypes": null, + "id": 2843, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "555:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "555:9:6" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2839, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2852, + "src": "518:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2838, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "518:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2841, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2852, + "src": "531:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "531:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "517:30:6" + }, + "returnParameters": { + "id": 2845, + "nodeType": "ParameterList", + "parameters": [], + "src": "565:0:6" + }, + "scope": 2853, + "src": "504:97:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 2866, + "src": "200:403:6" + }, + { + "baseContracts": [ + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "5368696674656420425443", + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "682:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5b7cdfe4720efbe068c2fae0dfd573b6870888087097988833a5444e271135e6", + "typeString": "literal_string \"Shifted BTC\"" + }, + "value": "Shifted BTC" + }, + { + "argumentTypes": null, + "hexValue": "7a425443", + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "697:6:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed741460db96bfd5490e8b3fec6c7aacf0938024b0827570bed736021bc82885", + "typeString": "literal_string \"zBTC\"" + }, + "value": "zBTC" + }, + { + "argumentTypes": null, + "hexValue": "38", + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "705:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + } + ], + "baseName": { + "contractScope": null, + "id": 2854, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "669:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2858, + "nodeType": "InheritanceSpecifier", + "src": "669:38:6" + } + ], + "contractDependencies": [ + 2853, + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2859, + "linearizedBaseContracts": [ + 2859, + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "zBTC", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2866, + "src": "652:58:6" + }, + { + "baseContracts": [ + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "53686966746564205a4543", + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "789:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ba2f51eb5bfed8e20d802c70c38112c4bbd8840b74f9577079b1e33b8194882c", + "typeString": "literal_string \"Shifted ZEC\"" + }, + "value": "Shifted ZEC" + }, + { + "argumentTypes": null, + "hexValue": "7a5a4543", + "id": 2862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "804:6:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_410c024cae6bc7abf90472631cd541f8a156c45e8cc63e7a255a752e9bcacc76", + "typeString": "literal_string \"zZEC\"" + }, + "value": "zZEC" + }, + { + "argumentTypes": null, + "hexValue": "38", + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "812:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + } + ], + "baseName": { + "contractScope": null, + "id": 2860, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "776:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2864, + "nodeType": "InheritanceSpecifier", + "src": "776:38:6" + } + ], + "contractDependencies": [ + 2853, + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2865, + "linearizedBaseContracts": [ + 2865, + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "zZEC", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2866, + "src": "759:58:6" + } + ], + "src": "0:818:6" + }, + "legacyAST": { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/Shifter/ERC20Shifted.sol", + "exportedSymbols": { + "ERC20Shifted": [ + 2853 + ], + "zBTC": [ + 2859 + ], + "zZEC": [ + 2865 + ] + }, + "id": 2866, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2798, + "literals": [ + "solidity", + "^", + "0.5", + ".8" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 2799, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 6909, + "src": "25:63:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "id": 2800, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 6998, + "src": "89:71:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/noah/github/renproject/darknode-sol/contracts/libraries/Claimable.sol", + "file": "../libraries/Claimable.sol", + "id": 2801, + "nodeType": "ImportDirective", + "scope": 2866, + "sourceUnit": 3684, + "src": "162:36:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2802, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6908, + "src": "225:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$6908", + "typeString": "contract ERC20" + } + }, + "id": 2803, + "nodeType": "InheritanceSpecifier", + "src": "225:5:6" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2804, + "name": "ERC20Detailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6997, + "src": "232:13:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Detailed_$6997", + "typeString": "contract ERC20Detailed" + } + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "232:13:6" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2806, + "name": "Claimable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3683, + "src": "247:9:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Claimable_$3683", + "typeString": "contract Claimable" + } + }, + "id": 2807, + "nodeType": "InheritanceSpecifier", + "src": "247:9:6" + } + ], + "contractDependencies": [ + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2853, + "linearizedBaseContracts": [ + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "ERC20Shifted", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 2821, + "nodeType": "Block", + "src": "384:7:6", + "statements": [] + }, + "documentation": null, + "id": 2822, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 2816, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2809, + "src": "357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2817, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "364:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 2818, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2813, + "src": "373:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2819, + "modifierName": { + "argumentTypes": null, + "id": 2815, + "name": "ERC20Detailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6997, + "src": "343:13:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$6997_$", + "typeString": "type(contract ERC20Detailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "343:40:6" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "275:19:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2808, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "275:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "296:21:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2810, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "296:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2813, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "319:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2812, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "319:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "274:61:6" + }, + "returnParameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [], + "src": "384:0:6" + }, + "scope": 2853, + "src": "263:128:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2836, + "nodeType": "Block", + "src": "460:38:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2832, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2824, + "src": "476:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2833, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "483:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2831, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6837, + "src": "470:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "470:21:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2835, + "nodeType": "ExpressionStatement", + "src": "470:21:6" + } + ] + }, + "documentation": null, + "id": 2837, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2829, + "modifierName": { + "argumentTypes": null, + "id": 2828, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "450:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "450:9:6" + } + ], + "name": "burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2827, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2824, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 2837, + "src": "411:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2823, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "411:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2826, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2837, + "src": "426:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "426:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "410:32:6" + }, + "returnParameters": { + "id": 2830, + "nodeType": "ParameterList", + "parameters": [], + "src": "460:0:6" + }, + "scope": 2853, + "src": "397:101:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2851, + "nodeType": "Block", + "src": "565:36:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2847, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "581:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2848, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "586:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2846, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "575:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "575:19:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2850, + "nodeType": "ExpressionStatement", + "src": "575:19:6" + } + ] + }, + "documentation": null, + "id": 2852, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2844, + "modifierName": { + "argumentTypes": null, + "id": 2843, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "555:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "555:9:6" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2839, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 2852, + "src": "518:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2838, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "518:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2841, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 2852, + "src": "531:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "531:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "517:30:6" + }, + "returnParameters": { + "id": 2845, + "nodeType": "ParameterList", + "parameters": [], + "src": "565:0:6" + }, + "scope": 2853, + "src": "504:97:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 2866, + "src": "200:403:6" + }, + { + "baseContracts": [ + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "5368696674656420425443", + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "682:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5b7cdfe4720efbe068c2fae0dfd573b6870888087097988833a5444e271135e6", + "typeString": "literal_string \"Shifted BTC\"" + }, + "value": "Shifted BTC" + }, + { + "argumentTypes": null, + "hexValue": "7a425443", + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "697:6:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed741460db96bfd5490e8b3fec6c7aacf0938024b0827570bed736021bc82885", + "typeString": "literal_string \"zBTC\"" + }, + "value": "zBTC" + }, + { + "argumentTypes": null, + "hexValue": "38", + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "705:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + } + ], + "baseName": { + "contractScope": null, + "id": 2854, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "669:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2858, + "nodeType": "InheritanceSpecifier", + "src": "669:38:6" + } + ], + "contractDependencies": [ + 2853, + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2859, + "linearizedBaseContracts": [ + 2859, + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "zBTC", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2866, + "src": "652:58:6" + }, + { + "baseContracts": [ + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "53686966746564205a4543", + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "789:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ba2f51eb5bfed8e20d802c70c38112c4bbd8840b74f9577079b1e33b8194882c", + "typeString": "literal_string \"Shifted ZEC\"" + }, + "value": "Shifted ZEC" + }, + { + "argumentTypes": null, + "hexValue": "7a5a4543", + "id": 2862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "804:6:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_410c024cae6bc7abf90472631cd541f8a156c45e8cc63e7a255a752e9bcacc76", + "typeString": "literal_string \"zZEC\"" + }, + "value": "zZEC" + }, + { + "argumentTypes": null, + "hexValue": "38", + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "812:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + } + ], + "baseName": { + "contractScope": null, + "id": 2860, + "name": "ERC20Shifted", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2853, + "src": "776:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Shifted_$2853", + "typeString": "contract ERC20Shifted" + } + }, + "id": 2864, + "nodeType": "InheritanceSpecifier", + "src": "776:38:6" + } + ], + "contractDependencies": [ + 2853, + 3683, + 6908, + 6997, + 7168 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 2865, + "linearizedBaseContracts": [ + 2865, + 2853, + 3683, + 6997, + 6908, + 7168 + ], + "name": "zZEC", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2866, + "src": "759:58:6" + } + ], + "src": "0:818:6" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event", + "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + }, + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event", + "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" + } + }, + "links": {}, + "address": "0x8beFd13f678F56470A2919678432D58d6B6055B5", + "transactionHash": "0xc3d5cf0bfe9eb122947533b1a164d01442afc83e4b36291903c2e7b847f577f6" + } + }, + "schemaVersion": "3.0.9", + "updatedAt": "2019-06-20T01:21:48.622Z", + "devdoc": { + "methods": { + "allowance(address,address)": { + "details": "See `IERC20.allowance`." + }, + "approve(address,uint256)": { + "details": "See `IERC20.approve`. * Requirements: * - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See `IERC20.balanceOf`." + }, + "claimOwnership()": { + "details": "Allows the pendingOwner address to finalize the transfer." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. * > Note that this information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including `IERC20.balanceOf` and `IERC20.transfer`." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address." + }, + "isOwner()": { + "return": "true if `msg.sender` is the owner of the contract." + }, + "name()": { + "details": "Returns the name of the token." + }, + "owner()": { + "return": "the address of the owner." + }, + "renounceOwnership()": { + "details": "Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See `IERC20.totalSupply`." + }, + "transfer(address,uint256)": { + "details": "See `IERC20.transfer`. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See `IERC20.transferFrom`. * Emits an `Approval` event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of `ERC20`; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `value`. - the caller must have allowance for `sender`'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Allows the current owner to set the pendingOwner address.", + "params": { + "newOwner": "The address to transfer ownership to." + } + } + } + }, + "userdoc": { + "methods": { + "renounceOwnership()": { + "notice": "Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + } + } + } +} \ No newline at end of file diff --git a/migrations/1_darknodes.js b/migrations/1_darknodes.js index 71d1b5ff..bfc56464 100644 --- a/migrations/1_darknodes.js +++ b/migrations/1_darknodes.js @@ -12,7 +12,9 @@ const DarknodeSlasher = artifacts.require("DarknodeSlasher"); const networks = require("./networks.js"); module.exports = async function (deployer, network) { - deployer.logger.log(`Deploying to ${network}...`); + deployer.logger.log(`Deploying to ${network} (${network.replace("-fork", "")})...`); + + network = network.replace("-fork", ""); const addresses = networks[network] || {}; const config = networks[network] ? networks[network].config : networks.config; diff --git a/migrations/2_shifter.js b/migrations/2_shifter.js index eb596a0a..22924f20 100644 --- a/migrations/2_shifter.js +++ b/migrations/2_shifter.js @@ -28,7 +28,9 @@ const DarknodePayment = artifacts.require("DarknodePayment"); const networks = require("./networks.js"); module.exports = async function (deployer, network, accounts) { - deployer.logger.log(`Deploying to ${network}...`); + deployer.logger.log(`Deploying to ${network} (${network.replace("-fork", "")})...`); + + network = network.replace("-fork", ""); const addresses = networks[network] || {}; const config = networks[network] ? networks[network].config : networks.config; @@ -89,7 +91,7 @@ module.exports = async function (deployer, network, accounts) { } if ((await registry.getShifter(zBTC.address)) === NULL) { - console.log(`Registring BTC shifter`); + console.log(`Registering BTC shifter`); await registry.setShifter(zBTC.address, BTCShifter.address); } else { console.log(`BTC shifter is already registered: ${await registry.getShifter(zBTC.address)}`); @@ -126,7 +128,7 @@ module.exports = async function (deployer, network, accounts) { } if ((await registry.getShifter(zZEC.address)) === NULL) { - console.log(`Registring ZEC shifter`); + console.log(`Registering ZEC shifter`); await registry.setShifter(zZEC.address, ZECShifter.address); } else { console.log(`ZEC shifter is already registered: ${await registry.getShifter(zZEC.address)}`); @@ -140,5 +142,6 @@ module.exports = async function (deployer, network, accounts) { ZECShifter: ZECShifter.address, zBTC: zBTC.address, zZEC: zZEC.address, + ShifterRegistry: ShifterRegistry.address, }); } \ No newline at end of file diff --git a/migrations/networks.js b/migrations/networks.js index f1b96765..bddf93fb 100644 --- a/migrations/networks.js +++ b/migrations/networks.js @@ -1,7 +1,7 @@ const BN = require("bn.js"); const config = { - VERSION: "1.0.0", + VERSION: "927c3d8e", MINIMUM_BOND: new BN(100000).mul(new BN(10).pow(new BN(18))), MINIMUM_POD_SIZE: 3, // 24 in production MINIMUM_EPOCH_INTERVAL: 2, // 14400 in production @@ -61,21 +61,21 @@ module.exports = { devnet: { RenToken: "0x2cd647668494c1b15743ab283a0f980d90a87394", - DarknodeSlasher: "", - DarknodeRegistry: "", - DarknodeRegistryStore: "", - DarknodePaymentStore: "", - DarknodePayment: "", + DarknodeSlasher: "0xfe48363206E1849a2F53f5214af932354c35FD89", + DarknodeRegistry: "0x6E1a6b85f05bfec5c24C7a26E302cB28e639651c", + DarknodeRegistryStore: "0xC126a308dd07Adfa4a445686dcF7CbC423185593", + DarknodePaymentStore: "0x6341DF1012E862f766Fcd72e0fCAAc5a3839CFef", + DarknodePayment: "0x1f1b1d015Fc31d425C616cC35E39e31686DA69A8", tokens: { DAI: "0xc4375b7de8af5a38a93548eb8453a498222c4ff2", ETH: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", }, - BTCShifter: "", - ZECShifter: "", - ShifterRegistry: "", - zBTC: "", - zZEC: "", + BTCShifter: "0xbe830ca535BeFf2C7d82B7494e0B9592A3815730", + ZECShifter: "0x7dD16bf08e06de454C569121a22E58b279c348FB", + zBTC: "0x2341D423440892081516b49e42Fa93aF5280c5f5", + zZEC: "0x8beFd13f678F56470A2919678432D58d6B6055B5", + ShifterRegistry: "0xda67a63aAf771c4Cef589B164337FBcB93C65034", config: { ...config, diff --git a/package.json b/package.json index b0f5757f..0c07e44f 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "coveralls": "cat ./coverage/lcov.info | coveralls", "prepare": "patch-package", "deploy": "truffle migrate --skipDryRun --network $NETWORK", + "clean-build": "grep -R -l 'networks\": {}' build --exclude-dir=development | xargs rm", "verify": "truffle run verify --network $NETWORK" }, "dependencies": { @@ -58,4 +59,4 @@ "solc": "0.5.9", "solidity-coverage": "github:rotcivegaf/solidity-coverage#5875f5b7bc74d447f3312c9c0e9fc7814b482477" } -} +} \ No newline at end of file