From b19b1fe600f946e044ca7e3c3da83e8b7fefe11b Mon Sep 17 00:00:00 2001 From: Brian Li Date: Sun, 11 Apr 2021 18:33:03 -0700 Subject: [PATCH] Update feeToSetter - Don't modify the interface to processWithdraw - Add SafeMath and use it - Add tests for all the FeeManager methods - Update existing unit test for feeToSetter --- README.md | 2 +- client/contracts/ERC20Tornado.json | 4053 ++++++++++++++++------------ client/contracts/ETHTornado.json | 3625 +++++++++++++++++++++++++ client/contracts/FeeManager.json | 1550 +++++++++-- client/contracts/Hasher.json | 3 +- client/contracts/IFeeManager.json | 3707 +++++++++++++------------ client/contracts/IVerifier.json | 3692 +++++++++++++------------ client/contracts/SafeMath.json | 1964 +++++++------- client/contracts/Tornado.json | 3692 +++++++++++++------------ contracts/ERC20Tornado.sol | 14 +- contracts/FeeManager.sol | 16 + contracts/SafeMath.sol | 157 ++ contracts/Tornado.sol | 5 +- test/ERC20Tornado.test.js | 1 + test/FeeManager.test.js | 107 + 15 files changed, 13926 insertions(+), 8662 deletions(-) create mode 100644 client/contracts/ETHTornado.json create mode 100644 contracts/SafeMath.sol create mode 100644 test/FeeManager.test.js diff --git a/README.md b/README.md index 44f6a8a..2db4c77 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Poof Cash -Poof Cash is a non-custodial Ethereum and ERC20 privacy solution based on zkSNARKs. It improves transaction privacy by breaking the on-chain link between the recipient and destination addresses. It uses a smart contract that accepts ERC20 deposits that can be withdrawn by a different address. Whenever ERC20 is withdrawn by the new address, there is no way to link the withdrawal to the deposit, ensuring complete privacy. +Poof Cash is a non-custodial Celo and ERC20 privacy solution based on zkSNARKs. It improves transaction privacy by breaking the on-chain link between the recipient and destination addresses. It uses a smart contract that accepts ERC20 deposits that can be withdrawn by a different address. Whenever ERC20 is withdrawn by the new address, there is no way to link the withdrawal to the deposit, ensuring complete privacy. To make a deposit user generates a secret and sends its hash (called a commitment) along with the deposit amount to the Poof smart contract. The contract accepts the deposit and adds the commitment to its list of deposits. diff --git a/client/contracts/ERC20Tornado.json b/client/contracts/ERC20Tornado.json index e717a32..75d2192 100644 --- a/client/contracts/ERC20Tornado.json +++ b/client/contracts/ERC20Tornado.json @@ -426,21 +426,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [ @@ -574,21 +559,21 @@ "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"contract IFeeManager\",\"name\":\"_feeManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_denomination\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_merkleTreeHeight\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"leafIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"nullifierHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"FIELD_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ROOT_HISTORY_SIZE\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ZERO_VALUE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOperator\",\"type\":\"address\"}],\"name\":\"changeOperator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"commitments\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentRootIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"denomination\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_commitment\",\"type\":\"bytes32\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeManager\",\"outputs\":[{\"internalType\":\"contract IFeeManager\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"filledSubtrees\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLastRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_left\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_right\",\"type\":\"bytes32\"}],\"name\":\"hashLeftRight\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"}],\"name\":\"isKnownRoot\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"}],\"name\":\"isSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_nullifierHashes\",\"type\":\"bytes32[]\"}],\"name\":\"isSpentArray\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"spent\",\"type\":\"bool[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"levels\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nullifierHashes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"protocolFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"roots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_refund\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"zeros\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"changeOperator(address)\":{\"details\":\"operator can change his address \"},\"deposit(bytes32)\":{\"details\":\"Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\",\"params\":{\"_commitment\":\"the note commitment, which is PedersenHash(nullifier + secret)\"}},\"getLastRoot()\":{\"details\":\"Returns the last root\"},\"hashLeftRight(bytes32,bytes32)\":{\"details\":\"Hash 2 tree leaves, returns MiMC(_left, _right)\"},\"isKnownRoot(bytes32)\":{\"details\":\"Whether the root is present in the root history\"},\"isSpent(bytes32)\":{\"details\":\"whether a note is already spent \"},\"isSpentArray(bytes32[])\":{\"details\":\"whether an array of notes is already spent \"},\"updateVerifier(address)\":{\"details\":\"allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address\"},\"withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)\":{\"details\":\"Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0x5c57c88351063f1864166162f6f32be5aebae197a18abaef8d08d67b36440a51\",\"urls\":[\"bzz-raw://6da2d6faa828b1cad43428366d273e4aa61fc176d6541fb641028985497caa0f\",\"dweb:/ipfs/QmULz388t88hr999vUk5PidTTJwbEWGUyb3d6QGnDA6qoV\"]},\"/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0xe7db8acb3efcecf95c7364f447ed1764c571dbf5090fd4641fe4668a965332eb\",\"urls\":[\"bzz-raw://45e790c247c38ed8ae473e3165c1148ea10a753cf6e9f9c8742394019be2aef6\",\"dweb:/ipfs/QmaGfk1ndvqur2NvCY3TWoKuorfBVShXeykKei18GDY582\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", - "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001e5838038062001e58833981810160405260c08110156200004757600080fd5b508051602082015160408301516060840151608085015160a090950151939492939192909185858585858163ffffffff8116620000b65760405162461bcd60e51b815260040180806020018281038252602781526020018062001dcf6027913960400191505060405180910390fd5b60208163ffffffff1610620000fd5760405162461bcd60e51b815260040180806020018281038252602281526020018062001e166022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001d8e833981519152909101819055815480830183559282905260008051602062001e388339815191529092018290555b60005463ffffffff9081169082161015620001eb57620001a182806001600160e01b03620002ba16565b60028054600181810190925560008051602062001d8e8339815191520182905580548082018255600082905260008051602062001e38833981519152018290559092500162000177565b506200020181806001600160e01b03620002ba16565b60046000015550506068805460ff1916600117905582620002545760405162461bcd60e51b815260040180806020018281038252602581526020018062001d696025913960400191505060405180910390fd5b606c80546001600160a01b03199081166001600160a01b0397881617909155606d8054821695871695909517909455606e8054851691861691909117905550606955606f805490911691831691909117905560c8840460705550620004a7945050505050565b600060008051602062001df6833981519152831062000320576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001df683398151915282106200036f5760405162461bcd60e51b815260040180806020018281038252602181526020018062001dae6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003ca57600080fd5b505af4158015620003df573d6000803e3d6000fd5b505050506040513d6040811015620003f657600080fd5b508051602090910151909250905060008051602062001df6833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200047057600080fd5b505af415801562000485573d6000803e3d6000fd5b505050506040513d60408110156200049c57600080fd5b505195945050505050565b6118b280620004b76000396000f3fe6080604052600436106101815760003560e01c80639fa12d0b116100d1578063d0fb02031161008a578063ec73295911610064578063ec732959146105c8578063f178e47c146105dd578063fc0c546a14610607578063fc7e9c6f1461061c57610181565b8063d0fb02031461055f578063e5285dcc14610574578063e82955881461059e57610181565b80639fa12d0b1461040e578063b0e21e8a146104d9578063b214faa5146104ee578063ba70f7571461050b578063c2b40ae414610520578063cd87a3b41461054a57610181565b80634ecf518b1161013e578063839df94511610118578063839df945146103875780638bca6d16146103b157806390eeb02b146103c657806397fc007c146103db57610181565b80634ecf518b1461031a578063570ca735146103485780636d9833e31461035d57610181565b806306394c9b1461018657806317cc915c146101bb57806321a0adb6146101f95780632b7ac3f31461029257806338bf282e146102c3578063414a37ba14610305575b600080fd5b34801561019257600080fd5b506101b9600480360360208110156101a957600080fd5b50356001600160a01b0316610631565b005b3480156101c757600080fd5b506101e5600480360360208110156101de57600080fd5b503561069c565b604080519115158252519081900360200190f35b6101b9600480360360e081101561020f57600080fd5b810190602081018135600160201b81111561022957600080fd5b82018360208201111561023b57600080fd5b803590602001918460018302840111600160201b8311171561025c57600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a001356106b1565b34801561029e57600080fd5b506102a7610a70565b604080516001600160a01b039092168252519081900360200190f35b3480156102cf57600080fd5b506102f3600480360360408110156102e657600080fd5b5080359060200135610a7f565b60408051918252519081900360200190f35b34801561031157600080fd5b506102f3610c60565b34801561032657600080fd5b5061032f610c72565b6040805163ffffffff9092168252519081900360200190f35b34801561035457600080fd5b506102a7610c7e565b34801561036957600080fd5b506101e56004803603602081101561038057600080fd5b5035610c8d565b34801561039357600080fd5b506101e5600480360360208110156103aa57600080fd5b5035610d00565b3480156103bd57600080fd5b506102f3610d15565b3480156103d257600080fd5b5061032f610d1b565b3480156103e757600080fd5b506101b9600480360360208110156103fe57600080fd5b50356001600160a01b0316610d27565b34801561041a57600080fd5b506104896004803603602081101561043157600080fd5b810190602081018135600160201b81111561044b57600080fd5b82018360208201111561045d57600080fd5b803590602001918460208302840111600160201b8311171561047e57600080fd5b509092509050610d92565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104c55781810151838201526020016104ad565b505050509050019250505060405180910390f35b3480156104e557600080fd5b506102f3610e1a565b6101b96004803603602081101561050457600080fd5b5035610e20565b34801561051757600080fd5b506102f3610f4d565b34801561052c57600080fd5b506102f36004803603602081101561054357600080fd5b5035610f6d565b34801561055657600080fd5b5061032f610f81565b34801561056b57600080fd5b506102a7610f86565b34801561058057600080fd5b506101e56004803603602081101561059757600080fd5b5035610f95565b3480156105aa57600080fd5b506102f3600480360360208110156105c157600080fd5b5035610faa565b3480156105d457600080fd5b506102f3610fc8565b3480156105e957600080fd5b506102f36004803603602081101561060057600080fd5b5035610fec565b34801561061357600080fd5b506102a7610ff9565b34801561062857600080fd5b5061032f611008565b606e546001600160a01b0316331461067a5760405162461bcd60e51b81526004018080602001828103825260258152602001806118596025913960400191505060405180910390fd5b606e80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff16610708576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610769576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff16156107cd576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b6107d686610c8d565b610827576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b838110156108ac578181015183820152602001610894565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b1580156108fe57600080fd5b505af1158015610912573d6000803e3d6000fd5b505050506040513d602081101561092857600080fd5b5051610974576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a6020908152604091829020805460ff19166001179055606d548251622fcfcb60e31b81529251610a0b9388938893889388936001600160a01b039092169263017e7e589260048082019391829003018186803b1580156109da57600080fd5b505afa1580156109ee573d6000803e3d6000fd5b505050506040513d6020811015610a0457600080fd5b505161101b565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206117e88339815191528310610ae3576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206117e88339815191528210610b2f5760405162461bcd60e51b81526004018080602001828103825260218152602001806117986021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610b8957600080fd5b505af4158015610b9d573d6000803e3d6000fd5b505050506040513d6040811015610bb357600080fd5b50805160209091015190925090506000805160206117e8833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610c2b57600080fd5b505af4158015610c3f573d6000803e3d6000fd5b505050506040513d6040811015610c5557600080fd5b505195945050505050565b6000805160206117e883398151915281565b60005463ffffffff1681565b606e546001600160a01b031681565b600081610c9c57506000610cfb565b60035463ffffffff165b60048163ffffffff1660648110610cb957fe5b0154831415610ccc576001915050610cfb565b63ffffffff8116610cdb575060645b6003546000199091019063ffffffff80831691161415610ca65760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606e546001600160a01b03163314610d705760405162461bcd60e51b81526004018080602001828103825260258152602001806118596025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610dbe578160200160208202803883390190505b50905060005b82811015610e1357610de7848483818110610ddb57fe5b90506020020135610f95565b15610e0b576001828281518110610dfa57fe5b911515602092830291909101909101525b600101610dc4565b5092915050565b60705481565b60685460ff16610e77576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610ecf5760405162461bcd60e51b81526004018080602001828103825260218152602001806118086021913960400191505060405180910390fd5b6000610eda8261114d565b6000838152606b60205260409020805460ff191660011790559050610efd6112e4565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610f6657fe5b0154905090565b60048160648110610f7a57fe5b0154905081565b606481565b606d546001600160a01b031681565b6000908152606a602052604090205460ff1690565b60028181548110610fb757fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610fb757fe5b606f546001600160a01b031681565b600354600160201b900463ffffffff1681565b8134146110595760405162461bcd60e51b81526004018080602001828103825260308152602001806117416030913960400191505060405180910390fd5b6001600160a01b0381161580159061108e5761107d86607054866069540303611330565b61108982607054611330565b61109c565b61109c868560695403611330565b83156110ac576110ac8585611330565b8215611145576040516000906001600160a01b0388169085908381818185875af1925050503d80600081146110fd576040519150601f19603f3d011682016040523d82523d6000602084013e611102565b606091505b5050905080611143576040516001600160a01b0387169085156108fc029086906000818181858888f19350505050158015611141573d6000803e3d6000fd5b505b505b505050505050565b60035460008054909163ffffffff600160201b909104811691811660020a168114156111aa5760405162461bcd60e51b815260040180806020018281038252602f8152602001806116e8602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff9081169082161015611282576001851661123e5783925060028163ffffffff168154811061120c57fe5b906000526020600020015491508360018263ffffffff168154811061122d57fe5b600091825260209091200155611262565b60018163ffffffff168154811061125157fe5b906000526020600020015492508391505b61126c8383610a7f565b9350600263ffffffff86160494506001016111da565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106112c457fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156113215760405162461bcd60e51b81526004018080602001828103825260308152602001806118296030913960400191505060405180910390fd5b61132e3330606954611501565b565b606f54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b602083106113ad5780518252601f19909201916020918201910161138e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461140f576040519150601f19603f3d011682016040523d82523d6000602084013e611414565b606091505b50915091508161145f576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156114fb5780516020146114a65760405162461bcd60e51b815260040180806020018281038252602a815260200180611717602a913960400191505060405180910390fd5b8080602001905160208110156114bb57600080fd5b50519150816114fb5760405162461bcd60e51b81526004018080602001828103825260278152602001806117716027913960400191505060405180910390fd5b50505050565b606f54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106115865780518252601f199092019160209182019101611567565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146115e8576040519150601f19603f3d011682016040523d82523d6000602084013e6115ed565b606091505b509150915081611644576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156116e057805160201461168b5760405162461bcd60e51b815260040180806020018281038252602a815260200180611717602a913960400191505060405180910390fd5b8080602001905160208110156116a057600080fd5b50519150816116e05760405162461bcd60e51b815260040180806020018281038252602f8152602001806117b9602f913960400191505060405180910390fd5b505050505056fe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a723158204b6ccc5df50175d5e6c8b1e3301b60dade15d700fbff15348226df90b372e82464736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", - "deployedBytecode": "0x6080604052600436106101815760003560e01c80639fa12d0b116100d1578063d0fb02031161008a578063ec73295911610064578063ec732959146105c8578063f178e47c146105dd578063fc0c546a14610607578063fc7e9c6f1461061c57610181565b8063d0fb02031461055f578063e5285dcc14610574578063e82955881461059e57610181565b80639fa12d0b1461040e578063b0e21e8a146104d9578063b214faa5146104ee578063ba70f7571461050b578063c2b40ae414610520578063cd87a3b41461054a57610181565b80634ecf518b1161013e578063839df94511610118578063839df945146103875780638bca6d16146103b157806390eeb02b146103c657806397fc007c146103db57610181565b80634ecf518b1461031a578063570ca735146103485780636d9833e31461035d57610181565b806306394c9b1461018657806317cc915c146101bb57806321a0adb6146101f95780632b7ac3f31461029257806338bf282e146102c3578063414a37ba14610305575b600080fd5b34801561019257600080fd5b506101b9600480360360208110156101a957600080fd5b50356001600160a01b0316610631565b005b3480156101c757600080fd5b506101e5600480360360208110156101de57600080fd5b503561069c565b604080519115158252519081900360200190f35b6101b9600480360360e081101561020f57600080fd5b810190602081018135600160201b81111561022957600080fd5b82018360208201111561023b57600080fd5b803590602001918460018302840111600160201b8311171561025c57600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a001356106b1565b34801561029e57600080fd5b506102a7610a70565b604080516001600160a01b039092168252519081900360200190f35b3480156102cf57600080fd5b506102f3600480360360408110156102e657600080fd5b5080359060200135610a7f565b60408051918252519081900360200190f35b34801561031157600080fd5b506102f3610c60565b34801561032657600080fd5b5061032f610c72565b6040805163ffffffff9092168252519081900360200190f35b34801561035457600080fd5b506102a7610c7e565b34801561036957600080fd5b506101e56004803603602081101561038057600080fd5b5035610c8d565b34801561039357600080fd5b506101e5600480360360208110156103aa57600080fd5b5035610d00565b3480156103bd57600080fd5b506102f3610d15565b3480156103d257600080fd5b5061032f610d1b565b3480156103e757600080fd5b506101b9600480360360208110156103fe57600080fd5b50356001600160a01b0316610d27565b34801561041a57600080fd5b506104896004803603602081101561043157600080fd5b810190602081018135600160201b81111561044b57600080fd5b82018360208201111561045d57600080fd5b803590602001918460208302840111600160201b8311171561047e57600080fd5b509092509050610d92565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104c55781810151838201526020016104ad565b505050509050019250505060405180910390f35b3480156104e557600080fd5b506102f3610e1a565b6101b96004803603602081101561050457600080fd5b5035610e20565b34801561051757600080fd5b506102f3610f4d565b34801561052c57600080fd5b506102f36004803603602081101561054357600080fd5b5035610f6d565b34801561055657600080fd5b5061032f610f81565b34801561056b57600080fd5b506102a7610f86565b34801561058057600080fd5b506101e56004803603602081101561059757600080fd5b5035610f95565b3480156105aa57600080fd5b506102f3600480360360208110156105c157600080fd5b5035610faa565b3480156105d457600080fd5b506102f3610fc8565b3480156105e957600080fd5b506102f36004803603602081101561060057600080fd5b5035610fec565b34801561061357600080fd5b506102a7610ff9565b34801561062857600080fd5b5061032f611008565b606e546001600160a01b0316331461067a5760405162461bcd60e51b81526004018080602001828103825260258152602001806118596025913960400191505060405180910390fd5b606e80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff16610708576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610769576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff16156107cd576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b6107d686610c8d565b610827576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b838110156108ac578181015183820152602001610894565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b1580156108fe57600080fd5b505af1158015610912573d6000803e3d6000fd5b505050506040513d602081101561092857600080fd5b5051610974576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a6020908152604091829020805460ff19166001179055606d548251622fcfcb60e31b81529251610a0b9388938893889388936001600160a01b039092169263017e7e589260048082019391829003018186803b1580156109da57600080fd5b505afa1580156109ee573d6000803e3d6000fd5b505050506040513d6020811015610a0457600080fd5b505161101b565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206117e88339815191528310610ae3576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206117e88339815191528210610b2f5760405162461bcd60e51b81526004018080602001828103825260218152602001806117986021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610b8957600080fd5b505af4158015610b9d573d6000803e3d6000fd5b505050506040513d6040811015610bb357600080fd5b50805160209091015190925090506000805160206117e8833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610c2b57600080fd5b505af4158015610c3f573d6000803e3d6000fd5b505050506040513d6040811015610c5557600080fd5b505195945050505050565b6000805160206117e883398151915281565b60005463ffffffff1681565b606e546001600160a01b031681565b600081610c9c57506000610cfb565b60035463ffffffff165b60048163ffffffff1660648110610cb957fe5b0154831415610ccc576001915050610cfb565b63ffffffff8116610cdb575060645b6003546000199091019063ffffffff80831691161415610ca65760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606e546001600160a01b03163314610d705760405162461bcd60e51b81526004018080602001828103825260258152602001806118596025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610dbe578160200160208202803883390190505b50905060005b82811015610e1357610de7848483818110610ddb57fe5b90506020020135610f95565b15610e0b576001828281518110610dfa57fe5b911515602092830291909101909101525b600101610dc4565b5092915050565b60705481565b60685460ff16610e77576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610ecf5760405162461bcd60e51b81526004018080602001828103825260218152602001806118086021913960400191505060405180910390fd5b6000610eda8261114d565b6000838152606b60205260409020805460ff191660011790559050610efd6112e4565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610f6657fe5b0154905090565b60048160648110610f7a57fe5b0154905081565b606481565b606d546001600160a01b031681565b6000908152606a602052604090205460ff1690565b60028181548110610fb757fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610fb757fe5b606f546001600160a01b031681565b600354600160201b900463ffffffff1681565b8134146110595760405162461bcd60e51b81526004018080602001828103825260308152602001806117416030913960400191505060405180910390fd5b6001600160a01b0381161580159061108e5761107d86607054866069540303611330565b61108982607054611330565b61109c565b61109c868560695403611330565b83156110ac576110ac8585611330565b8215611145576040516000906001600160a01b0388169085908381818185875af1925050503d80600081146110fd576040519150601f19603f3d011682016040523d82523d6000602084013e611102565b606091505b5050905080611143576040516001600160a01b0387169085156108fc029086906000818181858888f19350505050158015611141573d6000803e3d6000fd5b505b505b505050505050565b60035460008054909163ffffffff600160201b909104811691811660020a168114156111aa5760405162461bcd60e51b815260040180806020018281038252602f8152602001806116e8602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff9081169082161015611282576001851661123e5783925060028163ffffffff168154811061120c57fe5b906000526020600020015491508360018263ffffffff168154811061122d57fe5b600091825260209091200155611262565b60018163ffffffff168154811061125157fe5b906000526020600020015492508391505b61126c8383610a7f565b9350600263ffffffff86160494506001016111da565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106112c457fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156113215760405162461bcd60e51b81526004018080602001828103825260308152602001806118296030913960400191505060405180910390fd5b61132e3330606954611501565b565b606f54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b602083106113ad5780518252601f19909201916020918201910161138e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461140f576040519150601f19603f3d011682016040523d82523d6000602084013e611414565b606091505b50915091508161145f576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156114fb5780516020146114a65760405162461bcd60e51b815260040180806020018281038252602a815260200180611717602a913960400191505060405180910390fd5b8080602001905160208110156114bb57600080fd5b50519150816114fb5760405162461bcd60e51b81526004018080602001828103825260278152602001806117716027913960400191505060405180910390fd5b50505050565b606f54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106115865780518252601f199092019160209182019101611567565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146115e8576040519150601f19603f3d011682016040523d82523d6000602084013e6115ed565b606091505b509150915081611644576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156116e057805160201461168b5760405162461bcd60e51b815260040180806020018281038252602a815260200180611717602a913960400191505060405180910390fd5b8080602001905160208110156116a057600080fd5b50519150816116e05760405162461bcd60e51b815260040180806020018281038252602f8152602001806117b9602f913960400191505060405180910390fd5b505050505056fe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a723158204b6ccc5df50175d5e6c8b1e3301b60dade15d700fbff15348226df90b372e82464736f6c63430005110032", - "sourceMap": "805:2570:0:-;;;1430:34:2;;;-1:-1:-1;;;;;;1468:27:2;;;897:334:0;5:2:-1;;;;30:1;27;20:12;5:2;897:334:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;897:334:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1646:15:2;;;1638:67;;;;-1:-1:-1;;;1638:67:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1733:2;1719:11;:16;;;1711:63;;;;-1:-1:-1;;;1711:63:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1780:6;:20;;-1:-1:-1;;1780:20:2;;;;;;;1854:5;27:10:-1;;-1:-1;23:18;;;45:23;;;1088:77:2;-1:-1:-1;;;;;;;;;;;1854:23:2;;;;;;27:10:-1;;23:18;;;45:23;;1883:32:2;;;;-1:-1:-1;;;;;;;;;;;1883:32:2;;;;;;1922:175;1945:6;;;;;;1941:10;;;;1922:175;;;1980:39;1994:11;;-1:-1:-1;;;;;1980:13:2;:39;:::i;:::-;2027:5;27:10:-1;;39:1;23:18;;;45:23;;;-1:-1;;;;;;;;;;;2027:23:2;;;;27:10:-1;;23:18;;;45:23;;-1:-1;2058:32:2;;;-1:-1:-1;;;;;;;;;;;2058:32:2;;;;1966:53;;-1:-1:-1;1953:3:2;1922:175;;;-1:-1:-1;2114:39:2;2128:11;;-1:-1:-1;;;;;2114:13:2;:39;:::i;:::-;2103:5;2109:1;2103:8;:50;-1:-1:-1;;1421:11:18;:18;;-1:-1:-1;;1421:18:18;1435:4;1421:18;;;1645:17:8;1637:67;;;;-1:-1:-1;;;1637:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1710:8;:20;;-1:-1:-1;;;;;;1710:20:8;;;-1:-1:-1;;;;;1710:20:8;;;;;;;1736:10;:24;;;;;;;;;;;;;;1766:8;:20;;;;;;;;;;;;;-1:-1:-1;1792:12:8;:28;1157:5:0;:14;;;;;;;;;;;;;;1223:3;1207:13;:19;1193:11;:33;-1:-1:-1;805:2570:0;;-1:-1:-1;;;;;805:2570:0;2230:445:2;2305:7;-1:-1:-1;;;;;;;;;;;2328:27:2;;2320:72;;;;;-1:-1:-1;;;2320:72:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2406:28:2;;2398:74;;;;-1:-1:-1;;;2398:74:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2538:23;;;-1:-1:-1;;;2538:23:2;;;;;;;;2478:9;2538:23;;;;;;;;2498:5;;2478:9;;2538:6;;:17;;:23;;;;;;;;;;:6;:23;;;5:2:-1;;;;30:1;27;20:12;5:2;2538:23:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2538:23:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2538:23:2;;;;;;;;;-1:-1:-1;2538:23:2;-1:-1:-1;;;;;;;;;;;;2589:6:2;2578:1;2571:38;2567:42;;2624:6;:17;2642:1;2645;2624:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2624:23:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2624:23:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2624:23:2;;2230:445;-1:-1:-1;;;;;2230:445:2:o;805:2570:0:-;;;;;;;", - "deployedSourceMap": "805:2570:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4814:102:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4814:102:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4814:102:8;-1:-1:-1;;;;;4814:102:8;;:::i;:::-;;412:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;412:47:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;412:47:8;;:::i;:::-;;;;;;;;;;;;;;;;;;2893:801;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2893:801:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;2893:801:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2893:801:8;;;;;;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;2893:801:8;;-1:-1:-1;2893:801:8;-1:-1:-1;2893:801:8;;;;;;;;-1:-1:-1;;;;;2893:801:8;;;;;;;;;;;;;;;;;;;;;;;;:::i;601:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;601:25:8;;;:::i;:::-;;;;-1:-1:-1;;;;;601:25:8;;;;;;;;;;;;;;2230:445:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2230:445:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2230:445:2;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;933:114;;8:9:-1;5:2;;;30:1;27;20:12;5:2;933:114:2;;;:::i;1209:20::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1209:20:2;;;:::i;:::-;;;;;;;;;;;;;;;;;;;819:23:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;819:23:8;;;:::i;3553:342:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3553:342:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3553:342:2;;:::i;554:43:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;554:43:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;554:43:8;;:::i;381:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;381:27:8;;;:::i;1430:34:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:2;;;:::i;4651:113:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4651:113:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4651:113:8;-1:-1:-1;;;;;4651:113:8;;:::i;4128:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4128:293:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4128:293:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4128:293:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4128:293:8;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;4128:293:8;;-1:-1:-1;4128:293:8;-1:-1:-1;4128:293:8;:::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;4128:293:8;;;;;;;;;;;;;;;;;866:26:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;866:26:0;;;:::i;2073:324:8:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2073:324:8;;:::i;3941:93:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3941:93:2;;;:::i;1549:39::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1549:39:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1549:39:2;;:::i;1499:46::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1499:46:2;;;:::i;630:29:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;630:29:8;;;:::i;3951:116::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3951:116:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3951:116:8;;:::i;1404:22:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1404:22:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1404:22:2;;:::i;1051:114::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1051:114:2;;;:::i;1369:31::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1369:31:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1369:31:2;;:::i;842:20:0:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;842:20:0;;;:::i;1468:27:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1468:27:2;;;:::i;4814:102:8:-;896:8;;-1:-1:-1;;;;;896:8:8;882:10;:22;874:72;;;;-1:-1:-1;;;874:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4888:8;:23;;-1:-1:-1;;;;;;4888:23:8;-1:-1:-1;;;;;4888:23:8;;;;;;;;;;4814:102::o;412:47::-;;;;;;;;;;;;;;;:::o;2893:801::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;3110:12:8;;3102:20;;;3094:59;;;;;-1:-1:-1;;;3094:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3168:31;;;;:15;:31;;;;;;;;3167:32;3159:76;;;;;-1:-1:-1;;;3159:76:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3249:18;3261:5;3249:11;:18::i;:::-;3241:59;;;;;-1:-1:-1;;;3241:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3347:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3418:19:8;;;3347:126;;;;3439:17;;;3347:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3347:126:8;;:8;;;;;:20;;3368:6;;;;3347:126;;;;;;;;;;;;;;;;:8;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;3347:126:8;;;;;;;;;;;;;;;;;;;;;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;;3347:126:8;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3347:126:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3347:126:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3347:126:8;3339:161;;;;;-1:-1:-1;;;3339:161:8;;;;;;;;;;;;-1:-1:-1;;;3339:161:8;;;;;;;;;;;;;;;3507:31;;;;:15;:31;;;;;;;;;:38;;-1:-1:-1;;3507:38:8;3541:4;3507:38;;;3605:10;;:18;;-1:-1:-1;;;3605:18:8;;;;3551:73;;3568:10;;3580:8;;3590:4;;3596:7;;-1:-1:-1;;;;;3605:10:8;;;;:16;;:18;;;;;;;;;;;:10;:18;;;5:2:-1;;;;30:1;27;20:12;5:2;3605:18:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3605:18:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3605:18:8;3551:16;:73::i;:::-;3635:54;;;-1:-1:-1;;;;;3635:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;-1:-1:-1;;;;;;2893:801:8:o;601:25::-;;;-1:-1:-1;;;;;601:25:8;;:::o;2230:445:2:-;2305:7;-1:-1:-1;;;;;;;;;;;2328:27:2;;2320:72;;;;;-1:-1:-1;;;2320:72:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2406:28:2;;2398:74;;;;-1:-1:-1;;;2398:74:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2538:23;;;-1:-1:-1;;;2538:23:2;;;;;;;;2478:9;2538:23;;;;;;;;2498:5;;2478:9;;2538:6;;:17;;:23;;;;;;;;;;:6;:23;;;5:2:-1;;;;30:1;27;20:12;5:2;2538:23:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2538:23:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2538:23:2;;;;;;;;;-1:-1:-1;2538:23:2;-1:-1:-1;;;;;;;;;;;;2589:6:2;2578:1;2571:38;2567:42;;2624:6;:17;2642:1;2645;2624:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2624:23:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2624:23:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2624:23:2;;2230:445;-1:-1:-1;;;;;2230:445:2:o;933:114::-;-1:-1:-1;;;;;;;;;;;933:114:2;:::o;1209:20::-;;;;;;:::o;819:23:8:-;;;-1:-1:-1;;;;;819:23:8;;:::o;3553:342:2:-;3609:4;3625:10;3621:43;;-1:-1:-1;3652:5:2;3645:12;;3621:43;3680:16;;;;3702:171;3726:5;3732:1;3726:8;;;;;;;;;;;3717:5;:17;3713:53;;;3753:4;3746:11;;;;;3713:53;3777:6;;;3773:52;;-1:-1:-1;1542:3:2;3773:52;3855:16;;-1:-1:-1;;3832:3:2;;;;3855:16;3850:21;;;3855:16;;3850:21;;3702:171;;3885:5;3878:12;;;3553:342;;;;:::o;554:43:8:-;;;;;;;;;;;;;;;:::o;381:27::-;;;;:::o;1430:34:2:-;;;;;;:::o;4651:113:8:-;896:8;;-1:-1:-1;;;;;896:8:8;882:10;:22;874:72;;;;-1:-1:-1;;;874:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4725:8;:34;;-1:-1:-1;;;;;;4725:34:8;-1:-1:-1;;;;;4725:34:8;;;;;;;;;;4651:113::o;4128:293::-;4244:35;;;;;;;;;;;;;;;;4209:19;;4255:16;4244:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4244:35:8;-1:-1:-1;4236:43:8;-1:-1:-1;4289:6:8;4285:132;4301:27;;;4285:132;;;4347:28;4355:16;;4372:1;4355:19;;;;;;;;;;;;;4347:7;:28::i;:::-;4343:68;;;4398:4;4387:5;4393:1;4387:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4343:68;4330:3;;4285:132;;;;4128:293;;;;:::o;866:26:0:-;;;;:::o;2073:324:8:-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;2070:5;2156:24:8;;;:11;:24;;;;;;2056:19:18;2156:24:8;2155:25;2147:71;;;;-1:-1:-1;;;2147:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2225:20;2248;2256:11;2248:7;:20::i;:::-;2274:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2274:31:8;2301:4;2274:31;;;2225:43;-1:-1:-1;2311:17:8;:15;:17::i;:::-;2340:52;;;;;;;;2376:15;2340:52;;;;;;2348:11;;2340:52;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;2073:324:8:o;3941:93:2:-;4012:16;;3984:7;;4006:5;;4012:16;;4006:23;;;;;;;;;3999:30;;3941:93;:::o;1549:39::-;;;;;;;;;;;;;-1:-1:-1;1549:39:2;:::o;1499:46::-;1542:3;1499:46;:::o;630:29:8:-;;;-1:-1:-1;;;;;630:29:8;;:::o;3951:116::-;4012:4;4031:31;;;:15;:31;;;;;;;;;3951:116::o;1404:22:2:-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1404:22:2;:::o;1051:114::-;1088:77;1051:114;:::o;1369:31::-;;;;;;;;;;842:20:0;;;-1:-1:-1;;;;;842:20:0;;:::o;1468:27:2:-;;;-1:-1:-1;;;1468:27:2;;;;;:::o;1430:801:0:-;1601:7;1588:9;:20;1580:81;;;;-1:-1:-1;;;1580:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1681:20:0;;;;;;1707:226;;1726:73;1745:10;1787:11;;1772:12;1757;;:27;:41;1726:18;:73::i;:::-;1807:39;1826:6;1834:11;;1807:18;:39::i;:::-;1707:226;;;1867:59;1886:10;1913:12;1898;;:27;1867:18;:59::i;:::-;1943:16;;1939:79;;1969:42;1988:8;1998:12;1969:18;:42::i;:::-;2028:11;;2024:203;;2068:34;;2050:12;;-1:-1:-1;;;;;2068:15:0;;;2090:7;;2050:12;2068:34;2050:12;2068:34;2090:7;2068:15;:34;;;;;;;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;;2049:53:0;;;2115:7;2110:111;;2186:26;;-1:-1:-1;;;;;2186:17:0;;;:26;;;;;2204:7;;2186:26;;;;2204:7;2186:17;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2186:26:0;2110:111;2024:203;;1430:801;;;;;;:::o;2679:802:2:-;2770:9;;2728:12;2820:6;;2728:12;;2770:9;-1:-1:-1;;;2770:9:2;;;;;;2820:6;;2816:1;2809:17;2793:33;;;;2785:93;;;;-1:-1:-1;;;2785:93:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2884:9;:14;;;-1:-1:-1;;;2884:14:2;;;;;2897:1;2884:14;;;;;-1:-1:-1;;2884:14:2;;;;;;2931:5;-1:-1:-1;;;2980:355:2;3003:6;;;;;;2999:10;;;;2980:355;;;3028:16;;;3024:225;;3068:16;3061:23;;3102:5;3108:1;3102:8;;;;;;;;;;;;;;;;;;3094:16;;3141;3121:14;3136:1;3121:17;;;;;;;;;;;;;;;;;;;:36;3024:225;;;3189:14;3204:1;3189:17;;;;;;;;;;;;;;;;;;3182:24;;3224:16;3216:24;;3024:225;3276:26;3290:4;3296:5;3276:13;:26::i;:::-;3257:45;-1:-1:-1;3327:1:2;3311:17;;;;;-1:-1:-1;3011:3:2;;2980:355;;;-1:-1:-1;3361:16:2;;1542:3;;3360:42;3361:16;;;;:20;3360:42;3341:16;:61;;-1:-1:-1;;3341:61:2;3360:42;;;;3341:61;;;;;;;;;;;;3434:16;;3408:5;;3414:16;3408:23;;;;;;;;:42;-1:-1:-1;;3463:9:2;;-1:-1:-1;;;3463:9:2;;;;-1:-1:-1;;3463:13:2;;2679:802;-1:-1:-1;;;;2679:802:2:o;1235:191:0:-;1285:9;:14;1277:75;;;;-1:-1:-1;;;1277:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1358:63;1381:10;1401:4;1408:12;;1358:22;:63::i;:::-;1235:191::o;2829:544::-;2938:5;;2949:63;;;-1:-1:-1;;;;;2949:63:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2949:63:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2938:75:0;;;;2903:12;;2917:17;;2938:5;;;2949:63;2938:75;;;;25:18:-1;36:153;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;;;2938:75:0;;;;;;;;;;;;;;;;;;;;;;;;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;;2902:111:0;;;;3027:7;3019:37;;;;;-1:-1:-1;;;3019:37:0;;;;;;;;;;;;-1:-1:-1;;;3019:37:0;;;;;;;;;;;;;;;3156:11;;:15;3152:217;;3189:4;:11;3204:2;3189:17;3181:72;;;;-1:-1:-1;;;3181:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3282:4;3271:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3271:24:0;;-1:-1:-1;3271:24:0;3303:59;;;;-1:-1:-1;;;3303:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2829:544;;;;:::o;2235:590::-;2363:5;;2374:74;;;-1:-1:-1;;;;;2374:74:0;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2374:74:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2363:86:0;;;;2328:12;;2342:17;;2363:5;;;2374:74;2363:86;;;;25:18:-1;36:153;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;;;2363:86:0;;;;;;;;;;;;;;;;;;;;;;;;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;;2327:122:0;;;;2463:7;2455:45;;;;;-1:-1:-1;;;2455:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2600:11;;:15;2596:225;;2633:4;:11;2648:2;2633:17;2625:72;;;;-1:-1:-1;;;2625:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2726:4;2715:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2715:24:0;;-1:-1:-1;2715:24:0;2747:67;;;;-1:-1:-1;;;2747:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2235:590;;;;;:::o", - "source": "// https://tornado.cash\n/*\n* d888888P dP a88888b. dP\n* 88 88 d8' `88 88\n* 88 .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b. 88 .d8888b. .d8888b. 88d888b.\n* 88 88' `88 88' `88 88' `88 88' `88 88' `88 88' `88 88 88' `88 Y8ooooo. 88' `88\n* 88 88. .88 88 88 88 88. .88 88. .88 88. .88 dP Y8. .88 88. .88 88 88 88\n* dP `88888P' dP dP dP `88888P8 `88888P8 `88888P' 88 Y88888P' `88888P8 `88888P' dP dP\n* ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\n*/\n\npragma solidity 0.5.17;\n\nimport \"./Tornado.sol\";\n\ncontract ERC20Tornado is Tornado {\n address public token;\n uint256 public protocolFee;\n\n constructor(\n IVerifier _verifier,\n IFeeManager _feeManager,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator,\n address _token\n ) Tornado(_verifier, _feeManager, _denomination, _merkleTreeHeight, _operator) public {\n token = _token;\n // 0.5% fee\n protocolFee = _denomination / 200;\n }\n\n function _processDeposit() internal {\n require(msg.value == 0, \"ETH value is supposed to be 0 for ERC20 instance\");\n _safeErc20TransferFrom(msg.sender, address(this), denomination);\n }\n\n function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund, address _feeTo) internal {\n require(msg.value == _refund, \"Incorrect refund amount received by the contract\");\n\n bool feeOn = _feeTo != address(0);\n if (feeOn) {\n _safeErc20Transfer(_recipient, denomination - _relayer_fee - protocolFee);\n _safeErc20Transfer(_feeTo, protocolFee);\n } else {\n _safeErc20Transfer(_recipient, denomination - _relayer_fee);\n }\n\n if (_relayer_fee > 0) {\n _safeErc20Transfer(_relayer, _relayer_fee);\n }\n\n if (_refund > 0) {\n (bool success, ) = _recipient.call.value(_refund)(\"\");\n if (!success) {\n // let's return _refund back to the relayer\n _relayer.transfer(_refund);\n }\n }\n }\n\n function _safeErc20TransferFrom(address _from, address _to, uint256 _amount) internal {\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd /* transferFrom */, _from, _to, _amount));\n require(success, \"not enough allowed tokens\");\n\n // if contract returns some data lets make sure that is `true` according to standard\n if (data.length > 0) {\n require(data.length == 32, \"data length should be either 0 or 32 bytes\");\n success = abi.decode(data, (bool));\n require(success, \"not enough allowed tokens. Token returns false.\");\n }\n }\n\n function _safeErc20Transfer(address _to, uint256 _amount) internal {\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb /* transfer */, _to, _amount));\n require(success, \"not enough tokens\");\n\n // if contract returns some data lets make sure that is `true` according to standard\n if (data.length > 0) {\n require(data.length == 32, \"data length should be either 0 or 32 bytes\");\n success = abi.decode(data, (bool));\n require(success, \"not enough tokens. Token returns false.\");\n }\n }\n}\n", + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"contract IFeeManager\",\"name\":\"_feeManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_denomination\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_merkleTreeHeight\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"leafIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"nullifierHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"FIELD_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ROOT_HISTORY_SIZE\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ZERO_VALUE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOperator\",\"type\":\"address\"}],\"name\":\"changeOperator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"commitments\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentRootIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"denomination\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_commitment\",\"type\":\"bytes32\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeManager\",\"outputs\":[{\"internalType\":\"contract IFeeManager\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"filledSubtrees\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLastRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_left\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_right\",\"type\":\"bytes32\"}],\"name\":\"hashLeftRight\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"}],\"name\":\"isKnownRoot\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"}],\"name\":\"isSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_nullifierHashes\",\"type\":\"bytes32[]\"}],\"name\":\"isSpentArray\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"spent\",\"type\":\"bool[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"levels\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nullifierHashes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"roots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_refund\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"zeros\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"changeOperator(address)\":{\"details\":\"operator can change his address \"},\"deposit(bytes32)\":{\"details\":\"Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\",\"params\":{\"_commitment\":\"the note commitment, which is PedersenHash(nullifier + secret)\"}},\"getLastRoot()\":{\"details\":\"Returns the last root\"},\"hashLeftRight(bytes32,bytes32)\":{\"details\":\"Hash 2 tree leaves, returns MiMC(_left, _right)\"},\"isKnownRoot(bytes32)\":{\"details\":\"Whether the root is present in the root history\"},\"isSpent(bytes32)\":{\"details\":\"whether a note is already spent \"},\"isSpentArray(bytes32[])\":{\"details\":\"whether an array of notes is already spent \"},\"updateVerifier(address)\":{\"details\":\"allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address\"},\"withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)\":{\"details\":\"Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0xbd85f0da69a18b21440f06b5f8a595739d54b17bf7d1bc1fe8466b3a2a9c60f2\",\"urls\":[\"bzz-raw://46fa01fd0462818dbf879bc28e54d4ff42a6b633eb5e96c7fb6de480de8f1062\",\"dweb:/ipfs/QmY34nCA4m7WApU7ENTaJEzStCj1vjAB4evy2DFsEcevy5\"]},\"/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/home/home/dotfiles/tornado-core/contracts/SafeMath.sol\":{\"keccak256\":\"0x92dbc60a1308f6f7fc49158be2792c9eb7d4cb2a828628b9ac67b09402caeaf9\",\"urls\":[\"bzz-raw://875473c162bd502c1dd2c1f40f812e337a16da7c27475d7ffc4f9dd72db65c49\",\"dweb:/ipfs/QmUVCJUnPDkQ6AV78uFvegmKJUMtFNb1Jy7cKYJLvHLu2E\"]},\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x7269c9361452a555e6f29e924e70d4478a8a5bd86c7b33ea3731470a52c235b5\",\"urls\":[\"bzz-raw://eddd542888565cb84d4dac710511b0f02afbed2e0e1a7d25e0425e6d69b7712f\",\"dweb:/ipfs/Qma1KWoX8nZYK1d1PAfRiZH4prYqM347dMkWM6DjJzTqYY\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001f9a38038062001f9a833981810160405260c08110156200004757600080fd5b508051602082015160408301516060840151608085015160a090950151939492939192909185858585858163ffffffff8116620000b65760405162461bcd60e51b815260040180806020018281038252602781526020018062001f116027913960400191505060405180910390fd5b60208163ffffffff1610620000fd5760405162461bcd60e51b815260040180806020018281038252602281526020018062001f586022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001ed0833981519152909101819055815480830183559282905260008051602062001f7a8339815191529092018290555b60005463ffffffff9081169082161015620001eb57620001a182806001600160e01b03620002b316565b60028054600181810190925560008051602062001ed08339815191520182905580548082018255600082905260008051602062001f7a833981519152018290559092500162000177565b506200020181806001600160e01b03620002b316565b60046000015550506068805460ff1916600117905582620002545760405162461bcd60e51b815260040180806020018281038252602581526020018062001eab6025913960400191505060405180910390fd5b606c80546001600160a01b03199081166001600160a01b0397881617909155606d8054821695871695909517909455606e8054851691861691909117905550606955606f80549091169290911691909117905550620004a09350505050565b600060008051602062001f38833981519152831062000319576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001f388339815191528210620003685760405162461bcd60e51b815260040180806020018281038252602181526020018062001ef06021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003c357600080fd5b505af4158015620003d8573d6000803e3d6000fd5b505050506040513d6040811015620003ef57600080fd5b508051602090910151909250905060008051602062001f38833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200046957600080fd5b505af41580156200047e573d6000803e3d6000fd5b505050506040513d60408110156200049557600080fd5b505195945050505050565b6119fb80620004b06000396000f3fe6080604052600436106101665760003560e01c806397fc007c116100d1578063d0fb02031161008a578063ec73295911610064578063ec73295914610598578063f178e47c146105ad578063fc0c546a146105d7578063fc7e9c6f146105ec57610166565b8063d0fb02031461052f578063e5285dcc14610544578063e82955881461056e57610166565b806397fc007c146103c05780639fa12d0b146103f3578063b214faa5146104be578063ba70f757146104db578063c2b40ae4146104f0578063cd87a3b41461051a57610166565b80634ecf518b116101235780634ecf518b146102ff578063570ca7351461032d5780636d9833e314610342578063839df9451461036c5780638bca6d161461039657806390eeb02b146103ab57610166565b806306394c9b1461016b57806317cc915c146101a057806321a0adb6146101de5780632b7ac3f31461027757806338bf282e146102a8578063414a37ba146102ea575b600080fd5b34801561017757600080fd5b5061019e6004803603602081101561018e57600080fd5b50356001600160a01b0316610601565b005b3480156101ac57600080fd5b506101ca600480360360208110156101c357600080fd5b503561066c565b604080519115158252519081900360200190f35b61019e600480360360e08110156101f457600080fd5b810190602081018135600160201b81111561020e57600080fd5b82018360208201111561022057600080fd5b803590602001918460018302840111600160201b8311171561024157600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610681565b34801561028357600080fd5b5061028c6109ce565b604080516001600160a01b039092168252519081900360200190f35b3480156102b457600080fd5b506102d8600480360360408110156102cb57600080fd5b50803590602001356109dd565b60408051918252519081900360200190f35b3480156102f657600080fd5b506102d8610bbe565b34801561030b57600080fd5b50610314610bd0565b6040805163ffffffff9092168252519081900360200190f35b34801561033957600080fd5b5061028c610bdc565b34801561034e57600080fd5b506101ca6004803603602081101561036557600080fd5b5035610beb565b34801561037857600080fd5b506101ca6004803603602081101561038f57600080fd5b5035610c5e565b3480156103a257600080fd5b506102d8610c73565b3480156103b757600080fd5b50610314610c79565b3480156103cc57600080fd5b5061019e600480360360208110156103e357600080fd5b50356001600160a01b0316610c85565b3480156103ff57600080fd5b5061046e6004803603602081101561041657600080fd5b810190602081018135600160201b81111561043057600080fd5b82018360208201111561044257600080fd5b803590602001918460208302840111600160201b8311171561046357600080fd5b509092509050610cf0565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104aa578181015183820152602001610492565b505050509050019250505060405180910390f35b61019e600480360360208110156104d457600080fd5b5035610d78565b3480156104e757600080fd5b506102d8610ea5565b3480156104fc57600080fd5b506102d86004803603602081101561051357600080fd5b5035610ec5565b34801561052657600080fd5b50610314610ed9565b34801561053b57600080fd5b5061028c610ede565b34801561055057600080fd5b506101ca6004803603602081101561056757600080fd5b5035610eed565b34801561057a57600080fd5b506102d86004803603602081101561059157600080fd5b5035610f02565b3480156105a457600080fd5b506102d8610f20565b3480156105b957600080fd5b506102d8600480360360208110156105d057600080fd5b5035610f44565b3480156105e357600080fd5b5061028c610f51565b3480156105f857600080fd5b50610314610f60565b606e546001600160a01b0316331461064a5760405162461bcd60e51b81526004018080602001828103825260258152602001806119a26025913960400191505060405180910390fd5b606e80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610739576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561079d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b6107a686610beb565b6107f7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561087c578181015183820152602001610864565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b1580156108ce57600080fd5b505af11580156108e2573d6000803e3d6000fd5b505050506040513d60208110156108f857600080fd5b5051610944576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561096984848484610f73565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206119318339815191528310610a41576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206119318339815191528210610a8d5760405162461bcd60e51b81526004018080602001828103825260218152602001806118e16021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ae757600080fd5b505af4158015610afb573d6000803e3d6000fd5b505050506040513d6040811015610b1157600080fd5b5080516020909101519092509050600080516020611931833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b8957600080fd5b505af4158015610b9d573d6000803e3d6000fd5b505050506040513d6040811015610bb357600080fd5b505195945050505050565b60008051602061193183398151915281565b60005463ffffffff1681565b606e546001600160a01b031681565b600081610bfa57506000610c59565b60035463ffffffff165b60048163ffffffff1660648110610c1757fe5b0154831415610c2a576001915050610c59565b63ffffffff8116610c39575060645b6003546000199091019063ffffffff80831691161415610c045760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606e546001600160a01b03163314610cce5760405162461bcd60e51b81526004018080602001828103825260258152602001806119a26025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610d1c578160200160208202803883390190505b50905060005b82811015610d7157610d45848483818110610d3957fe5b90506020020135610eed565b15610d69576001828281518110610d5857fe5b911515602092830291909101909101525b600101610d22565b5092915050565b60685460ff16610dcf576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610e275760405162461bcd60e51b81526004018080602001828103825260218152602001806119516021913960400191505060405180910390fd5b6000610e32826111ab565b6000838152606b60205260409020805460ff191660011790559050610e55611342565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610ebe57fe5b0154905090565b60048160648110610ed257fe5b0154905081565b606481565b606d546001600160a01b031681565b6000908152606a602052604090205460ff1690565b60028181548110610f0f57fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610f0f57fe5b606f546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610fb15760405162461bcd60e51b815260040180806020018281038252603081526020018061188a6030913960400191505060405180910390fd5b606d5460408051622fcfcb60e31b815290516000926001600160a01b03169163017e7e58916004808301926020929190829003018186803b158015610ff557600080fd5b505afa158015611009573d6000803e3d6000fd5b505050506040513d602081101561101f57600080fd5b5051606d5460408051633b46a6e760e01b815290519293506000926001600160a01b0390921691633b46a6e791600480820192602092909190829003018186803b15801561106c57600080fd5b505afa158015611080573d6000803e3d6000fd5b505050506040513d602081101561109657600080fd5b5051905060006001600160a01b038316158015906110b357508115155b905080156110eb5760006110c96069548461138e565b90506110db88828860695403036113d7565b6110e584826113d7565b506110f9565b6110f98786606954036113d7565b84156111095761110986866113d7565b83156111a2576040516000906001600160a01b0389169086908381818185875af1925050503d806000811461115a576040519150601f19603f3d011682016040523d82523d6000602084013e61115f565b606091505b50509050806111a0576040516001600160a01b0388169086156108fc029087906000818181858888f1935050505015801561119e573d6000803e3d6000fd5b505b505b50505050505050565b60035460008054909163ffffffff600160201b909104811691811660020a168114156112085760405162461bcd60e51b815260040180806020018281038252602f815260200180611831602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff90811690821610156112e0576001851661129c5783925060028163ffffffff168154811061126a57fe5b906000526020600020015491508360018263ffffffff168154811061128b57fe5b6000918252602090912001556112c0565b60018163ffffffff16815481106112af57fe5b906000526020600020015492508391505b6112ca83836109dd565b9350600263ffffffff8616049450600101611238565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff90811692909217908190558491600491166064811061132257fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b341561137f5760405162461bcd60e51b81526004018080602001828103825260308152602001806119726030913960400191505060405180910390fd5b61138c33306069546115a8565b565b60006113d083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061178e565b9392505050565b606f54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b602083106114545780518252601f199092019160209182019101611435565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114b6576040519150601f19603f3d011682016040523d82523d6000602084013e6114bb565b606091505b509150915081611506576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156115a257805160201461154d5760405162461bcd60e51b815260040180806020018281038252602a815260200180611860602a913960400191505060405180910390fd5b80806020019051602081101561156257600080fd5b50519150816115a25760405162461bcd60e51b81526004018080602001828103825260278152602001806118ba6027913960400191505060405180910390fd5b50505050565b606f54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b6020831061162d5780518252601f19909201916020918201910161160e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461168f576040519150601f19603f3d011682016040523d82523d6000602084013e611694565b606091505b5091509150816116eb576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156117875780516020146117325760405162461bcd60e51b815260040180806020018281038252602a815260200180611860602a913960400191505060405180910390fd5b80806020019051602081101561174757600080fd5b50519150816117875760405162461bcd60e51b815260040180806020018281038252602f815260200180611902602f913960400191505060405180910390fd5b5050505050565b6000818361181a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117df5781810151838201526020016117c7565b50505050905090810190601f16801561180c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161182657fe5b049594505050505056fe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a7231582028aa7561e325e8422f994b89b4b55657010796368b3736fa5a11d78144123e9264736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", + "deployedBytecode": "0x6080604052600436106101665760003560e01c806397fc007c116100d1578063d0fb02031161008a578063ec73295911610064578063ec73295914610598578063f178e47c146105ad578063fc0c546a146105d7578063fc7e9c6f146105ec57610166565b8063d0fb02031461052f578063e5285dcc14610544578063e82955881461056e57610166565b806397fc007c146103c05780639fa12d0b146103f3578063b214faa5146104be578063ba70f757146104db578063c2b40ae4146104f0578063cd87a3b41461051a57610166565b80634ecf518b116101235780634ecf518b146102ff578063570ca7351461032d5780636d9833e314610342578063839df9451461036c5780638bca6d161461039657806390eeb02b146103ab57610166565b806306394c9b1461016b57806317cc915c146101a057806321a0adb6146101de5780632b7ac3f31461027757806338bf282e146102a8578063414a37ba146102ea575b600080fd5b34801561017757600080fd5b5061019e6004803603602081101561018e57600080fd5b50356001600160a01b0316610601565b005b3480156101ac57600080fd5b506101ca600480360360208110156101c357600080fd5b503561066c565b604080519115158252519081900360200190f35b61019e600480360360e08110156101f457600080fd5b810190602081018135600160201b81111561020e57600080fd5b82018360208201111561022057600080fd5b803590602001918460018302840111600160201b8311171561024157600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610681565b34801561028357600080fd5b5061028c6109ce565b604080516001600160a01b039092168252519081900360200190f35b3480156102b457600080fd5b506102d8600480360360408110156102cb57600080fd5b50803590602001356109dd565b60408051918252519081900360200190f35b3480156102f657600080fd5b506102d8610bbe565b34801561030b57600080fd5b50610314610bd0565b6040805163ffffffff9092168252519081900360200190f35b34801561033957600080fd5b5061028c610bdc565b34801561034e57600080fd5b506101ca6004803603602081101561036557600080fd5b5035610beb565b34801561037857600080fd5b506101ca6004803603602081101561038f57600080fd5b5035610c5e565b3480156103a257600080fd5b506102d8610c73565b3480156103b757600080fd5b50610314610c79565b3480156103cc57600080fd5b5061019e600480360360208110156103e357600080fd5b50356001600160a01b0316610c85565b3480156103ff57600080fd5b5061046e6004803603602081101561041657600080fd5b810190602081018135600160201b81111561043057600080fd5b82018360208201111561044257600080fd5b803590602001918460208302840111600160201b8311171561046357600080fd5b509092509050610cf0565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104aa578181015183820152602001610492565b505050509050019250505060405180910390f35b61019e600480360360208110156104d457600080fd5b5035610d78565b3480156104e757600080fd5b506102d8610ea5565b3480156104fc57600080fd5b506102d86004803603602081101561051357600080fd5b5035610ec5565b34801561052657600080fd5b50610314610ed9565b34801561053b57600080fd5b5061028c610ede565b34801561055057600080fd5b506101ca6004803603602081101561056757600080fd5b5035610eed565b34801561057a57600080fd5b506102d86004803603602081101561059157600080fd5b5035610f02565b3480156105a457600080fd5b506102d8610f20565b3480156105b957600080fd5b506102d8600480360360208110156105d057600080fd5b5035610f44565b3480156105e357600080fd5b5061028c610f51565b3480156105f857600080fd5b50610314610f60565b606e546001600160a01b0316331461064a5760405162461bcd60e51b81526004018080602001828103825260258152602001806119a26025913960400191505060405180910390fd5b606e80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610739576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561079d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b6107a686610beb565b6107f7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561087c578181015183820152602001610864565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b1580156108ce57600080fd5b505af11580156108e2573d6000803e3d6000fd5b505050506040513d60208110156108f857600080fd5b5051610944576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561096984848484610f73565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206119318339815191528310610a41576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206119318339815191528210610a8d5760405162461bcd60e51b81526004018080602001828103825260218152602001806118e16021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ae757600080fd5b505af4158015610afb573d6000803e3d6000fd5b505050506040513d6040811015610b1157600080fd5b5080516020909101519092509050600080516020611931833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b8957600080fd5b505af4158015610b9d573d6000803e3d6000fd5b505050506040513d6040811015610bb357600080fd5b505195945050505050565b60008051602061193183398151915281565b60005463ffffffff1681565b606e546001600160a01b031681565b600081610bfa57506000610c59565b60035463ffffffff165b60048163ffffffff1660648110610c1757fe5b0154831415610c2a576001915050610c59565b63ffffffff8116610c39575060645b6003546000199091019063ffffffff80831691161415610c045760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606e546001600160a01b03163314610cce5760405162461bcd60e51b81526004018080602001828103825260258152602001806119a26025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610d1c578160200160208202803883390190505b50905060005b82811015610d7157610d45848483818110610d3957fe5b90506020020135610eed565b15610d69576001828281518110610d5857fe5b911515602092830291909101909101525b600101610d22565b5092915050565b60685460ff16610dcf576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610e275760405162461bcd60e51b81526004018080602001828103825260218152602001806119516021913960400191505060405180910390fd5b6000610e32826111ab565b6000838152606b60205260409020805460ff191660011790559050610e55611342565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610ebe57fe5b0154905090565b60048160648110610ed257fe5b0154905081565b606481565b606d546001600160a01b031681565b6000908152606a602052604090205460ff1690565b60028181548110610f0f57fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610f0f57fe5b606f546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610fb15760405162461bcd60e51b815260040180806020018281038252603081526020018061188a6030913960400191505060405180910390fd5b606d5460408051622fcfcb60e31b815290516000926001600160a01b03169163017e7e58916004808301926020929190829003018186803b158015610ff557600080fd5b505afa158015611009573d6000803e3d6000fd5b505050506040513d602081101561101f57600080fd5b5051606d5460408051633b46a6e760e01b815290519293506000926001600160a01b0390921691633b46a6e791600480820192602092909190829003018186803b15801561106c57600080fd5b505afa158015611080573d6000803e3d6000fd5b505050506040513d602081101561109657600080fd5b5051905060006001600160a01b038316158015906110b357508115155b905080156110eb5760006110c96069548461138e565b90506110db88828860695403036113d7565b6110e584826113d7565b506110f9565b6110f98786606954036113d7565b84156111095761110986866113d7565b83156111a2576040516000906001600160a01b0389169086908381818185875af1925050503d806000811461115a576040519150601f19603f3d011682016040523d82523d6000602084013e61115f565b606091505b50509050806111a0576040516001600160a01b0388169086156108fc029087906000818181858888f1935050505015801561119e573d6000803e3d6000fd5b505b505b50505050505050565b60035460008054909163ffffffff600160201b909104811691811660020a168114156112085760405162461bcd60e51b815260040180806020018281038252602f815260200180611831602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff90811690821610156112e0576001851661129c5783925060028163ffffffff168154811061126a57fe5b906000526020600020015491508360018263ffffffff168154811061128b57fe5b6000918252602090912001556112c0565b60018163ffffffff16815481106112af57fe5b906000526020600020015492508391505b6112ca83836109dd565b9350600263ffffffff8616049450600101611238565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff90811692909217908190558491600491166064811061132257fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b341561137f5760405162461bcd60e51b81526004018080602001828103825260308152602001806119726030913960400191505060405180910390fd5b61138c33306069546115a8565b565b60006113d083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061178e565b9392505050565b606f54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b602083106114545780518252601f199092019160209182019101611435565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114b6576040519150601f19603f3d011682016040523d82523d6000602084013e6114bb565b606091505b509150915081611506576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156115a257805160201461154d5760405162461bcd60e51b815260040180806020018281038252602a815260200180611860602a913960400191505060405180910390fd5b80806020019051602081101561156257600080fd5b50519150816115a25760405162461bcd60e51b81526004018080602001828103825260278152602001806118ba6027913960400191505060405180910390fd5b50505050565b606f54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b6020831061162d5780518252601f19909201916020918201910161160e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461168f576040519150601f19603f3d011682016040523d82523d6000602084013e611694565b606091505b5091509150816116eb576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156117875780516020146117325760405162461bcd60e51b815260040180806020018281038252602a815260200180611860602a913960400191505060405180910390fd5b80806020019051602081101561174757600080fd5b50519150816117875760405162461bcd60e51b815260040180806020018281038252602f815260200180611902602f913960400191505060405180910390fd5b5050505050565b6000818361181a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117df5781810151838201526020016117c7565b50505050905090810190601f16801561180c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161182657fe5b049594505050505056fe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a7231582028aa7561e325e8422f994b89b4b55657010796368b3736fa5a11d78144123e9264736f6c63430005110032", + "sourceMap": "830:2677:0:-;;;1430:34:3;;;-1:-1:-1;;;;;;1468:27:3;;;892:279:0;5:2:-1;;;;30:1;27;20:12;5:2;892:279:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;892:279:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1646:15:3;;;1638:67;;;;-1:-1:-1;;;1638:67:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1733:2;1719:11;:16;;;1711:63;;;;-1:-1:-1;;;1711:63:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1780:6;:20;;-1:-1:-1;;1780:20:3;;;;;;;1854:5;27:10:-1;;-1:-1;23:18;;;45:23;;;1088:77:3;-1:-1:-1;;;;;;;;;;;1854:23:3;;;;;;27:10:-1;;23:18;;;45:23;;1883:32:3;;;;-1:-1:-1;;;;;;;;;;;1883:32:3;;;;;;1922:175;1945:6;;;;;;1941:10;;;;1922:175;;;1980:39;1994:11;;-1:-1:-1;;;;;1980:13:3;:39;:::i;:::-;2027:5;27:10:-1;;39:1;23:18;;;45:23;;;-1:-1;;;;;;;;;;;2027:23:3;;;;27:10:-1;;23:18;;;45:23;;-1:-1;2058:32:3;;;-1:-1:-1;;;;;;;;;;;2058:32:3;;;;1966:53;;-1:-1:-1;1953:3:3;1922:175;;;-1:-1:-1;2114:39:3;2128:11;;-1:-1:-1;;;;;2114:13:3;:39;:::i;:::-;2103:5;2109:1;2103:8;:50;-1:-1:-1;;1421:11:6;:18;;-1:-1:-1;;1421:18:6;1435:4;1421:18;;;1710:17:5;1702:67;;;;-1:-1:-1;;;1702:67:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1775:8;:20;;-1:-1:-1;;;;;;1775:20:5;;;-1:-1:-1;;;;;1775:20:5;;;;;;;1801:10;:24;;;;;;;;;;;;;;1831:8;:20;;;;;;;;;;;;;-1:-1:-1;1857:12:5;:28;1152:5:0;:14;;;;;;;;;;;;;;;-1:-1:-1;830:2677:0;;-1:-1:-1;;;;830:2677:0;2230:445:3;2305:7;-1:-1:-1;;;;;;;;;;;2328:27:3;;2320:72;;;;;-1:-1:-1;;;2320:72:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2406:28:3;;2398:74;;;;-1:-1:-1;;;2398:74:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2538:23;;;-1:-1:-1;;;2538:23:3;;;;;;;;2478:9;2538:23;;;;;;;;2498:5;;2478:9;;2538:6;;:17;;:23;;;;;;;;;;:6;:23;;;5:2:-1;;;;30:1;27;20:12;5:2;2538:23:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2538:23:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2538:23:3;;;;;;;;;-1:-1:-1;2538:23:3;-1:-1:-1;;;;;;;;;;;;2589:6:3;2578:1;2571:38;2567:42;;2624:6;:17;2642:1;2645;2624:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2624:23:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2624:23:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2624:23:3;;2230:445;-1:-1:-1;;;;;2230:445:3:o;830:2677:0:-;;;;;;;", + "deployedSourceMap": "830:2677:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4843:102:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4843:102:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4843:102:5;-1:-1:-1;;;;;4843:102:5;;:::i;:::-;;477:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;477:47:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;477:47:5;;:::i;:::-;;;;;;;;;;;;;;;;;;2958:781;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2958:781:5;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;2958:781:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2958:781:5;;;;;;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;2958:781:5;;-1:-1:-1;2958:781:5;-1:-1:-1;2958:781:5;;;;;;;;-1:-1:-1;;;;;2958:781:5;;;;;;;;;;;;;;;;;;;;;;;;:::i;666:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;666:25:5;;;:::i;:::-;;;;-1:-1:-1;;;;;666:25:5;;;;;;;;;;;;;;2230:445:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2230:445:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2230:445:3;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;933:114;;8:9:-1;5:2;;;30:1;27;20:12;5:2;933:114:3;;;:::i;1209:20::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1209:20:3;;;:::i;:::-;;;;;;;;;;;;;;;;;;;884:23:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;884:23:5;;;:::i;3553:342:3:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3553:342:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3553:342:3;;:::i;619:43:5:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;619:43:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;619:43:5;;:::i;446:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;446:27:5;;;:::i;1430:34:3:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:3;;;:::i;4680:113:5:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4680:113:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4680:113:5;-1:-1:-1;;;;;4680:113:5;;:::i;4157:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4157:293:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4157:293:5;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4157:293:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4157:293:5;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;4157:293:5;;-1:-1:-1;4157:293:5;-1:-1:-1;4157:293:5;:::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;4157:293:5;;;;;;;;;;;;;;;;;2138:324;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2138:324:5;;:::i;3941:93:3:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3941:93:3;;;:::i;1549:39::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1549:39:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1549:39:3;;:::i;1499:46::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1499:46:3;;;:::i;695:29:5:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;695:29:5;;;:::i;3980:116::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3980:116:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3980:116:5;;:::i;1404:22:3:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1404:22:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1404:22:3;;:::i;1051:114::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1051:114:3;;;:::i;1369:31::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1369:31:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1369:31:3;;:::i;867:20:0:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;867:20:0;;;:::i;1468:27:3:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1468:27:3;;;:::i;4843:102:5:-;961:8;;-1:-1:-1;;;;;961:8:5;947:10;:22;939:72;;;;-1:-1:-1;;;939:72:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4917:8;:23;;-1:-1:-1;;;;;;4917:23:5;-1:-1:-1;;;;;4917:23:5;;;;;;;;;;4843:102::o;477:47::-;;;;;;;;;;;;;;;:::o;2958:781::-;1934:11:6;;;;1926:55;;;;;-1:-1:-1;;;1926:55:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:6;;;3175:12:5;;3167:20;;;3159:59;;;;;-1:-1:-1;;;3159:59:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;3233:31;;;;:15;:31;;;;;;;;3232:32;3224:76;;;;;-1:-1:-1;;;3224:76:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;3314:18;3326:5;3314:11;:18::i;:::-;3306:59;;;;;-1:-1:-1;;;3306:59:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;3412:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3483:19:5;;;3412:126;;;;3504:17;;;3412:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3412:126:5;;:8;;;;;:20;;3433:6;;;;3412:126;;;;;;;;;;;;;;;;:8;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;3412:126:5;;;;;;;;;;;;;;;;;;;;;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;;3412:126:5;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3412:126:5;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3412:126:5;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3412:126:5;3404:161;;;;;-1:-1:-1;;;3404:161:5;;;;;;;;;;;;-1:-1:-1;;;3404:161:5;;;;;;;;;;;;;;;3572:31;;;;:15;:31;;;;;:38;;-1:-1:-1;;3572:38:5;3606:4;3572:38;;;3616:53;3633:10;3645:8;3655:4;3661:7;3616:16;:53::i;:::-;3680:54;;;-1:-1:-1;;;;;3680:54:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:6;:18;;-1:-1:-1;;2230:18:6;2244:4;2230:18;;;-1:-1:-1;;;;;;2958:781:5:o;666:25::-;;;-1:-1:-1;;;;;666:25:5;;:::o;2230:445:3:-;2305:7;-1:-1:-1;;;;;;;;;;;2328:27:3;;2320:72;;;;;-1:-1:-1;;;2320:72:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2406:28:3;;2398:74;;;;-1:-1:-1;;;2398:74:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2538:23;;;-1:-1:-1;;;2538:23:3;;;;;;;;2478:9;2538:23;;;;;;;;2498:5;;2478:9;;2538:6;;:17;;:23;;;;;;;;;;:6;:23;;;5:2:-1;;;;30:1;27;20:12;5:2;2538:23:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2538:23:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2538:23:3;;;;;;;;;-1:-1:-1;2538:23:3;-1:-1:-1;;;;;;;;;;;;2589:6:3;2578:1;2571:38;2567:42;;2624:6;:17;2642:1;2645;2624:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2624:23:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2624:23:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2624:23:3;;2230:445;-1:-1:-1;;;;;2230:445:3:o;933:114::-;-1:-1:-1;;;;;;;;;;;933:114:3;:::o;1209:20::-;;;;;;:::o;884:23:5:-;;;-1:-1:-1;;;;;884:23:5;;:::o;3553:342:3:-;3609:4;3625:10;3621:43;;-1:-1:-1;3652:5:3;3645:12;;3621:43;3680:16;;;;3702:171;3726:5;3732:1;3726:8;;;;;;;;;;;3717:5;:17;3713:53;;;3753:4;3746:11;;;;;3713:53;3777:6;;;3773:52;;-1:-1:-1;1542:3:3;3773:52;3855:16;;-1:-1:-1;;3832:3:3;;;;3855:16;3850:21;;;3855:16;;3850:21;;3702:171;;3885:5;3878:12;;;3553:342;;;;:::o;619:43:5:-;;;;;;;;;;;;;;;:::o;446:27::-;;;;:::o;1430:34:3:-;;;;;;:::o;4680:113:5:-;961:8;;-1:-1:-1;;;;;961:8:5;947:10;:22;939:72;;;;-1:-1:-1;;;939:72:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4754:8;:34;;-1:-1:-1;;;;;;4754:34:5;-1:-1:-1;;;;;4754:34:5;;;;;;;;;;4680:113::o;4157:293::-;4273:35;;;;;;;;;;;;;;;;4238:19;;4284:16;4273:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4273:35:5;-1:-1:-1;4265:43:5;-1:-1:-1;4318:6:5;4314:132;4330:27;;;4314:132;;;4376:28;4384:16;;4401:1;4384:19;;;;;;;;;;;;;4376:7;:28::i;:::-;4372:68;;;4427:4;4416:5;4422:1;4416:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4372:68;4359:3;;4314:132;;;;4157:293;;;;:::o;2138:324::-;1934:11:6;;;;1926:55;;;;;-1:-1:-1;;;1926:55:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:6;;;2070:5;2221:24:5;;;:11;:24;;;;;;2056:19:6;2221:24:5;2220:25;2212:71;;;;-1:-1:-1;;;2212:71:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2290:20;2313;2321:11;2313:7;:20::i;:::-;2339:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2339:31:5;2366:4;2339:31;;;2290:43;-1:-1:-1;2376:17:5;:15;:17::i;:::-;2405:52;;;;;;;;2441:15;2405:52;;;;;;2413:11;;2405:52;;;;;;;;-1:-1:-1;;2230:11:6;:18;;-1:-1:-1;;2230:18:6;2244:4;2230:18;;;2138:324:5:o;3941:93:3:-;4012:16;;3984:7;;4006:5;;4012:16;;4006:23;;;;;;;;;3999:30;;3941:93;:::o;1549:39::-;;;;;;;;;;;;;-1:-1:-1;1549:39:3;:::o;1499:46::-;1542:3;1499:46;:::o;695:29:5:-;;;-1:-1:-1;;;;;695:29:5;;:::o;3980:116::-;4041:4;4060:31;;;:15;:31;;;;;;;;;3980:116::o;1404:22:3:-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1404:22:3;:::o;1051:114::-;1088:77;1051:114;:::o;1369:31::-;;;;;;;;;;867:20:0;;;-1:-1:-1;;;;;867:20:0;;:::o;1468:27:3:-;;;-1:-1:-1;;;1468:27:3;;;;;:::o;1370:993:0:-;1525:7;1512:9;:20;1504:81;;;;-1:-1:-1;;;1504:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1608:10;;:18;;;-1:-1:-1;;;1608:18:0;;;;1592:13;;-1:-1:-1;;;;;1608:10:0;;:16;;:18;;;;;;;;;;;;;;:10;:18;;;5:2:-1;;;;30:1;27;20:12;5:2;1608:18:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1608:18:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1608:18:0;1661:10;;:31;;;-1:-1:-1;;;1661:31:0;;;;1608:18;;-1:-1:-1;1632:26:0;;-1:-1:-1;;;;;1661:10:0;;;;:29;;:31;;;;;1608:18;;1661:31;;;;;;;;:10;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;1661:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1661:31:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1661:31:0;;-1:-1:-1;1699:10:0;-1:-1:-1;;;;;1712:19:0;;;;;;:46;;-1:-1:-1;1735:23:0;;;1712:46;1699:59;;1768:5;1764:301;;;1783:19;1805:46;1818:12;;1832:18;1805:12;:46::i;:::-;1783:68;;1859:73;1878:10;1920:11;1905:12;1890;;:27;:41;1859:18;:73::i;:::-;1940:38;1959:5;1966:11;1940:18;:38::i;:::-;1764:301;;;;1999:59;2018:10;2045:12;2030;;:27;1999:18;:59::i;:::-;2075:16;;2071:79;;2101:42;2120:8;2130:12;2101:18;:42::i;:::-;2160:11;;2156:203;;2200:34;;2182:12;;-1:-1:-1;;;;;2200:15:0;;;2222:7;;2182:12;2200:34;2182:12;2200:34;2222:7;2200:15;:34;;;;;;;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;;2181:53:0;;;2247:7;2242:111;;2318:26;;-1:-1:-1;;;;;2318:17:0;;;:26;;;;;2336:7;;2318:26;;;;2336:7;2318:17;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2318:26:0;2242:111;2156:203;;1370:993;;;;;;;:::o;2679:802:3:-;2770:9;;2728:12;2820:6;;2728:12;;2770:9;-1:-1:-1;;;2770:9:3;;;;;;2820:6;;2816:1;2809:17;2793:33;;;;2785:93;;;;-1:-1:-1;;;2785:93:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2884:9;:14;;;-1:-1:-1;;;2884:14:3;;;;;2897:1;2884:14;;;;;-1:-1:-1;;2884:14:3;;;;;;2931:5;-1:-1:-1;;;2980:355:3;3003:6;;;;;;2999:10;;;;2980:355;;;3028:16;;;3024:225;;3068:16;3061:23;;3102:5;3108:1;3102:8;;;;;;;;;;;;;;;;;;3094:16;;3141;3121:14;3136:1;3121:17;;;;;;;;;;;;;;;;;;;:36;3024:225;;;3189:14;3204:1;3189:17;;;;;;;;;;;;;;;;;;3182:24;;3224:16;3216:24;;3024:225;3276:26;3290:4;3296:5;3276:13;:26::i;:::-;3257:45;-1:-1:-1;3327:1:3;3311:17;;;;;-1:-1:-1;3011:3:3;;2980:355;;;-1:-1:-1;3361:16:3;;1542:3;;3360:42;3361:16;;;;:20;3360:42;3341:16;:61;;-1:-1:-1;;3341:61:3;3360:42;;;;3341:61;;;;;;;;;;;;3434:16;;3408:5;;3414:16;3408:23;;;;;;;;:42;-1:-1:-1;;3463:9:3;;-1:-1:-1;;;3463:9:3;;;;-1:-1:-1;;3463:13:3;;2679:802;-1:-1:-1;;;;2679:802:3:o;1175:191:0:-;1225:9;:14;1217:75;;;;-1:-1:-1;;;1217:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1298:63;1321:10;1341:4;1348:12;;1298:22;:63::i;:::-;1175:191::o;3187:130:4:-;3245:7;3271:39;3275:1;3278;3271:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;3264:46;3187:130;-1:-1:-1;;;3187:130:4:o;2961:544:0:-;3070:5;;3081:63;;;-1:-1:-1;;;;;3081:63:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;3081:63:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;3070:75:0;;;;3035:12;;3049:17;;3070:5;;;3081:63;3070:75;;;;25:18:-1;36:153;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;;;3070:75:0;;;;;;;;;;;;;;;;;;;;;;;;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;;3034:111:0;;;;3159:7;3151:37;;;;;-1:-1:-1;;;3151:37:0;;;;;;;;;;;;-1:-1:-1;;;3151:37:0;;;;;;;;;;;;;;;3288:11;;:15;3284:217;;3321:4;:11;3336:2;3321:17;3313:72;;;;-1:-1:-1;;;3313:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3414:4;3403:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3403:24:0;;-1:-1:-1;3403:24:0;3435:59;;;;-1:-1:-1;;;3435:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2961:544;;;;:::o;2367:590::-;2495:5;;2506:74;;;-1:-1:-1;;;;;2506:74:0;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2506:74:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2495:86:0;;;;2460:12;;2474:17;;2495:5;;;2506:74;2495:86;;;;25:18:-1;36:153;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;;;2495:86:0;;;;;;;;;;;;;;;;;;;;;;;;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;;2459:122:0;;;;2595:7;2587:45;;;;;-1:-1:-1;;;2587:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2732:11;;:15;2728:225;;2765:4;:11;2780:2;2765:17;2757:72;;;;-1:-1:-1;;;2757:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2858:4;2847:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2847:24:0;;-1:-1:-1;2847:24:0;2879:67;;;;-1:-1:-1;;;2879:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2367:590;;;;;:::o;3832:338:4:-;3918:7;4018:12;4011:5;4003:28;;;;-1:-1:-1;;;4003:28:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;4003:28:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4041:9;4057:1;4053;:5;;;;;;;3832:338;-1:-1:-1;;;;;3832:338:4:o", + "source": "// https://tornado.cash\n/*\n* d888888P dP a88888b. dP\n* 88 88 d8' `88 88\n* 88 .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b. 88 .d8888b. .d8888b. 88d888b.\n* 88 88' `88 88' `88 88' `88 88' `88 88' `88 88' `88 88 88' `88 Y8ooooo. 88' `88\n* 88 88. .88 88 88 88 88. .88 88. .88 88. .88 dP Y8. .88 88. .88 88 88 88\n* dP `88888P' dP dP dP `88888P8 `88888P8 `88888P' 88 Y88888P' `88888P8 `88888P' dP dP\n* ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\n*/\n\npragma solidity 0.5.17;\n\nimport \"./Tornado.sol\";\nimport \"./SafeMath.sol\";\n\ncontract ERC20Tornado is Tornado {\n address public token;\n\n constructor(\n IVerifier _verifier,\n IFeeManager _feeManager,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator,\n address _token\n ) Tornado(_verifier, _feeManager, _denomination, _merkleTreeHeight, _operator) public {\n token = _token;\n }\n\n function _processDeposit() internal {\n require(msg.value == 0, \"ETH value is supposed to be 0 for ERC20 instance\");\n _safeErc20TransferFrom(msg.sender, address(this), denomination);\n }\n\n function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund) internal {\n require(msg.value == _refund, \"Incorrect refund amount received by the contract\");\n\n address feeTo = feeManager.feeTo();\n uint256 protocolFeeDivisor = feeManager.protocolFeeDivisor();\n\n bool feeOn = feeTo != address(0) && protocolFeeDivisor != 0;\n if (feeOn) {\n uint256 protocolFee = SafeMath.div(denomination, protocolFeeDivisor);\n _safeErc20Transfer(_recipient, denomination - _relayer_fee - protocolFee);\n _safeErc20Transfer(feeTo, protocolFee);\n } else {\n _safeErc20Transfer(_recipient, denomination - _relayer_fee);\n }\n\n if (_relayer_fee > 0) {\n _safeErc20Transfer(_relayer, _relayer_fee);\n }\n\n if (_refund > 0) {\n (bool success, ) = _recipient.call.value(_refund)(\"\");\n if (!success) {\n // let's return _refund back to the relayer\n _relayer.transfer(_refund);\n }\n }\n }\n\n function _safeErc20TransferFrom(address _from, address _to, uint256 _amount) internal {\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd /* transferFrom */, _from, _to, _amount));\n require(success, \"not enough allowed tokens\");\n\n // if contract returns some data lets make sure that is `true` according to standard\n if (data.length > 0) {\n require(data.length == 32, \"data length should be either 0 or 32 bytes\");\n success = abi.decode(data, (bool));\n require(success, \"not enough allowed tokens. Token returns false.\");\n }\n }\n\n function _safeErc20Transfer(address _to, uint256 _amount) internal {\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb /* transfer */, _to, _amount));\n require(success, \"not enough tokens\");\n\n // if contract returns some data lets make sure that is `true` according to standard\n if (data.length > 0) {\n require(data.length == 32, \"data length should be either 0 or 32 bytes\");\n success = abi.decode(data, (bool));\n require(success, \"not enough tokens. Token returns false.\");\n }\n }\n}\n", "sourcePath": "/home/home/dotfiles/tornado-core/contracts/ERC20Tornado.sol", "ast": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/ERC20Tornado.sol", "exportedSymbols": { "ERC20Tornado": [ - 266 + 281 ] }, - "id": 267, + "id": 282, "nodeType": "SourceUnit", "nodes": [ { @@ -606,58 +591,69 @@ "file": "./Tornado.sol", "id": 2, "nodeType": "ImportDirective", - "scope": 267, - "sourceUnit": 1205, + "scope": 282, + "sourceUnit": 1364, "src": "780:23:0", "symbolAliases": [], "unitAlias": "" }, + { + "absolutePath": "/home/home/dotfiles/tornado-core/contracts/SafeMath.sol", + "file": "./SafeMath.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 282, + "sourceUnit": 1026, + "src": "804:24:0", + "symbolAliases": [], + "unitAlias": "" + }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, - "id": 3, + "id": 4, "name": "Tornado", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1204, - "src": "830:7:0", + "referencedDeclaration": 1363, + "src": "855:7:0", "typeDescriptions": { - "typeIdentifier": "t_contract$_Tornado_$1204", + "typeIdentifier": "t_contract$_Tornado_$1363", "typeString": "contract Tornado" } }, - "id": 4, + "id": 5, "nodeType": "InheritanceSpecifier", - "src": "830:7:0" + "src": "855:7:0" } ], "contractDependencies": [ - 685, - 1204, - 3255 + 838, + 1363, + 1393 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 266, + "id": 281, "linearizedBaseContracts": [ - 266, - 1204, - 3255, - 685 + 281, + 1363, + 1393, + 838 ], "name": "ERC20Tornado", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 6, + "id": 7, "name": "token", "nodeType": "VariableDeclaration", - "scope": 266, - "src": "842:20:0", + "scope": 281, + "src": "867:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -665,10 +661,10 @@ "typeString": "address" }, "typeName": { - "id": 5, + "id": 6, "name": "address", "nodeType": "ElementaryTypeName", - "src": "842:7:0", + "src": "867:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -678,54 +674,28 @@ "value": null, "visibility": "public" }, - { - "constant": false, - "id": 8, - "name": "protocolFee", - "nodeType": "VariableDeclaration", - "scope": 266, - "src": "866:26:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "866:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, { "body": { - "id": 40, + "id": 33, "nodeType": "Block", - "src": "1151:80:0", + "src": "1146:25:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 32, + "id": 31, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 30, + "id": 29, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "1157:5:0", + "referencedDeclaration": 7, + "src": "1152:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -735,114 +705,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 31, + "id": 30, "name": "_token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "1165:6:0", + "referencedDeclaration": 19, + "src": "1160:6:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1157:14:0", + "src": "1152:14:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 33, + "id": 32, "nodeType": "ExpressionStatement", - "src": "1157:14:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 38, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 34, - "name": "protocolFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "1193:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 37, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 35, - "name": "_denomination", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "1207:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323030", - "id": 36, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1223:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_200_by_1", - "typeString": "int_const 200" - }, - "value": "200" - }, - "src": "1207:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1193:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 39, - "nodeType": "ExpressionStatement", - "src": "1193:33:0" + "src": "1152:14:0" } ] }, "documentation": null, - "id": 41, + "id": 34, "implemented": true, "kind": "constructor", "modifiers": [ @@ -850,38 +737,38 @@ "arguments": [ { "argumentTypes": null, - "id": 23, + "id": 22, "name": "_verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "1075:9:0", + "referencedDeclaration": 9, + "src": "1070:9:0", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, { "argumentTypes": null, - "id": 24, + "id": 23, "name": "_feeManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "1086:11:0", + "referencedDeclaration": 11, + "src": "1081:11:0", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, { "argumentTypes": null, - "id": 25, + "id": 24, "name": "_denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "1099:13:0", + "referencedDeclaration": 13, + "src": "1094:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -889,12 +776,12 @@ }, { "argumentTypes": null, - "id": 26, + "id": 25, "name": "_merkleTreeHeight", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "1114:17:0", + "referencedDeclaration": 15, + "src": "1109:17:0", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -902,64 +789,64 @@ }, { "argumentTypes": null, - "id": 27, + "id": 26, "name": "_operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "1133:9:0", + "referencedDeclaration": 17, + "src": "1128:9:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], - "id": 28, + "id": 27, "modifierName": { "argumentTypes": null, - "id": 22, + "id": 21, "name": "Tornado", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1204, - "src": "1067:7:0", + "referencedDeclaration": 1363, + "src": "1062:7:0", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Tornado_$1204_$", + "typeIdentifier": "t_type$_t_contract$_Tornado_$1363_$", "typeString": "type(contract Tornado)" } }, "nodeType": "ModifierInvocation", - "src": "1067:76:0" + "src": "1062:76:0" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 21, + "id": 20, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 10, + "id": 9, "name": "_verifier", "nodeType": "VariableDeclaration", - "scope": 41, - "src": "914:19:0", + "scope": 34, + "src": "909:19:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" }, "typeName": { "contractScope": null, - "id": 9, + "id": 8, "name": "IVerifier", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 882, - "src": "914:9:0", + "referencedDeclaration": 1041, + "src": "909:9:0", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -968,26 +855,26 @@ }, { "constant": false, - "id": 12, + "id": 11, "name": "_feeManager", "nodeType": "VariableDeclaration", - "scope": 41, - "src": "939:23:0", + "scope": 34, + "src": "934:23:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" }, "typeName": { "contractScope": null, - "id": 11, + "id": 10, "name": "IFeeManager", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 888, - "src": "939:11:0", + "referencedDeclaration": 1052, + "src": "934:11:0", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -996,11 +883,11 @@ }, { "constant": false, - "id": 14, + "id": 13, "name": "_denomination", "nodeType": "VariableDeclaration", - "scope": 41, - "src": "968:21:0", + "scope": 34, + "src": "963:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1008,10 +895,10 @@ "typeString": "uint256" }, "typeName": { - "id": 13, + "id": 12, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "968:7:0", + "src": "963:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1022,11 +909,11 @@ }, { "constant": false, - "id": 16, + "id": 15, "name": "_merkleTreeHeight", "nodeType": "VariableDeclaration", - "scope": 41, - "src": "995:24:0", + "scope": 34, + "src": "990:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1034,10 +921,10 @@ "typeString": "uint32" }, "typeName": { - "id": 15, + "id": 14, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "995:6:0", + "src": "990:6:0", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1048,11 +935,11 @@ }, { "constant": false, - "id": 18, + "id": 17, "name": "_operator", "nodeType": "VariableDeclaration", - "scope": 41, - "src": "1025:17:0", + "scope": 34, + "src": "1020:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1060,10 +947,10 @@ "typeString": "address" }, "typeName": { - "id": 17, + "id": 16, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1025:7:0", + "src": "1020:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1075,11 +962,11 @@ }, { "constant": false, - "id": 20, + "id": 19, "name": "_token", "nodeType": "VariableDeclaration", - "scope": 41, - "src": "1048:14:0", + "scope": 34, + "src": "1043:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1087,10 +974,10 @@ "typeString": "address" }, "typeName": { - "id": 19, + "id": 18, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1048:7:0", + "src": "1043:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1101,25 +988,25 @@ "visibility": "internal" } ], - "src": "908:158:0" + "src": "903:158:0" }, "returnParameters": { - "id": 29, + "id": 28, "nodeType": "ParameterList", "parameters": [], - "src": "1151:0:0" + "src": "1146:0:0" }, - "scope": 266, - "src": "897:334:0", + "scope": 281, + "src": "892:279:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 61, + "id": 54, "nodeType": "Block", - "src": "1271:155:0", + "src": "1211:155:0", "statements": [ { "expression": { @@ -1131,7 +1018,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 48, + "id": 41, "isConstant": false, "isLValue": false, "isPure": false, @@ -1140,18 +1027,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 45, + "id": 38, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "1285:3:0", + "referencedDeclaration": 1408, + "src": "1225:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 46, + "id": 39, "isConstant": false, "isLValue": false, "isPure": false, @@ -1159,7 +1046,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1285:9:0", + "src": "1225:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1170,14 +1057,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 47, + "id": 40, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1298:1:0", + "src": "1238:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1185,7 +1072,7 @@ }, "value": "0" }, - "src": "1285:14:0", + "src": "1225:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1194,14 +1081,14 @@ { "argumentTypes": null, "hexValue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", - "id": 49, + "id": 42, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1301:50:0", + "src": "1241:50:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", @@ -1221,21 +1108,21 @@ "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" } ], - "id": 44, + "id": 37, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "1277:7:0", + "referencedDeclaration": 1412, + "src": "1217:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 50, + "id": 43, "isConstant": false, "isLValue": false, "isPure": false, @@ -1243,15 +1130,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1277:75:0", + "src": "1217:75:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 51, + "id": 44, "nodeType": "ExpressionStatement", - "src": "1277:75:0" + "src": "1217:75:0" }, { "expression": { @@ -1261,18 +1148,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 53, + "id": 46, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "1381:3:0", + "referencedDeclaration": 1408, + "src": "1321:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 54, + "id": 47, "isConstant": false, "isLValue": false, "isPure": false, @@ -1280,7 +1167,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1381:10:0", + "src": "1321:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -1291,14 +1178,14 @@ "arguments": [ { "argumentTypes": null, - "id": 56, + "id": 49, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3296, - "src": "1401:4:0", + "referencedDeclaration": 1436, + "src": "1341:4:0", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20Tornado_$266", + "typeIdentifier": "t_contract$_ERC20Tornado_$281", "typeString": "contract ERC20Tornado" } } @@ -1306,24 +1193,24 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20Tornado_$266", + "typeIdentifier": "t_contract$_ERC20Tornado_$281", "typeString": "contract ERC20Tornado" } ], - "id": 55, + "id": 48, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "1393:7:0", + "src": "1333:7:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, - "id": 57, + "id": 50, "isConstant": false, "isLValue": false, "isPure": false, @@ -1331,7 +1218,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1393:13:0", + "src": "1333:13:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1339,12 +1226,12 @@ }, { "argumentTypes": null, - "id": 58, + "id": 51, "name": "denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 894, - "src": "1408:12:0", + "referencedDeclaration": 1058, + "src": "1348:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1366,18 +1253,18 @@ "typeString": "uint256" } ], - "id": 52, + "id": 45, "name": "_safeErc20TransferFrom", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "1358:22:0", + "referencedDeclaration": 225, + "src": "1298:22:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 59, + "id": 52, "isConstant": false, "isLValue": false, "isPure": false, @@ -1385,48 +1272,48 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1358:63:0", + "src": "1298:63:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 60, + "id": 53, "nodeType": "ExpressionStatement", - "src": "1358:63:0" + "src": "1298:63:0" } ] }, "documentation": null, - "id": 62, + "id": 55, "implemented": true, "kind": "function", "modifiers": [], "name": "_processDeposit", "nodeType": "FunctionDefinition", "parameters": { - "id": 42, + "id": 35, "nodeType": "ParameterList", "parameters": [], - "src": "1259:2:0" + "src": "1199:2:0" }, "returnParameters": { - "id": 43, + "id": 36, "nodeType": "ParameterList", "parameters": [], - "src": "1271:0:0" + "src": "1211:0:0" }, - "scope": 266, - "src": "1235:191:0", + "scope": 281, + "src": "1175:191:0", "stateMutability": "nonpayable", - "superFunction": 1019, + "superFunction": 1183, "visibility": "internal" }, { "body": { - "id": 151, + "id": 166, "nodeType": "Block", - "src": "1574:657:0", + "src": "1498:865:0", "statements": [ { "expression": { @@ -1438,7 +1325,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 79, + "id": 70, "isConstant": false, "isLValue": false, "isPure": false, @@ -1447,18 +1334,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 76, + "id": 67, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "1588:3:0", + "referencedDeclaration": 1408, + "src": "1512:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 77, + "id": 68, "isConstant": false, "isLValue": false, "isPure": false, @@ -1466,7 +1353,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1588:9:0", + "src": "1512:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1476,18 +1363,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 78, + "id": 69, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "1601:7:0", + "referencedDeclaration": 63, + "src": "1525:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1588:20:0", + "src": "1512:20:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1496,14 +1383,14 @@ { "argumentTypes": null, "hexValue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", - "id": 80, + "id": 71, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1610:50:0", + "src": "1534:50:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", @@ -1523,21 +1410,21 @@ "typeString": "literal_string \"Incorrect refund amount received by the contract\"" } ], - "id": 75, + "id": 66, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "1580:7:0", + "referencedDeclaration": 1412, + "src": "1504:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 81, + "id": 72, "isConstant": false, "isLValue": false, "isPure": false, @@ -1545,28 +1432,193 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1580:81:0", + "src": "1504:81:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 82, + "id": 73, "nodeType": "ExpressionStatement", - "src": "1580:81:0" + "src": "1504:81:0" }, { "assignments": [ - 84 + 75 ], "declarations": [ { "constant": false, - "id": 84, + "id": 75, + "name": "feeTo", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1592:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 74, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1592:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 79, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 76, + "name": "feeManager", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "1608:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFeeManager_$1052", + "typeString": "contract IFeeManager" + } + }, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "feeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 1046, + "src": "1608:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1608:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1592:34:0" + }, + { + "assignments": [ + 81 + ], + "declarations": [ + { + "constant": false, + "id": 81, + "name": "protocolFeeDivisor", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1632:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 80, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1632:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 85, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 82, + "name": "feeManager", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "1661:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFeeManager_$1052", + "typeString": "contract IFeeManager" + } + }, + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "protocolFeeDivisor", + "nodeType": "MemberAccess", + "referencedDeclaration": 1051, + "src": "1661:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1661:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1632:60:0" + }, + { + "assignments": [ + 87 + ], + "declarations": [ + { + "constant": false, + "id": 87, "name": "feeOn", "nodeType": "VariableDeclaration", - "scope": 151, - "src": "1668:10:0", + "scope": 166, + "src": "1699:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1574,10 +1626,10 @@ "typeString": "bool" }, "typeName": { - "id": 83, + "id": 86, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1668:4:0", + "src": "1699:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1587,116 +1639,185 @@ "visibility": "internal" } ], - "id": 90, + "id": 97, "initialValue": { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "id": 89, + "id": 96, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 85, - "name": "_feeTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "1681:6:0", - "typeDescriptions": { + "commonType": { "typeIdentifier": "t_address", "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 87, + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 88, + "name": "feeTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1712:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1729: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": 89, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "number", "lValueRequested": false, - "nodeType": "Literal", - "src": "1699:1:0", - "subdenomination": null, + "nodeType": "ElementaryTypeNameExpression", + "src": "1721:7:0", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 86, + "typeName": "address" + }, + "id": 91, "isConstant": false, "isLValue": false, "isPure": true, + "kind": "typeConversion", "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1691:7:0", + "names": [], + "nodeType": "FunctionCall", + "src": "1721:10:0", "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } }, - "id": 88, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1691:10:0", + "src": "1712:19:0", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "src": "1681:20:0", + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 93, + "name": "protocolFeeDivisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 81, + "src": "1735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1757:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1735:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1712:46:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "VariableDeclarationStatement", - "src": "1668:33:0" + "src": "1699:59:0" }, { "condition": { "argumentTypes": null, - "id": 91, + "id": 98, "name": "feeOn", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "1711:5:0", + "referencedDeclaration": 87, + "src": "1768:5:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 114, + "id": 129, "nodeType": "Block", - "src": "1859:74:0", + "src": "1991:74:0", "statements": [ { "expression": { @@ -1704,12 +1825,12 @@ "arguments": [ { "argumentTypes": null, - "id": 108, + "id": 123, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "1886:10:0", + "referencedDeclaration": 57, + "src": "2018:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -1721,19 +1842,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 111, + "id": 126, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 109, + "id": 124, "name": "denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 894, - "src": "1898:12:0", + "referencedDeclaration": 1058, + "src": "2030:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1743,18 +1864,281 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 110, + "id": 125, "name": "_relayer_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1913:12:0", + "referencedDeclaration": 61, + "src": "2045:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1898:27:0", + "src": "2030:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 122, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 280, + "src": "1999:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1999:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 128, + "nodeType": "ExpressionStatement", + "src": "1999:59:0" + } + ] + }, + "id": 130, + "nodeType": "IfStatement", + "src": "1764:301:0", + "trueBody": { + "id": 121, + "nodeType": "Block", + "src": "1775:210:0", + "statements": [ + { + "assignments": [ + 100 + ], + "declarations": [ + { + "constant": false, + "id": 100, + "name": "protocolFee", + "nodeType": "VariableDeclaration", + "scope": 121, + "src": "1783:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 99, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1783:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 106, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 103, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "1818:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 104, + "name": "protocolFeeDivisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 81, + "src": "1832:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 101, + "name": "SafeMath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1025, + "src": "1805:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeMath_$1025_$", + "typeString": "type(library SafeMath)" + } + }, + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 958, + "src": "1805:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:46:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1783:68:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 108, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1878:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 109, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "1890:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 110, + "name": "_relayer_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "1905:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1890:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 112, + "name": "protocolFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "1920:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1890:41:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1776,14 +2160,14 @@ "name": "_safeErc20Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "1867:18:0", + "referencedDeclaration": 280, + "src": "1859:18:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 112, + "id": 114, "isConstant": false, "isLValue": false, "isPure": false, @@ -1791,160 +2175,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1867:59:0", + "src": "1859:73:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 113, + "id": 115, "nodeType": "ExpressionStatement", - "src": "1867:59:0" - } - ] - }, - "id": 115, - "nodeType": "IfStatement", - "src": "1707:226:0", - "trueBody": { - "id": 106, - "nodeType": "Block", - "src": "1718:135:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 93, - "name": "_recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "1745:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 98, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 96, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 94, - "name": "denomination", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 894, - "src": "1757:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 95, - "name": "_relayer_fee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1772:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1757:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 97, - "name": "protocolFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "1787:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1757:41:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 92, - "name": "_safeErc20Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "1726:18:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1726:73:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 100, - "nodeType": "ExpressionStatement", - "src": "1726:73:0" + "src": "1859:73:0" }, { "expression": { @@ -1952,12 +2191,12 @@ "arguments": [ { "argumentTypes": null, - "id": 102, - "name": "_feeTo", + "id": 117, + "name": "feeTo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "1826:6:0", + "referencedDeclaration": 75, + "src": "1959:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1965,12 +2204,12 @@ }, { "argumentTypes": null, - "id": 103, + "id": 118, "name": "protocolFee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "1834:11:0", + "referencedDeclaration": 100, + "src": "1966:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1988,18 +2227,18 @@ "typeString": "uint256" } ], - "id": 101, + "id": 116, "name": "_safeErc20Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "1807:18:0", + "referencedDeclaration": 280, + "src": "1940:18:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 104, + "id": 119, "isConstant": false, "isLValue": false, "isPure": false, @@ -2007,15 +2246,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1807:39:0", + "src": "1940:38:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 105, + "id": 120, "nodeType": "ExpressionStatement", - "src": "1807:39:0" + "src": "1940:38:0" } ] } @@ -2027,19 +2266,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 118, + "id": 133, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 116, + "id": 131, "name": "_relayer_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1943:12:0", + "referencedDeclaration": 61, + "src": "2075:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2050,14 +2289,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 117, + "id": 132, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1958:1:0", + "src": "2090:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2065,20 +2304,20 @@ }, "value": "0" }, - "src": "1943:16:0", + "src": "2075:16:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 125, + "id": 140, "nodeType": "IfStatement", - "src": "1939:79:0", + "src": "2071:79:0", "trueBody": { - "id": 124, + "id": 139, "nodeType": "Block", - "src": "1961:57:0", + "src": "2093:57:0", "statements": [ { "expression": { @@ -2086,12 +2325,12 @@ "arguments": [ { "argumentTypes": null, - "id": 120, + "id": 135, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "1988:8:0", + "referencedDeclaration": 59, + "src": "2120:8:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2099,12 +2338,12 @@ }, { "argumentTypes": null, - "id": 121, + "id": 136, "name": "_relayer_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1998:12:0", + "referencedDeclaration": 61, + "src": "2130:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2122,18 +2361,18 @@ "typeString": "uint256" } ], - "id": 119, + "id": 134, "name": "_safeErc20Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "1969:18:0", + "referencedDeclaration": 280, + "src": "2101:18:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 122, + "id": 137, "isConstant": false, "isLValue": false, "isPure": false, @@ -2141,15 +2380,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1969:42:0", + "src": "2101:42:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 123, + "id": 138, "nodeType": "ExpressionStatement", - "src": "1969:42:0" + "src": "2101:42:0" } ] } @@ -2161,19 +2400,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 128, + "id": 143, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 126, + "id": 141, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "2028:7:0", + "referencedDeclaration": 63, + "src": "2160:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2184,14 +2423,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 127, + "id": 142, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2038:1:0", + "src": "2170:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2199,34 +2438,34 @@ }, "value": "0" }, - "src": "2028:11:0", + "src": "2160:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 150, + "id": 165, "nodeType": "IfStatement", - "src": "2024:203:0", + "src": "2156:203:0", "trueBody": { - "id": 149, + "id": 164, "nodeType": "Block", - "src": "2041:186:0", + "src": "2173:186:0", "statements": [ { "assignments": [ - 130, + 145, null ], "declarations": [ { "constant": false, - "id": 130, + "id": 145, "name": "success", "nodeType": "VariableDeclaration", - "scope": 149, - "src": "2050:12:0", + "scope": 164, + "src": "2182:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2234,10 +2473,10 @@ "typeString": "bool" }, "typeName": { - "id": 129, + "id": 144, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2050:4:0", + "src": "2182:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2248,21 +2487,21 @@ }, null ], - "id": 138, + "id": 153, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "", - "id": 136, + "id": 151, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2099:2:0", + "src": "2231:2:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", @@ -2281,12 +2520,12 @@ "arguments": [ { "argumentTypes": null, - "id": 134, + "id": 149, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "2090:7:0", + "referencedDeclaration": 63, + "src": "2222:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2304,18 +2543,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 131, + "id": 146, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "2068:10:0", + "referencedDeclaration": 57, + "src": "2200:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "id": 132, + "id": 147, "isConstant": false, "isLValue": false, "isPure": false, @@ -2323,13 +2562,13 @@ "memberName": "call", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2068:15:0", + "src": "2200:15:0", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 133, + "id": 148, "isConstant": false, "isLValue": false, "isPure": false, @@ -2337,13 +2576,13 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2068:21:0", + "src": "2200:21:0", "typeDescriptions": { "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" } }, - "id": 135, + "id": 150, "isConstant": false, "isLValue": false, "isPure": false, @@ -2351,13 +2590,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2068:30:0", + "src": "2200:30:0", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 137, + "id": 152, "isConstant": false, "isLValue": false, "isPure": false, @@ -2365,19 +2604,19 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2068:34:0", + "src": "2200:34:0", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", - "src": "2049:53:0" + "src": "2181:53:0" }, { "condition": { "argumentTypes": null, - "id": 140, + "id": 155, "isConstant": false, "isLValue": false, "isPure": false, @@ -2385,15 +2624,15 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "2114:8:0", + "src": "2246:8:0", "subExpression": { "argumentTypes": null, - "id": 139, + "id": 154, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "2115:7:0", + "referencedDeclaration": 145, + "src": "2247:7:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2405,13 +2644,13 @@ } }, "falseBody": null, - "id": 148, + "id": 163, "nodeType": "IfStatement", - "src": "2110:111:0", + "src": "2242:111:0", "trueBody": { - "id": 147, + "id": 162, "nodeType": "Block", - "src": "2124:97:0", + "src": "2256:97:0", "statements": [ { "expression": { @@ -2419,12 +2658,12 @@ "arguments": [ { "argumentTypes": null, - "id": 144, + "id": 159, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "2204:7:0", + "referencedDeclaration": 63, + "src": "2336:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2440,18 +2679,18 @@ ], "expression": { "argumentTypes": null, - "id": 141, + "id": 156, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "2186:8:0", + "referencedDeclaration": 59, + "src": "2318:8:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "id": 143, + "id": 158, "isConstant": false, "isLValue": false, "isPure": false, @@ -2459,13 +2698,13 @@ "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2186:17:0", + "src": "2318:17:0", "typeDescriptions": { "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 145, + "id": 160, "isConstant": false, "isLValue": false, "isPure": false, @@ -2473,15 +2712,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2186:26:0", + "src": "2318:26:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 146, + "id": 161, "nodeType": "ExpressionStatement", - "src": "2186:26:0" + "src": "2318:26:0" } ] } @@ -2492,23 +2731,23 @@ ] }, "documentation": null, - "id": 152, + "id": 167, "implemented": true, "kind": "function", "modifiers": [], "name": "_processWithdraw", "nodeType": "FunctionDefinition", "parameters": { - "id": 73, + "id": 64, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 64, + "id": 57, "name": "_recipient", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1456:26:0", + "scope": 167, + "src": "1396:26:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2516,10 +2755,10 @@ "typeString": "address payable" }, "typeName": { - "id": 63, + "id": 56, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1456:15:0", + "src": "1396:15:0", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -2531,11 +2770,11 @@ }, { "constant": false, - "id": 66, + "id": 59, "name": "_relayer", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1484:24:0", + "scope": 167, + "src": "1424:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2543,10 +2782,10 @@ "typeString": "address payable" }, "typeName": { - "id": 65, + "id": 58, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1484:15:0", + "src": "1424:15:0", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -2558,11 +2797,11 @@ }, { "constant": false, - "id": 68, + "id": 61, "name": "_relayer_fee", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1510:20:0", + "scope": 167, + "src": "1450:20:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2570,10 +2809,10 @@ "typeString": "uint256" }, "typeName": { - "id": 67, + "id": 60, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1510:7:0", + "src": "1450:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2584,11 +2823,11 @@ }, { "constant": false, - "id": 70, + "id": 63, "name": "_refund", "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1532:15:0", + "scope": 167, + "src": "1472:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2596,10 +2835,10 @@ "typeString": "uint256" }, "typeName": { - "id": 69, + "id": 62, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1532:7:0", + "src": "1472:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2607,68 +2846,41 @@ }, "value": null, "visibility": "internal" - }, - { - "constant": false, - "id": 72, - "name": "_feeTo", - "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1549:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 71, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1549:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" } ], - "src": "1455:109:0" + "src": "1395:93:0" }, "returnParameters": { - "id": 74, + "id": 65, "nodeType": "ParameterList", "parameters": [], - "src": "1574:0:0" + "src": "1498:0:0" }, - "scope": 266, - "src": "1430:801:0", + "scope": 281, + "src": "1370:993:0", "stateMutability": "nonpayable", - "superFunction": 1120, + "superFunction": 1279, "visibility": "internal" }, { "body": { - "id": 209, + "id": 224, "nodeType": "Block", - "src": "2321:504:0", + "src": "2453:504:0", "statements": [ { "assignments": [ - 162, - 164 + 177, + 179 ], "declarations": [ { "constant": false, - "id": 162, + "id": 177, "name": "success", "nodeType": "VariableDeclaration", - "scope": 209, - "src": "2328:12:0", + "scope": 224, + "src": "2460:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2676,10 +2888,10 @@ "typeString": "bool" }, "typeName": { - "id": 161, + "id": 176, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2328:4:0", + "src": "2460:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2690,11 +2902,11 @@ }, { "constant": false, - "id": 164, + "id": 179, "name": "data", "nodeType": "VariableDeclaration", - "scope": 209, - "src": "2342:17:0", + "scope": 224, + "src": "2474:17:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -2702,10 +2914,10 @@ "typeString": "bytes" }, "typeName": { - "id": 163, + "id": 178, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2342:5:0", + "src": "2474:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -2715,7 +2927,7 @@ "visibility": "internal" } ], - "id": 175, + "id": 190, "initialValue": { "argumentTypes": null, "arguments": [ @@ -2725,14 +2937,14 @@ { "argumentTypes": null, "hexValue": "30783233623837326464", - "id": 169, + "id": 184, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2397:10:0", + "src": "2529:10:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_599290589_by_1", @@ -2742,12 +2954,12 @@ }, { "argumentTypes": null, - "id": 170, + "id": 185, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 154, - "src": "2428:5:0", + "referencedDeclaration": 169, + "src": "2560:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2755,12 +2967,12 @@ }, { "argumentTypes": null, - "id": 171, + "id": 186, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 156, - "src": "2435:3:0", + "referencedDeclaration": 171, + "src": "2567:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2768,12 +2980,12 @@ }, { "argumentTypes": null, - "id": 172, + "id": 187, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "2440:7:0", + "referencedDeclaration": 173, + "src": "2572:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2801,18 +3013,18 @@ ], "expression": { "argumentTypes": null, - "id": 167, + "id": 182, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3257, - "src": "2374:3:0", + "referencedDeclaration": 1395, + "src": "2506:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 168, + "id": 183, "isConstant": false, "isLValue": false, "isPure": true, @@ -2820,13 +3032,13 @@ "memberName": "encodeWithSelector", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2374:22:0", + "src": "2506:22:0", "typeDescriptions": { "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", "typeString": "function (bytes4) pure returns (bytes memory)" } }, - "id": 173, + "id": 188, "isConstant": false, "isLValue": false, "isPure": false, @@ -2834,7 +3046,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2374:74:0", + "src": "2506:74:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -2850,18 +3062,18 @@ ], "expression": { "argumentTypes": null, - "id": 165, + "id": 180, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "2363:5:0", + "referencedDeclaration": 7, + "src": "2495:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 166, + "id": 181, "isConstant": false, "isLValue": false, "isPure": false, @@ -2869,13 +3081,13 @@ "memberName": "call", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2363:10:0", + "src": "2495:10:0", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 174, + "id": 189, "isConstant": false, "isLValue": false, "isPure": false, @@ -2883,14 +3095,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2363:86:0", + "src": "2495:86:0", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", - "src": "2327:122:0" + "src": "2459:122:0" }, { "expression": { @@ -2898,12 +3110,12 @@ "arguments": [ { "argumentTypes": null, - "id": 177, + "id": 192, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 162, - "src": "2463:7:0", + "referencedDeclaration": 177, + "src": "2595:7:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2912,14 +3124,14 @@ { "argumentTypes": null, "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", - "id": 178, + "id": 193, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2472:27:0", + "src": "2604:27:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", @@ -2939,21 +3151,21 @@ "typeString": "literal_string \"not enough allowed tokens\"" } ], - "id": 176, + "id": 191, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "2455:7:0", + "referencedDeclaration": 1412, + "src": "2587:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 179, + "id": 194, "isConstant": false, "isLValue": false, "isPure": false, @@ -2961,15 +3173,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2455:45:0", + "src": "2587:45:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 180, + "id": 195, "nodeType": "ExpressionStatement", - "src": "2455:45:0" + "src": "2587:45:0" }, { "condition": { @@ -2978,7 +3190,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 184, + "id": 199, "isConstant": false, "isLValue": false, "isPure": false, @@ -2987,18 +3199,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 181, + "id": 196, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 164, - "src": "2600:4:0", + "referencedDeclaration": 179, + "src": "2732:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 182, + "id": 197, "isConstant": false, "isLValue": false, "isPure": false, @@ -3006,7 +3218,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2600:11:0", + "src": "2732:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3017,14 +3229,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 183, + "id": 198, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2614:1:0", + "src": "2746:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3032,20 +3244,20 @@ }, "value": "0" }, - "src": "2600:15:0", + "src": "2732:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 208, + "id": 223, "nodeType": "IfStatement", - "src": "2596:225:0", + "src": "2728:225:0", "trueBody": { - "id": 207, + "id": 222, "nodeType": "Block", - "src": "2617:204:0", + "src": "2749:204:0", "statements": [ { "expression": { @@ -3057,7 +3269,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 189, + "id": 204, "isConstant": false, "isLValue": false, "isPure": false, @@ -3066,18 +3278,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 186, + "id": 201, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 164, - "src": "2633:4:0", + "referencedDeclaration": 179, + "src": "2765:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 187, + "id": 202, "isConstant": false, "isLValue": false, "isPure": false, @@ -3085,7 +3297,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2633:11:0", + "src": "2765:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3096,14 +3308,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "3332", - "id": 188, + "id": 203, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2648:2:0", + "src": "2780:2:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_32_by_1", @@ -3111,7 +3323,7 @@ }, "value": "32" }, - "src": "2633:17:0", + "src": "2765:17:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3120,14 +3332,14 @@ { "argumentTypes": null, "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", - "id": 190, + "id": 205, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2652:44:0", + "src": "2784:44:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", @@ -3147,21 +3359,21 @@ "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" } ], - "id": 185, + "id": 200, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "2625:7:0", + "referencedDeclaration": 1412, + "src": "2757:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 191, + "id": 206, "isConstant": false, "isLValue": false, "isPure": false, @@ -3169,32 +3381,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2625:72:0", + "src": "2757:72:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 192, + "id": 207, "nodeType": "ExpressionStatement", - "src": "2625:72:0" + "src": "2757:72:0" }, { "expression": { "argumentTypes": null, - "id": 200, + "id": 215, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 193, + "id": 208, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 162, - "src": "2705:7:0", + "referencedDeclaration": 177, + "src": "2837:7:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3207,12 +3419,12 @@ "arguments": [ { "argumentTypes": null, - "id": 196, + "id": 211, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 164, - "src": "2726:4:0", + "referencedDeclaration": 179, + "src": "2858:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -3223,13 +3435,13 @@ "components": [ { "argumentTypes": null, - "id": 197, + "id": 212, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "2733:4:0", + "src": "2865:4:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" @@ -3237,14 +3449,14 @@ "typeName": "bool" } ], - "id": 198, + "id": 213, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "2732:6:0", + "src": "2864:6:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" @@ -3264,18 +3476,18 @@ ], "expression": { "argumentTypes": null, - "id": 194, + "id": 209, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3257, - "src": "2715:3:0", + "referencedDeclaration": 1395, + "src": "2847:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 195, + "id": 210, "isConstant": false, "isLValue": false, "isPure": true, @@ -3283,13 +3495,13 @@ "memberName": "decode", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2715:10:0", + "src": "2847:10:0", "typeDescriptions": { "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 199, + "id": 214, "isConstant": false, "isLValue": false, "isPure": false, @@ -3297,21 +3509,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2715:24:0", + "src": "2847:24:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "2705:34:0", + "src": "2837:34:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 201, + "id": 216, "nodeType": "ExpressionStatement", - "src": "2705:34:0" + "src": "2837:34:0" }, { "expression": { @@ -3319,12 +3531,12 @@ "arguments": [ { "argumentTypes": null, - "id": 203, + "id": 218, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 162, - "src": "2755:7:0", + "referencedDeclaration": 177, + "src": "2887:7:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3333,14 +3545,14 @@ { "argumentTypes": null, "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", - "id": 204, + "id": 219, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2764:49:0", + "src": "2896:49:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", @@ -3360,21 +3572,21 @@ "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" } ], - "id": 202, + "id": 217, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "2747:7:0", + "referencedDeclaration": 1412, + "src": "2879:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 205, + "id": 220, "isConstant": false, "isLValue": false, "isPure": false, @@ -3382,15 +3594,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2747:67:0", + "src": "2879:67:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 206, + "id": 221, "nodeType": "ExpressionStatement", - "src": "2747:67:0" + "src": "2879:67:0" } ] } @@ -3398,23 +3610,23 @@ ] }, "documentation": null, - "id": 210, + "id": 225, "implemented": true, "kind": "function", "modifiers": [], "name": "_safeErc20TransferFrom", "nodeType": "FunctionDefinition", "parameters": { - "id": 159, + "id": 174, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 154, + "id": 169, "name": "_from", "nodeType": "VariableDeclaration", - "scope": 210, - "src": "2267:13:0", + "scope": 225, + "src": "2399:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3422,10 +3634,10 @@ "typeString": "address" }, "typeName": { - "id": 153, + "id": 168, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2267:7:0", + "src": "2399:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3437,11 +3649,11 @@ }, { "constant": false, - "id": 156, + "id": 171, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 210, - "src": "2282:11:0", + "scope": 225, + "src": "2414:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3449,10 +3661,10 @@ "typeString": "address" }, "typeName": { - "id": 155, + "id": 170, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2282:7:0", + "src": "2414:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3464,11 +3676,11 @@ }, { "constant": false, - "id": 158, + "id": 173, "name": "_amount", "nodeType": "VariableDeclaration", - "scope": 210, - "src": "2295:15:0", + "scope": 225, + "src": "2427:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3476,10 +3688,10 @@ "typeString": "uint256" }, "typeName": { - "id": 157, + "id": 172, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2295:7:0", + "src": "2427:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3489,39 +3701,39 @@ "visibility": "internal" } ], - "src": "2266:45:0" + "src": "2398:45:0" }, "returnParameters": { - "id": 160, + "id": 175, "nodeType": "ParameterList", "parameters": [], - "src": "2321:0:0" + "src": "2453:0:0" }, - "scope": 266, - "src": "2235:590:0", + "scope": 281, + "src": "2367:590:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 264, + "id": 279, "nodeType": "Block", - "src": "2896:477:0", + "src": "3028:477:0", "statements": [ { "assignments": [ - 218, - 220 + 233, + 235 ], "declarations": [ { "constant": false, - "id": 218, + "id": 233, "name": "success", "nodeType": "VariableDeclaration", - "scope": 264, - "src": "2903:12:0", + "scope": 279, + "src": "3035:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3529,10 +3741,10 @@ "typeString": "bool" }, "typeName": { - "id": 217, + "id": 232, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2903:4:0", + "src": "3035:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3543,11 +3755,11 @@ }, { "constant": false, - "id": 220, + "id": 235, "name": "data", "nodeType": "VariableDeclaration", - "scope": 264, - "src": "2917:17:0", + "scope": 279, + "src": "3049:17:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -3555,10 +3767,10 @@ "typeString": "bytes" }, "typeName": { - "id": 219, + "id": 234, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2917:5:0", + "src": "3049:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -3568,7 +3780,7 @@ "visibility": "internal" } ], - "id": 230, + "id": 245, "initialValue": { "argumentTypes": null, "arguments": [ @@ -3578,14 +3790,14 @@ { "argumentTypes": null, "hexValue": "30786139303539636262", - "id": 225, + "id": 240, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2972:10:0", + "src": "3104:10:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2835717307_by_1", @@ -3595,12 +3807,12 @@ }, { "argumentTypes": null, - "id": 226, + "id": 241, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "2999:3:0", + "referencedDeclaration": 227, + "src": "3131:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3608,12 +3820,12 @@ }, { "argumentTypes": null, - "id": 227, + "id": 242, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "3004:7:0", + "referencedDeclaration": 229, + "src": "3136:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3637,18 +3849,18 @@ ], "expression": { "argumentTypes": null, - "id": 223, + "id": 238, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3257, - "src": "2949:3:0", + "referencedDeclaration": 1395, + "src": "3081:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 224, + "id": 239, "isConstant": false, "isLValue": false, "isPure": true, @@ -3656,13 +3868,13 @@ "memberName": "encodeWithSelector", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2949:22:0", + "src": "3081:22:0", "typeDescriptions": { "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", "typeString": "function (bytes4) pure returns (bytes memory)" } }, - "id": 228, + "id": 243, "isConstant": false, "isLValue": false, "isPure": false, @@ -3670,7 +3882,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2949:63:0", + "src": "3081:63:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -3686,18 +3898,18 @@ ], "expression": { "argumentTypes": null, - "id": 221, + "id": 236, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "2938:5:0", + "referencedDeclaration": 7, + "src": "3070:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 222, + "id": 237, "isConstant": false, "isLValue": false, "isPure": false, @@ -3705,13 +3917,13 @@ "memberName": "call", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2938:10:0", + "src": "3070:10:0", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 229, + "id": 244, "isConstant": false, "isLValue": false, "isPure": false, @@ -3719,14 +3931,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2938:75:0", + "src": "3070:75:0", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", - "src": "2902:111:0" + "src": "3034:111:0" }, { "expression": { @@ -3734,12 +3946,12 @@ "arguments": [ { "argumentTypes": null, - "id": 232, + "id": 247, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 218, - "src": "3027:7:0", + "referencedDeclaration": 233, + "src": "3159:7:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3748,14 +3960,14 @@ { "argumentTypes": null, "hexValue": "6e6f7420656e6f75676820746f6b656e73", - "id": 233, + "id": 248, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3036:19:0", + "src": "3168:19:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", @@ -3775,21 +3987,21 @@ "typeString": "literal_string \"not enough tokens\"" } ], - "id": 231, + "id": 246, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3019:7:0", + "referencedDeclaration": 1412, + "src": "3151:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 234, + "id": 249, "isConstant": false, "isLValue": false, "isPure": false, @@ -3797,15 +4009,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3019:37:0", + "src": "3151:37:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 235, + "id": 250, "nodeType": "ExpressionStatement", - "src": "3019:37:0" + "src": "3151:37:0" }, { "condition": { @@ -3814,7 +4026,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 239, + "id": 254, "isConstant": false, "isLValue": false, "isPure": false, @@ -3823,18 +4035,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 236, + "id": 251, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 220, - "src": "3156:4:0", + "referencedDeclaration": 235, + "src": "3288:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 237, + "id": 252, "isConstant": false, "isLValue": false, "isPure": false, @@ -3842,7 +4054,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3156:11:0", + "src": "3288:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3853,14 +4065,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 238, + "id": 253, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3170:1:0", + "src": "3302:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3868,20 +4080,20 @@ }, "value": "0" }, - "src": "3156:15:0", + "src": "3288:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 263, + "id": 278, "nodeType": "IfStatement", - "src": "3152:217:0", + "src": "3284:217:0", "trueBody": { - "id": 262, + "id": 277, "nodeType": "Block", - "src": "3173:196:0", + "src": "3305:196:0", "statements": [ { "expression": { @@ -3893,7 +4105,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 244, + "id": 259, "isConstant": false, "isLValue": false, "isPure": false, @@ -3902,18 +4114,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 241, + "id": 256, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 220, - "src": "3189:4:0", + "referencedDeclaration": 235, + "src": "3321:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 242, + "id": 257, "isConstant": false, "isLValue": false, "isPure": false, @@ -3921,7 +4133,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3189:11:0", + "src": "3321:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3932,14 +4144,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "3332", - "id": 243, + "id": 258, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3204:2:0", + "src": "3336:2:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_32_by_1", @@ -3947,7 +4159,7 @@ }, "value": "32" }, - "src": "3189:17:0", + "src": "3321:17:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3956,14 +4168,14 @@ { "argumentTypes": null, "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", - "id": 245, + "id": 260, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3208:44:0", + "src": "3340:44:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", @@ -3983,21 +4195,21 @@ "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" } ], - "id": 240, + "id": 255, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3181:7:0", + "referencedDeclaration": 1412, + "src": "3313:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 246, + "id": 261, "isConstant": false, "isLValue": false, "isPure": false, @@ -4005,32 +4217,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3181:72:0", + "src": "3313:72:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 247, + "id": 262, "nodeType": "ExpressionStatement", - "src": "3181:72:0" + "src": "3313:72:0" }, { "expression": { "argumentTypes": null, - "id": 255, + "id": 270, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 248, + "id": 263, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 218, - "src": "3261:7:0", + "referencedDeclaration": 233, + "src": "3393:7:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4043,12 +4255,12 @@ "arguments": [ { "argumentTypes": null, - "id": 251, + "id": 266, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 220, - "src": "3282:4:0", + "referencedDeclaration": 235, + "src": "3414:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -4059,13 +4271,13 @@ "components": [ { "argumentTypes": null, - "id": 252, + "id": 267, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3289:4:0", + "src": "3421:4:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" @@ -4073,14 +4285,14 @@ "typeName": "bool" } ], - "id": 253, + "id": 268, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "3288:6:0", + "src": "3420:6:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" @@ -4100,18 +4312,18 @@ ], "expression": { "argumentTypes": null, - "id": 249, + "id": 264, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3257, - "src": "3271:3:0", + "referencedDeclaration": 1395, + "src": "3403:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 250, + "id": 265, "isConstant": false, "isLValue": false, "isPure": true, @@ -4119,13 +4331,13 @@ "memberName": "decode", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3271:10:0", + "src": "3403:10:0", "typeDescriptions": { "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 254, + "id": 269, "isConstant": false, "isLValue": false, "isPure": false, @@ -4133,21 +4345,21 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3271:24:0", + "src": "3403:24:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "3261:34:0", + "src": "3393:34:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 256, + "id": 271, "nodeType": "ExpressionStatement", - "src": "3261:34:0" + "src": "3393:34:0" }, { "expression": { @@ -4155,12 +4367,12 @@ "arguments": [ { "argumentTypes": null, - "id": 258, + "id": 273, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 218, - "src": "3311:7:0", + "referencedDeclaration": 233, + "src": "3443:7:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4169,14 +4381,14 @@ { "argumentTypes": null, "hexValue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", - "id": 259, + "id": 274, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3320:41:0", + "src": "3452:41:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", @@ -4196,21 +4408,21 @@ "typeString": "literal_string \"not enough tokens. Token returns false.\"" } ], - "id": 257, + "id": 272, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3303:7:0", + "referencedDeclaration": 1412, + "src": "3435:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 260, + "id": 275, "isConstant": false, "isLValue": false, "isPure": false, @@ -4218,15 +4430,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3303:59:0", + "src": "3435:59:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 261, + "id": 276, "nodeType": "ExpressionStatement", - "src": "3303:59:0" + "src": "3435:59:0" } ] } @@ -4234,23 +4446,23 @@ ] }, "documentation": null, - "id": 265, + "id": 280, "implemented": true, "kind": "function", "modifiers": [], "name": "_safeErc20Transfer", "nodeType": "FunctionDefinition", "parameters": { - "id": 215, + "id": 230, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 212, + "id": 227, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 265, - "src": "2857:11:0", + "scope": 280, + "src": "2989:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4258,10 +4470,10 @@ "typeString": "address" }, "typeName": { - "id": 211, + "id": 226, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2857:7:0", + "src": "2989:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4273,11 +4485,11 @@ }, { "constant": false, - "id": 214, + "id": 229, "name": "_amount", "nodeType": "VariableDeclaration", - "scope": 265, - "src": "2870:15:0", + "scope": 280, + "src": "3002:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4285,10 +4497,10 @@ "typeString": "uint256" }, "typeName": { - "id": 213, + "id": 228, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2870:7:0", + "src": "3002:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4298,33 +4510,33 @@ "visibility": "internal" } ], - "src": "2856:30:0" + "src": "2988:30:0" }, "returnParameters": { - "id": 216, + "id": 231, "nodeType": "ParameterList", "parameters": [], - "src": "2896:0:0" + "src": "3028:0:0" }, - "scope": 266, - "src": "2829:544:0", + "scope": 281, + "src": "2961:544:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], - "scope": 267, - "src": "805:2570:0" + "scope": 282, + "src": "830:2677:0" } ], - "src": "755:2621:0" + "src": "755:2753:0" }, "legacyAST": { "attributes": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/ERC20Tornado.sol", "exportedSymbols": { "ERC20Tornado": [ - 266 + 281 ] } }, @@ -4343,10 +4555,10 @@ }, { "attributes": { - "SourceUnit": 1205, + "SourceUnit": 1364, "absolutePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "file": "./Tornado.sol", - "scope": 267, + "scope": 282, "symbolAliases": [ null ], @@ -4356,24 +4568,39 @@ "name": "ImportDirective", "src": "780:23:0" }, + { + "attributes": { + "SourceUnit": 1026, + "absolutePath": "/home/home/dotfiles/tornado-core/contracts/SafeMath.sol", + "file": "./SafeMath.sol", + "scope": 282, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 3, + "name": "ImportDirective", + "src": "804:24:0" + }, { "attributes": { "contractDependencies": [ - 685, - 1204, - 3255 + 838, + 1363, + 1393 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "linearizedBaseContracts": [ - 266, - 1204, - 3255, - 685 + 281, + 1363, + 1393, + 838 ], "name": "ERC20Tornado", - "scope": 267 + "scope": 282 }, "children": [ { @@ -4385,23 +4612,23 @@ "attributes": { "contractScope": null, "name": "Tornado", - "referencedDeclaration": 1204, + "referencedDeclaration": 1363, "type": "contract Tornado" }, - "id": 3, + "id": 4, "name": "UserDefinedTypeName", - "src": "830:7:0" + "src": "855:7:0" } ], - "id": 4, + "id": 5, "name": "InheritanceSpecifier", - "src": "830:7:0" + "src": "855:7:0" }, { "attributes": { "constant": false, "name": "token", - "scope": 266, + "scope": 281, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -4415,40 +4642,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 5, + "id": 6, "name": "ElementaryTypeName", - "src": "842:7:0" + "src": "867:7:0" } ], - "id": 6, + "id": 7, "name": "VariableDeclaration", - "src": "842:20:0" - }, - { - "attributes": { - "constant": false, - "name": "protocolFee", - "scope": 266, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 7, - "name": "ElementaryTypeName", - "src": "866:7:0" - } - ], - "id": 8, - "name": "VariableDeclaration", - "src": "866:26:0" + "src": "867:20:0" }, { "attributes": { @@ -4457,7 +4658,7 @@ "isConstructor": true, "kind": "constructor", "name": "", - "scope": 266, + "scope": 281, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -4469,7 +4670,7 @@ "attributes": { "constant": false, "name": "_verifier", - "scope": 41, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "contract IVerifier", @@ -4481,23 +4682,23 @@ "attributes": { "contractScope": null, "name": "IVerifier", - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "contract IVerifier" }, - "id": 9, + "id": 8, "name": "UserDefinedTypeName", - "src": "914:9:0" + "src": "909:9:0" } ], - "id": 10, + "id": 9, "name": "VariableDeclaration", - "src": "914:19:0" + "src": "909:19:0" }, { "attributes": { "constant": false, "name": "_feeManager", - "scope": 41, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "contract IFeeManager", @@ -4509,23 +4710,23 @@ "attributes": { "contractScope": null, "name": "IFeeManager", - "referencedDeclaration": 888, + "referencedDeclaration": 1052, "type": "contract IFeeManager" }, - "id": 11, + "id": 10, "name": "UserDefinedTypeName", - "src": "939:11:0" + "src": "934:11:0" } ], - "id": 12, + "id": 11, "name": "VariableDeclaration", - "src": "939:23:0" + "src": "934:23:0" }, { "attributes": { "constant": false, "name": "_denomination", - "scope": 41, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4538,20 +4739,20 @@ "name": "uint256", "type": "uint256" }, - "id": 13, + "id": 12, "name": "ElementaryTypeName", - "src": "968:7:0" + "src": "963:7:0" } ], - "id": 14, + "id": 13, "name": "VariableDeclaration", - "src": "968:21:0" + "src": "963:21:0" }, { "attributes": { "constant": false, "name": "_merkleTreeHeight", - "scope": 41, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -4564,20 +4765,20 @@ "name": "uint32", "type": "uint32" }, - "id": 15, + "id": 14, "name": "ElementaryTypeName", - "src": "995:6:0" + "src": "990:6:0" } ], - "id": 16, + "id": 15, "name": "VariableDeclaration", - "src": "995:24:0" + "src": "990:24:0" }, { "attributes": { "constant": false, "name": "_operator", - "scope": 41, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -4591,20 +4792,20 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 17, + "id": 16, "name": "ElementaryTypeName", - "src": "1025:7:0" + "src": "1020:7:0" } ], - "id": 18, + "id": 17, "name": "VariableDeclaration", - "src": "1025:17:0" + "src": "1020:17:0" }, { "attributes": { "constant": false, "name": "_token", - "scope": 41, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -4618,19 +4819,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 19, + "id": 18, "name": "ElementaryTypeName", - "src": "1048:7:0" + "src": "1043:7:0" } ], - "id": 20, + "id": 19, "name": "VariableDeclaration", - "src": "1048:14:0" + "src": "1043:14:0" } ], - "id": 21, + "id": 20, "name": "ParameterList", - "src": "908:158:0" + "src": "903:158:0" }, { "attributes": { @@ -4639,9 +4840,9 @@ ] }, "children": [], - "id": 29, + "id": 28, "name": "ParameterList", - "src": "1151:0:0" + "src": "1146:0:0" }, { "children": [ @@ -4651,13 +4852,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1204, + "referencedDeclaration": 1363, "type": "type(contract Tornado)", "value": "Tornado" }, - "id": 22, + "id": 21, "name": "Identifier", - "src": "1067:7:0" + "src": "1062:7:0" }, { "attributes": { @@ -4665,13 +4866,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 10, + "referencedDeclaration": 9, "type": "contract IVerifier", "value": "_verifier" }, - "id": 23, + "id": 22, "name": "Identifier", - "src": "1075:9:0" + "src": "1070:9:0" }, { "attributes": { @@ -4679,13 +4880,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 12, + "referencedDeclaration": 11, "type": "contract IFeeManager", "value": "_feeManager" }, - "id": 24, + "id": 23, "name": "Identifier", - "src": "1086:11:0" + "src": "1081:11:0" }, { "attributes": { @@ -4693,13 +4894,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 14, + "referencedDeclaration": 13, "type": "uint256", "value": "_denomination" }, - "id": 25, + "id": 24, "name": "Identifier", - "src": "1099:13:0" + "src": "1094:13:0" }, { "attributes": { @@ -4707,13 +4908,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 16, + "referencedDeclaration": 15, "type": "uint32", "value": "_merkleTreeHeight" }, - "id": 26, + "id": 25, "name": "Identifier", - "src": "1114:17:0" + "src": "1109:17:0" }, { "attributes": { @@ -4721,18 +4922,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 18, + "referencedDeclaration": 17, "type": "address", "value": "_operator" }, - "id": 27, + "id": 26, "name": "Identifier", - "src": "1133:9:0" + "src": "1128:9:0" } ], - "id": 28, + "id": 27, "name": "ModifierInvocation", - "src": "1067:76:0" + "src": "1062:76:0" }, { "children": [ @@ -4755,13 +4956,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 6, + "referencedDeclaration": 7, "type": "address", "value": "token" }, - "id": 30, + "id": 29, "name": "Identifier", - "src": "1157:5:0" + "src": "1152:5:0" }, { "attributes": { @@ -4769,121 +4970,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 20, + "referencedDeclaration": 19, "type": "address", "value": "_token" }, - "id": 31, + "id": 30, "name": "Identifier", - "src": "1165:6:0" + "src": "1160:6:0" } ], - "id": 32, + "id": 31, "name": "Assignment", - "src": "1157:14:0" + "src": "1152:14:0" } ], - "id": 33, + "id": 32, "name": "ExpressionStatement", - "src": "1157:14:0" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 8, - "type": "uint256", - "value": "protocolFee" - }, - "id": 34, - "name": "Identifier", - "src": "1193:11:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 14, - "type": "uint256", - "value": "_denomination" - }, - "id": 35, - "name": "Identifier", - "src": "1207:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "323030", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 200", - "value": "200" - }, - "id": 36, - "name": "Literal", - "src": "1223:3:0" - } - ], - "id": 37, - "name": "BinaryOperation", - "src": "1207:19:0" - } - ], - "id": 38, - "name": "Assignment", - "src": "1193:33:0" - } - ], - "id": 39, - "name": "ExpressionStatement", - "src": "1193:33:0" + "src": "1152:14:0" } ], - "id": 40, + "id": 33, "name": "Block", - "src": "1151:80:0" + "src": "1146:25:0" } ], - "id": 41, + "id": 34, "name": "FunctionDefinition", - "src": "897:334:0" + "src": "892:279:0" }, { "attributes": { @@ -4895,9 +5008,9 @@ null ], "name": "_processDeposit", - "scope": 266, + "scope": 281, "stateMutability": "nonpayable", - "superFunction": 1019, + "superFunction": 1183, "visibility": "internal" }, "children": [ @@ -4908,9 +5021,9 @@ ] }, "children": [], - "id": 42, + "id": 35, "name": "ParameterList", - "src": "1259:2:0" + "src": "1199:2:0" }, { "attributes": { @@ -4919,9 +5032,9 @@ ] }, "children": [], - "id": 43, + "id": 36, "name": "ParameterList", - "src": "1271:0:0" + "src": "1211:0:0" }, { "children": [ @@ -4955,16 +5068,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 44, + "id": 37, "name": "Identifier", - "src": "1277:7:0" + "src": "1217:7:0" }, { "attributes": { @@ -4999,18 +5112,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3270, + "referencedDeclaration": 1408, "type": "msg", "value": "msg" }, - "id": 45, + "id": 38, "name": "Identifier", - "src": "1285:3:0" + "src": "1225:3:0" } ], - "id": 46, + "id": 39, "name": "MemberAccess", - "src": "1285:9:0" + "src": "1225:9:0" }, { "attributes": { @@ -5025,14 +5138,14 @@ "type": "int_const 0", "value": "0" }, - "id": 47, + "id": 40, "name": "Literal", - "src": "1298:1:0" + "src": "1238:1:0" } ], - "id": 48, + "id": 41, "name": "BinaryOperation", - "src": "1285:14:0" + "src": "1225:14:0" }, { "attributes": { @@ -5047,19 +5160,19 @@ "type": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"", "value": "ETH value is supposed to be 0 for ERC20 instance" }, - "id": 49, + "id": 42, "name": "Literal", - "src": "1301:50:0" + "src": "1241:50:0" } ], - "id": 50, + "id": 43, "name": "FunctionCall", - "src": "1277:75:0" + "src": "1217:75:0" } ], - "id": 51, + "id": 44, "name": "ExpressionStatement", - "src": "1277:75:0" + "src": "1217:75:0" }, { "children": [ @@ -5097,13 +5210,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 210, + "referencedDeclaration": 225, "type": "function (address,address,uint256)", "value": "_safeErc20TransferFrom" }, - "id": 52, + "id": 45, "name": "Identifier", - "src": "1358:22:0" + "src": "1298:22:0" }, { "attributes": { @@ -5123,18 +5236,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3270, + "referencedDeclaration": 1408, "type": "msg", "value": "msg" }, - "id": 53, + "id": 46, "name": "Identifier", - "src": "1381:3:0" + "src": "1321:3:0" } ], - "id": 54, + "id": 47, "name": "MemberAccess", - "src": "1381:10:0" + "src": "1321:10:0" }, { "attributes": { @@ -5155,7 +5268,7 @@ "attributes": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20Tornado_$266", + "typeIdentifier": "t_contract$_ERC20Tornado_$281", "typeString": "contract ERC20Tornado" } ], @@ -5166,9 +5279,9 @@ "type": "type(address)", "value": "address" }, - "id": 55, + "id": 48, "name": "ElementaryTypeNameExpression", - "src": "1393:7:0" + "src": "1333:7:0" }, { "attributes": { @@ -5176,18 +5289,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3296, + "referencedDeclaration": 1436, "type": "contract ERC20Tornado", "value": "this" }, - "id": 56, + "id": 49, "name": "Identifier", - "src": "1401:4:0" + "src": "1341:4:0" } ], - "id": 57, + "id": 50, "name": "FunctionCall", - "src": "1393:13:0" + "src": "1333:13:0" }, { "attributes": { @@ -5195,33 +5308,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 894, + "referencedDeclaration": 1058, "type": "uint256", "value": "denomination" }, - "id": 58, + "id": 51, "name": "Identifier", - "src": "1408:12:0" + "src": "1348:12:0" } ], - "id": 59, + "id": 52, "name": "FunctionCall", - "src": "1358:63:0" + "src": "1298:63:0" } ], - "id": 60, + "id": 53, "name": "ExpressionStatement", - "src": "1358:63:0" + "src": "1298:63:0" } ], - "id": 61, + "id": 54, "name": "Block", - "src": "1271:155:0" + "src": "1211:155:0" } ], - "id": 62, + "id": 55, "name": "FunctionDefinition", - "src": "1235:191:0" + "src": "1175:191:0" }, { "attributes": { @@ -5233,9 +5346,9 @@ null ], "name": "_processWithdraw", - "scope": 266, + "scope": 281, "stateMutability": "nonpayable", - "superFunction": 1120, + "superFunction": 1279, "visibility": "internal" }, "children": [ @@ -5245,7 +5358,7 @@ "attributes": { "constant": false, "name": "_recipient", - "scope": 152, + "scope": 167, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -5259,20 +5372,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 63, + "id": 56, "name": "ElementaryTypeName", - "src": "1456:15:0" + "src": "1396:15:0" } ], - "id": 64, + "id": 57, "name": "VariableDeclaration", - "src": "1456:26:0" + "src": "1396:26:0" }, { "attributes": { "constant": false, "name": "_relayer", - "scope": 152, + "scope": 167, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -5286,20 +5399,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 65, + "id": 58, "name": "ElementaryTypeName", - "src": "1484:15:0" + "src": "1424:15:0" } ], - "id": 66, + "id": 59, "name": "VariableDeclaration", - "src": "1484:24:0" + "src": "1424:24:0" }, { "attributes": { "constant": false, "name": "_relayer_fee", - "scope": 152, + "scope": 167, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5312,20 +5425,20 @@ "name": "uint256", "type": "uint256" }, - "id": 67, + "id": 60, "name": "ElementaryTypeName", - "src": "1510:7:0" + "src": "1450:7:0" } ], - "id": 68, + "id": 61, "name": "VariableDeclaration", - "src": "1510:20:0" + "src": "1450:20:0" }, { "attributes": { "constant": false, "name": "_refund", - "scope": 152, + "scope": 167, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5338,46 +5451,19 @@ "name": "uint256", "type": "uint256" }, - "id": 69, + "id": 62, "name": "ElementaryTypeName", - "src": "1532:7:0" + "src": "1472:7:0" } ], - "id": 70, + "id": 63, "name": "VariableDeclaration", - "src": "1532:15:0" - }, - { - "attributes": { - "constant": false, - "name": "_feeTo", - "scope": 152, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 71, - "name": "ElementaryTypeName", - "src": "1549:7:0" - } - ], - "id": 72, - "name": "VariableDeclaration", - "src": "1549:14:0" + "src": "1472:15:0" } ], - "id": 73, + "id": 64, "name": "ParameterList", - "src": "1455:109:0" + "src": "1395:93:0" }, { "attributes": { @@ -5386,9 +5472,9 @@ ] }, "children": [], - "id": 74, + "id": 65, "name": "ParameterList", - "src": "1574:0:0" + "src": "1498:0:0" }, { "children": [ @@ -5422,16 +5508,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 75, + "id": 66, "name": "Identifier", - "src": "1580:7:0" + "src": "1504:7:0" }, { "attributes": { @@ -5466,18 +5552,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3270, + "referencedDeclaration": 1408, "type": "msg", "value": "msg" }, - "id": 76, + "id": 67, "name": "Identifier", - "src": "1588:3:0" + "src": "1512:3:0" } ], - "id": 77, + "id": 68, "name": "MemberAccess", - "src": "1588:9:0" + "src": "1512:9:0" }, { "attributes": { @@ -5485,18 +5571,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 70, + "referencedDeclaration": 63, "type": "uint256", "value": "_refund" }, - "id": 78, + "id": 69, "name": "Identifier", - "src": "1601:7:0" + "src": "1525:7:0" } ], - "id": 79, + "id": 70, "name": "BinaryOperation", - "src": "1588:20:0" + "src": "1512:20:0" }, { "attributes": { @@ -5511,24 +5597,213 @@ "type": "literal_string \"Incorrect refund amount received by the contract\"", "value": "Incorrect refund amount received by the contract" }, - "id": 80, + "id": 71, "name": "Literal", - "src": "1610:50:0" + "src": "1534:50:0" } ], - "id": 81, + "id": 72, "name": "FunctionCall", - "src": "1580:81:0" + "src": "1504:81:0" } ], - "id": 82, + "id": 73, "name": "ExpressionStatement", - "src": "1580:81:0" + "src": "1504:81:0" }, { "attributes": { "assignments": [ - 84 + 75 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "feeTo", + "scope": 166, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 74, + "name": "ElementaryTypeName", + "src": "1592:7:0" + } + ], + "id": 75, + "name": "VariableDeclaration", + "src": "1592:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "feeTo", + "referencedDeclaration": 1046, + "type": "function () view external returns (address)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1070, + "type": "contract IFeeManager", + "value": "feeManager" + }, + "id": 76, + "name": "Identifier", + "src": "1608:10:0" + } + ], + "id": 77, + "name": "MemberAccess", + "src": "1608:16:0" + } + ], + "id": 78, + "name": "FunctionCall", + "src": "1608:18:0" + } + ], + "id": 79, + "name": "VariableDeclarationStatement", + "src": "1592:34:0" + }, + { + "attributes": { + "assignments": [ + 81 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "protocolFeeDivisor", + "scope": 166, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 80, + "name": "ElementaryTypeName", + "src": "1632:7:0" + } + ], + "id": 81, + "name": "VariableDeclaration", + "src": "1632:26:0" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "protocolFeeDivisor", + "referencedDeclaration": 1051, + "type": "function () view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1070, + "type": "contract IFeeManager", + "value": "feeManager" + }, + "id": 82, + "name": "Identifier", + "src": "1661:10:0" + } + ], + "id": 83, + "name": "MemberAccess", + "src": "1661:29:0" + } + ], + "id": 84, + "name": "FunctionCall", + "src": "1661:31:0" + } + ], + "id": 85, + "name": "VariableDeclarationStatement", + "src": "1632:60:0" + }, + { + "attributes": { + "assignments": [ + 87 ] }, "children": [ @@ -5536,7 +5811,7 @@ "attributes": { "constant": false, "name": "feeOn", - "scope": 151, + "scope": 166, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -5549,77 +5824,148 @@ "name": "bool", "type": "bool" }, - "id": 83, + "id": 86, "name": "ElementaryTypeName", - "src": "1668:4:0" + "src": "1699:4:0" } ], - "id": 84, + "id": 87, "name": "VariableDeclaration", - "src": "1668:10:0" + "src": "1699:10:0" }, { "attributes": { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" }, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "operator": "!=", + "operator": "&&", "type": "bool" }, "children": [ { "attributes": { "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 72, - "type": "address", - "value": "_feeTo" - }, - "id": 85, - "name": "Identifier", - "src": "1681:6:0" - }, - { - "attributes": { - "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, "isConstant": false, "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, + "isPure": false, "lValueRequested": false, - "names": [ - null - ], - "type": "address payable", - "type_conversion": true + "operator": "!=", + "type": "bool" }, "children": [ { "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } + "argumentTypes": null, + "overloadedDeclarations": [ + null ], + "referencedDeclaration": 75, + "type": "address", + "value": "feeTo" + }, + "id": 88, + "name": "Identifier", + "src": "1712:5:0" + }, + { + "attributes": { + "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": true, + "isStructConstructorCall": false, "lValueRequested": false, - "type": "type(address)", - "value": "address" + "names": [ + null + ], + "type": "address payable", + "type_conversion": true }, - "id": 86, - "name": "ElementaryTypeNameExpression", - "src": "1691:7:0" + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 89, + "name": "ElementaryTypeNameExpression", + "src": "1721:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 90, + "name": "Literal", + "src": "1729:1:0" + } + ], + "id": 91, + "name": "FunctionCall", + "src": "1721:10:0" + } + ], + "id": 92, + "name": "BinaryOperation", + "src": "1712:19:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 81, + "type": "uint256", + "value": "protocolFeeDivisor" + }, + "id": 93, + "name": "Identifier", + "src": "1735:18:0" }, { "attributes": { @@ -5634,24 +5980,24 @@ "type": "int_const 0", "value": "0" }, - "id": 87, + "id": 94, "name": "Literal", - "src": "1699:1:0" + "src": "1757:1:0" } ], - "id": 88, - "name": "FunctionCall", - "src": "1691:10:0" + "id": 95, + "name": "BinaryOperation", + "src": "1735:23:0" } ], - "id": 89, + "id": 96, "name": "BinaryOperation", - "src": "1681:20:0" + "src": "1712:46:0" } ], - "id": 90, + "id": 97, "name": "VariableDeclarationStatement", - "src": "1668:33:0" + "src": "1699:59:0" }, { "children": [ @@ -5661,16 +6007,142 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 84, + "referencedDeclaration": 87, "type": "bool", "value": "feeOn" }, - "id": 91, + "id": 98, "name": "Identifier", - "src": "1711:5:0" + "src": "1768:5:0" }, { "children": [ + { + "attributes": { + "assignments": [ + 100 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "protocolFee", + "scope": 121, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 99, + "name": "ElementaryTypeName", + "src": "1783:7:0" + } + ], + "id": 100, + "name": "VariableDeclaration", + "src": "1783:19:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "div", + "referencedDeclaration": 958, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1025, + "type": "type(library SafeMath)", + "value": "SafeMath" + }, + "id": 101, + "name": "Identifier", + "src": "1805:8:0" + } + ], + "id": 102, + "name": "MemberAccess", + "src": "1805:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1058, + "type": "uint256", + "value": "denomination" + }, + "id": 103, + "name": "Identifier", + "src": "1818:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 81, + "type": "uint256", + "value": "protocolFeeDivisor" + }, + "id": 104, + "name": "Identifier", + "src": "1832:18:0" + } + ], + "id": 105, + "name": "FunctionCall", + "src": "1805:46:0" + } + ], + "id": 106, + "name": "VariableDeclarationStatement", + "src": "1783:68:0" + }, { "children": [ { @@ -5703,13 +6175,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 265, + "referencedDeclaration": 280, "type": "function (address,uint256)", "value": "_safeErc20Transfer" }, - "id": 92, + "id": 107, "name": "Identifier", - "src": "1726:18:0" + "src": "1859:18:0" }, { "attributes": { @@ -5717,13 +6189,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 64, + "referencedDeclaration": 57, "type": "address payable", "value": "_recipient" }, - "id": 93, + "id": 108, "name": "Identifier", - "src": "1745:10:0" + "src": "1878:10:0" }, { "attributes": { @@ -5761,13 +6233,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 894, + "referencedDeclaration": 1058, "type": "uint256", "value": "denomination" }, - "id": 94, + "id": 109, "name": "Identifier", - "src": "1757:12:0" + "src": "1890:12:0" }, { "attributes": { @@ -5775,18 +6247,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 68, + "referencedDeclaration": 61, "type": "uint256", "value": "_relayer_fee" }, - "id": 95, + "id": 110, "name": "Identifier", - "src": "1772:12:0" + "src": "1905:12:0" } ], - "id": 96, + "id": 111, "name": "BinaryOperation", - "src": "1757:27:0" + "src": "1890:27:0" }, { "attributes": { @@ -5794,28 +6266,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 8, + "referencedDeclaration": 100, "type": "uint256", "value": "protocolFee" }, - "id": 97, + "id": 112, "name": "Identifier", - "src": "1787:11:0" + "src": "1920:11:0" } ], - "id": 98, + "id": 113, "name": "BinaryOperation", - "src": "1757:41:0" + "src": "1890:41:0" } ], - "id": 99, + "id": 114, "name": "FunctionCall", - "src": "1726:73:0" + "src": "1859:73:0" } ], - "id": 100, + "id": 115, "name": "ExpressionStatement", - "src": "1726:73:0" + "src": "1859:73:0" }, { "children": [ @@ -5849,13 +6321,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 265, + "referencedDeclaration": 280, "type": "function (address,uint256)", "value": "_safeErc20Transfer" }, - "id": 101, + "id": 116, "name": "Identifier", - "src": "1807:18:0" + "src": "1940:18:0" }, { "attributes": { @@ -5863,13 +6335,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 72, + "referencedDeclaration": 75, "type": "address", - "value": "_feeTo" + "value": "feeTo" }, - "id": 102, + "id": 117, "name": "Identifier", - "src": "1826:6:0" + "src": "1959:5:0" }, { "attributes": { @@ -5877,28 +6349,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 8, + "referencedDeclaration": 100, "type": "uint256", "value": "protocolFee" }, - "id": 103, + "id": 118, "name": "Identifier", - "src": "1834:11:0" + "src": "1966:11:0" } ], - "id": 104, + "id": 119, "name": "FunctionCall", - "src": "1807:39:0" + "src": "1940:38:0" } ], - "id": 105, + "id": 120, "name": "ExpressionStatement", - "src": "1807:39:0" + "src": "1940:38:0" } ], - "id": 106, + "id": 121, "name": "Block", - "src": "1718:135:0" + "src": "1775:210:0" }, { "children": [ @@ -5934,13 +6406,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 265, + "referencedDeclaration": 280, "type": "function (address,uint256)", "value": "_safeErc20Transfer" }, - "id": 107, + "id": 122, "name": "Identifier", - "src": "1867:18:0" + "src": "1999:18:0" }, { "attributes": { @@ -5948,13 +6420,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 64, + "referencedDeclaration": 57, "type": "address payable", "value": "_recipient" }, - "id": 108, + "id": 123, "name": "Identifier", - "src": "1886:10:0" + "src": "2018:10:0" }, { "attributes": { @@ -5977,13 +6449,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 894, + "referencedDeclaration": 1058, "type": "uint256", "value": "denomination" }, - "id": 109, + "id": 124, "name": "Identifier", - "src": "1898:12:0" + "src": "2030:12:0" }, { "attributes": { @@ -5991,38 +6463,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 68, + "referencedDeclaration": 61, "type": "uint256", "value": "_relayer_fee" }, - "id": 110, + "id": 125, "name": "Identifier", - "src": "1913:12:0" + "src": "2045:12:0" } ], - "id": 111, + "id": 126, "name": "BinaryOperation", - "src": "1898:27:0" + "src": "2030:27:0" } ], - "id": 112, + "id": 127, "name": "FunctionCall", - "src": "1867:59:0" + "src": "1999:59:0" } ], - "id": 113, + "id": 128, "name": "ExpressionStatement", - "src": "1867:59:0" + "src": "1999:59:0" } ], - "id": 114, + "id": 129, "name": "Block", - "src": "1859:74:0" + "src": "1991:74:0" } ], - "id": 115, + "id": 130, "name": "IfStatement", - "src": "1707:226:0" + "src": "1764:301:0" }, { "attributes": { @@ -6050,13 +6522,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 68, + "referencedDeclaration": 61, "type": "uint256", "value": "_relayer_fee" }, - "id": 116, + "id": 131, "name": "Identifier", - "src": "1943:12:0" + "src": "2075:12:0" }, { "attributes": { @@ -6071,14 +6543,14 @@ "type": "int_const 0", "value": "0" }, - "id": 117, + "id": 132, "name": "Literal", - "src": "1958:1:0" + "src": "2090:1:0" } ], - "id": 118, + "id": 133, "name": "BinaryOperation", - "src": "1943:16:0" + "src": "2075:16:0" }, { "children": [ @@ -6114,13 +6586,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 265, + "referencedDeclaration": 280, "type": "function (address,uint256)", "value": "_safeErc20Transfer" }, - "id": 119, + "id": 134, "name": "Identifier", - "src": "1969:18:0" + "src": "2101:18:0" }, { "attributes": { @@ -6128,13 +6600,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 66, + "referencedDeclaration": 59, "type": "address payable", "value": "_relayer" }, - "id": 120, + "id": 135, "name": "Identifier", - "src": "1988:8:0" + "src": "2120:8:0" }, { "attributes": { @@ -6142,33 +6614,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 68, + "referencedDeclaration": 61, "type": "uint256", "value": "_relayer_fee" }, - "id": 121, + "id": 136, "name": "Identifier", - "src": "1998:12:0" + "src": "2130:12:0" } ], - "id": 122, + "id": 137, "name": "FunctionCall", - "src": "1969:42:0" + "src": "2101:42:0" } ], - "id": 123, + "id": 138, "name": "ExpressionStatement", - "src": "1969:42:0" + "src": "2101:42:0" } ], - "id": 124, + "id": 139, "name": "Block", - "src": "1961:57:0" + "src": "2093:57:0" } ], - "id": 125, + "id": 140, "name": "IfStatement", - "src": "1939:79:0" + "src": "2071:79:0" }, { "attributes": { @@ -6196,13 +6668,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 70, + "referencedDeclaration": 63, "type": "uint256", "value": "_refund" }, - "id": 126, + "id": 141, "name": "Identifier", - "src": "2028:7:0" + "src": "2160:7:0" }, { "attributes": { @@ -6217,21 +6689,21 @@ "type": "int_const 0", "value": "0" }, - "id": 127, + "id": 142, "name": "Literal", - "src": "2038:1:0" + "src": "2170:1:0" } ], - "id": 128, + "id": 143, "name": "BinaryOperation", - "src": "2028:11:0" + "src": "2160:11:0" }, { "children": [ { "attributes": { "assignments": [ - 130, + 145, null ] }, @@ -6240,7 +6712,7 @@ "attributes": { "constant": false, "name": "success", - "scope": 149, + "scope": 164, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -6253,14 +6725,14 @@ "name": "bool", "type": "bool" }, - "id": 129, + "id": 144, "name": "ElementaryTypeName", - "src": "2050:4:0" + "src": "2182:4:0" } ], - "id": 130, + "id": 145, "name": "VariableDeclaration", - "src": "2050:12:0" + "src": "2182:12:0" }, { "attributes": { @@ -6332,23 +6804,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 64, + "referencedDeclaration": 57, "type": "address payable", "value": "_recipient" }, - "id": 131, + "id": 146, "name": "Identifier", - "src": "2068:10:0" + "src": "2200:10:0" } ], - "id": 132, + "id": 147, "name": "MemberAccess", - "src": "2068:15:0" + "src": "2200:15:0" } ], - "id": 133, + "id": 148, "name": "MemberAccess", - "src": "2068:21:0" + "src": "2200:21:0" }, { "attributes": { @@ -6356,18 +6828,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 70, + "referencedDeclaration": 63, "type": "uint256", "value": "_refund" }, - "id": 134, + "id": 149, "name": "Identifier", - "src": "2090:7:0" + "src": "2222:7:0" } ], - "id": 135, + "id": 150, "name": "FunctionCall", - "src": "2068:30:0" + "src": "2200:30:0" }, { "attributes": { @@ -6382,19 +6854,19 @@ "type": "literal_string \"\"", "value": "" }, - "id": 136, + "id": 151, "name": "Literal", - "src": "2099:2:0" + "src": "2231:2:0" } ], - "id": 137, + "id": 152, "name": "FunctionCall", - "src": "2068:34:0" + "src": "2200:34:0" } ], - "id": 138, + "id": 153, "name": "VariableDeclarationStatement", - "src": "2049:53:0" + "src": "2181:53:0" }, { "attributes": { @@ -6419,18 +6891,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 130, + "referencedDeclaration": 145, "type": "bool", "value": "success" }, - "id": 139, + "id": 154, "name": "Identifier", - "src": "2115:7:0" + "src": "2247:7:0" } ], - "id": 140, + "id": 155, "name": "UnaryOperation", - "src": "2114:8:0" + "src": "2246:8:0" }, { "children": [ @@ -6474,18 +6946,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 66, + "referencedDeclaration": 59, "type": "address payable", "value": "_relayer" }, - "id": 141, + "id": 156, "name": "Identifier", - "src": "2186:8:0" + "src": "2318:8:0" } ], - "id": 143, + "id": 158, "name": "MemberAccess", - "src": "2186:17:0" + "src": "2318:17:0" }, { "attributes": { @@ -6493,53 +6965,53 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 70, + "referencedDeclaration": 63, "type": "uint256", "value": "_refund" }, - "id": 144, + "id": 159, "name": "Identifier", - "src": "2204:7:0" + "src": "2336:7:0" } ], - "id": 145, + "id": 160, "name": "FunctionCall", - "src": "2186:26:0" + "src": "2318:26:0" } ], - "id": 146, + "id": 161, "name": "ExpressionStatement", - "src": "2186:26:0" + "src": "2318:26:0" } ], - "id": 147, + "id": 162, "name": "Block", - "src": "2124:97:0" + "src": "2256:97:0" } ], - "id": 148, + "id": 163, "name": "IfStatement", - "src": "2110:111:0" + "src": "2242:111:0" } ], - "id": 149, + "id": 164, "name": "Block", - "src": "2041:186:0" + "src": "2173:186:0" } ], - "id": 150, + "id": 165, "name": "IfStatement", - "src": "2024:203:0" + "src": "2156:203:0" } ], - "id": 151, + "id": 166, "name": "Block", - "src": "1574:657:0" + "src": "1498:865:0" } ], - "id": 152, + "id": 167, "name": "FunctionDefinition", - "src": "1430:801:0" + "src": "1370:993:0" }, { "attributes": { @@ -6551,7 +7023,7 @@ null ], "name": "_safeErc20TransferFrom", - "scope": 266, + "scope": 281, "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" @@ -6563,7 +7035,7 @@ "attributes": { "constant": false, "name": "_from", - "scope": 210, + "scope": 225, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -6577,20 +7049,20 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 153, + "id": 168, "name": "ElementaryTypeName", - "src": "2267:7:0" + "src": "2399:7:0" } ], - "id": 154, + "id": 169, "name": "VariableDeclaration", - "src": "2267:13:0" + "src": "2399:13:0" }, { "attributes": { "constant": false, "name": "_to", - "scope": 210, + "scope": 225, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -6604,20 +7076,20 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 155, + "id": 170, "name": "ElementaryTypeName", - "src": "2282:7:0" + "src": "2414:7:0" } ], - "id": 156, + "id": 171, "name": "VariableDeclaration", - "src": "2282:11:0" + "src": "2414:11:0" }, { "attributes": { "constant": false, "name": "_amount", - "scope": 210, + "scope": 225, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -6630,19 +7102,19 @@ "name": "uint256", "type": "uint256" }, - "id": 157, + "id": 172, "name": "ElementaryTypeName", - "src": "2295:7:0" + "src": "2427:7:0" } ], - "id": 158, + "id": 173, "name": "VariableDeclaration", - "src": "2295:15:0" + "src": "2427:15:0" } ], - "id": 159, + "id": 174, "name": "ParameterList", - "src": "2266:45:0" + "src": "2398:45:0" }, { "attributes": { @@ -6651,17 +7123,17 @@ ] }, "children": [], - "id": 160, + "id": 175, "name": "ParameterList", - "src": "2321:0:0" + "src": "2453:0:0" }, { "children": [ { "attributes": { "assignments": [ - 162, - 164 + 177, + 179 ] }, "children": [ @@ -6669,7 +7141,7 @@ "attributes": { "constant": false, "name": "success", - "scope": 209, + "scope": 224, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -6682,20 +7154,20 @@ "name": "bool", "type": "bool" }, - "id": 161, + "id": 176, "name": "ElementaryTypeName", - "src": "2328:4:0" + "src": "2460:4:0" } ], - "id": 162, + "id": 177, "name": "VariableDeclaration", - "src": "2328:12:0" + "src": "2460:12:0" }, { "attributes": { "constant": false, "name": "data", - "scope": 209, + "scope": 224, "stateVariable": false, "storageLocation": "memory", "type": "bytes", @@ -6708,14 +7180,14 @@ "name": "bytes", "type": "bytes" }, - "id": 163, + "id": 178, "name": "ElementaryTypeName", - "src": "2342:5:0" + "src": "2474:5:0" } ], - "id": 164, + "id": 179, "name": "VariableDeclaration", - "src": "2342:17:0" + "src": "2474:17:0" }, { "attributes": { @@ -6755,18 +7227,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 6, + "referencedDeclaration": 7, "type": "address", "value": "token" }, - "id": 165, + "id": 180, "name": "Identifier", - "src": "2363:5:0" + "src": "2495:5:0" } ], - "id": 166, + "id": 181, "name": "MemberAccess", - "src": "2363:10:0" + "src": "2495:10:0" }, { "attributes": { @@ -6818,18 +7290,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3257, + "referencedDeclaration": 1395, "type": "abi", "value": "abi" }, - "id": 167, + "id": 182, "name": "Identifier", - "src": "2374:3:0" + "src": "2506:3:0" } ], - "id": 168, + "id": 183, "name": "MemberAccess", - "src": "2374:22:0" + "src": "2506:22:0" }, { "attributes": { @@ -6844,9 +7316,9 @@ "type": "int_const 599290589", "value": "0x23b872dd" }, - "id": 169, + "id": 184, "name": "Literal", - "src": "2397:10:0" + "src": "2529:10:0" }, { "attributes": { @@ -6854,13 +7326,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 154, + "referencedDeclaration": 169, "type": "address", "value": "_from" }, - "id": 170, + "id": 185, "name": "Identifier", - "src": "2428:5:0" + "src": "2560:5:0" }, { "attributes": { @@ -6868,13 +7340,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 156, + "referencedDeclaration": 171, "type": "address", "value": "_to" }, - "id": 171, + "id": 186, "name": "Identifier", - "src": "2435:3:0" + "src": "2567:3:0" }, { "attributes": { @@ -6882,28 +7354,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 158, + "referencedDeclaration": 173, "type": "uint256", "value": "_amount" }, - "id": 172, + "id": 187, "name": "Identifier", - "src": "2440:7:0" + "src": "2572:7:0" } ], - "id": 173, + "id": 188, "name": "FunctionCall", - "src": "2374:74:0" + "src": "2506:74:0" } ], - "id": 174, + "id": 189, "name": "FunctionCall", - "src": "2363:86:0" + "src": "2495:86:0" } ], - "id": 175, + "id": 190, "name": "VariableDeclarationStatement", - "src": "2327:122:0" + "src": "2459:122:0" }, { "children": [ @@ -6935,16 +7407,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 176, + "id": 191, "name": "Identifier", - "src": "2455:7:0" + "src": "2587:7:0" }, { "attributes": { @@ -6952,13 +7424,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 162, + "referencedDeclaration": 177, "type": "bool", "value": "success" }, - "id": 177, + "id": 192, "name": "Identifier", - "src": "2463:7:0" + "src": "2595:7:0" }, { "attributes": { @@ -6973,19 +7445,19 @@ "type": "literal_string \"not enough allowed tokens\"", "value": "not enough allowed tokens" }, - "id": 178, + "id": 193, "name": "Literal", - "src": "2472:27:0" + "src": "2604:27:0" } ], - "id": 179, + "id": 194, "name": "FunctionCall", - "src": "2455:45:0" + "src": "2587:45:0" } ], - "id": 180, + "id": 195, "name": "ExpressionStatement", - "src": "2455:45:0" + "src": "2587:45:0" }, { "attributes": { @@ -7025,18 +7497,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 164, + "referencedDeclaration": 179, "type": "bytes memory", "value": "data" }, - "id": 181, + "id": 196, "name": "Identifier", - "src": "2600:4:0" + "src": "2732:4:0" } ], - "id": 182, + "id": 197, "name": "MemberAccess", - "src": "2600:11:0" + "src": "2732:11:0" }, { "attributes": { @@ -7051,14 +7523,14 @@ "type": "int_const 0", "value": "0" }, - "id": 183, + "id": 198, "name": "Literal", - "src": "2614:1:0" + "src": "2746:1:0" } ], - "id": 184, + "id": 199, "name": "BinaryOperation", - "src": "2600:15:0" + "src": "2732:15:0" }, { "children": [ @@ -7092,16 +7564,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 185, + "id": 200, "name": "Identifier", - "src": "2625:7:0" + "src": "2757:7:0" }, { "attributes": { @@ -7136,18 +7608,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 164, + "referencedDeclaration": 179, "type": "bytes memory", "value": "data" }, - "id": 186, + "id": 201, "name": "Identifier", - "src": "2633:4:0" + "src": "2765:4:0" } ], - "id": 187, + "id": 202, "name": "MemberAccess", - "src": "2633:11:0" + "src": "2765:11:0" }, { "attributes": { @@ -7162,14 +7634,14 @@ "type": "int_const 32", "value": "32" }, - "id": 188, + "id": 203, "name": "Literal", - "src": "2648:2:0" + "src": "2780:2:0" } ], - "id": 189, + "id": 204, "name": "BinaryOperation", - "src": "2633:17:0" + "src": "2765:17:0" }, { "attributes": { @@ -7184,19 +7656,19 @@ "type": "literal_string \"data length should be either 0 or 32 bytes\"", "value": "data length should be either 0 or 32 bytes" }, - "id": 190, + "id": 205, "name": "Literal", - "src": "2652:44:0" + "src": "2784:44:0" } ], - "id": 191, + "id": 206, "name": "FunctionCall", - "src": "2625:72:0" + "src": "2757:72:0" } ], - "id": 192, + "id": 207, "name": "ExpressionStatement", - "src": "2625:72:0" + "src": "2757:72:0" }, { "children": [ @@ -7217,13 +7689,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 162, + "referencedDeclaration": 177, "type": "bool", "value": "success" }, - "id": 193, + "id": 208, "name": "Identifier", - "src": "2705:7:0" + "src": "2837:7:0" }, { "attributes": { @@ -7267,18 +7739,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3257, + "referencedDeclaration": 1395, "type": "abi", "value": "abi" }, - "id": 194, + "id": 209, "name": "Identifier", - "src": "2715:3:0" + "src": "2847:3:0" } ], - "id": 195, + "id": 210, "name": "MemberAccess", - "src": "2715:10:0" + "src": "2847:10:0" }, { "attributes": { @@ -7286,13 +7758,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 164, + "referencedDeclaration": 179, "type": "bytes memory", "value": "data" }, - "id": 196, + "id": 211, "name": "Identifier", - "src": "2726:4:0" + "src": "2858:4:0" }, { "attributes": { @@ -7315,29 +7787,29 @@ "type": "type(bool)", "value": "bool" }, - "id": 197, + "id": 212, "name": "ElementaryTypeNameExpression", - "src": "2733:4:0" + "src": "2865:4:0" } ], - "id": 198, + "id": 213, "name": "TupleExpression", - "src": "2732:6:0" + "src": "2864:6:0" } ], - "id": 199, + "id": 214, "name": "FunctionCall", - "src": "2715:24:0" + "src": "2847:24:0" } ], - "id": 200, + "id": 215, "name": "Assignment", - "src": "2705:34:0" + "src": "2837:34:0" } ], - "id": 201, + "id": 216, "name": "ExpressionStatement", - "src": "2705:34:0" + "src": "2837:34:0" }, { "children": [ @@ -7369,16 +7841,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 202, + "id": 217, "name": "Identifier", - "src": "2747:7:0" + "src": "2879:7:0" }, { "attributes": { @@ -7386,13 +7858,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 162, + "referencedDeclaration": 177, "type": "bool", "value": "success" }, - "id": 203, + "id": 218, "name": "Identifier", - "src": "2755:7:0" + "src": "2887:7:0" }, { "attributes": { @@ -7407,39 +7879,39 @@ "type": "literal_string \"not enough allowed tokens. Token returns false.\"", "value": "not enough allowed tokens. Token returns false." }, - "id": 204, + "id": 219, "name": "Literal", - "src": "2764:49:0" + "src": "2896:49:0" } ], - "id": 205, + "id": 220, "name": "FunctionCall", - "src": "2747:67:0" + "src": "2879:67:0" } ], - "id": 206, + "id": 221, "name": "ExpressionStatement", - "src": "2747:67:0" + "src": "2879:67:0" } ], - "id": 207, + "id": 222, "name": "Block", - "src": "2617:204:0" + "src": "2749:204:0" } ], - "id": 208, + "id": 223, "name": "IfStatement", - "src": "2596:225:0" + "src": "2728:225:0" } ], - "id": 209, + "id": 224, "name": "Block", - "src": "2321:504:0" + "src": "2453:504:0" } ], - "id": 210, + "id": 225, "name": "FunctionDefinition", - "src": "2235:590:0" + "src": "2367:590:0" }, { "attributes": { @@ -7451,7 +7923,7 @@ null ], "name": "_safeErc20Transfer", - "scope": 266, + "scope": 281, "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" @@ -7463,7 +7935,7 @@ "attributes": { "constant": false, "name": "_to", - "scope": 265, + "scope": 280, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -7477,20 +7949,20 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 211, + "id": 226, "name": "ElementaryTypeName", - "src": "2857:7:0" + "src": "2989:7:0" } ], - "id": 212, + "id": 227, "name": "VariableDeclaration", - "src": "2857:11:0" + "src": "2989:11:0" }, { "attributes": { "constant": false, "name": "_amount", - "scope": 265, + "scope": 280, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -7503,19 +7975,19 @@ "name": "uint256", "type": "uint256" }, - "id": 213, + "id": 228, "name": "ElementaryTypeName", - "src": "2870:7:0" + "src": "3002:7:0" } ], - "id": 214, + "id": 229, "name": "VariableDeclaration", - "src": "2870:15:0" + "src": "3002:15:0" } ], - "id": 215, + "id": 230, "name": "ParameterList", - "src": "2856:30:0" + "src": "2988:30:0" }, { "attributes": { @@ -7524,17 +7996,17 @@ ] }, "children": [], - "id": 216, + "id": 231, "name": "ParameterList", - "src": "2896:0:0" + "src": "3028:0:0" }, { "children": [ { "attributes": { "assignments": [ - 218, - 220 + 233, + 235 ] }, "children": [ @@ -7542,7 +8014,7 @@ "attributes": { "constant": false, "name": "success", - "scope": 264, + "scope": 279, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -7555,20 +8027,20 @@ "name": "bool", "type": "bool" }, - "id": 217, + "id": 232, "name": "ElementaryTypeName", - "src": "2903:4:0" + "src": "3035:4:0" } ], - "id": 218, + "id": 233, "name": "VariableDeclaration", - "src": "2903:12:0" + "src": "3035:12:0" }, { "attributes": { "constant": false, "name": "data", - "scope": 264, + "scope": 279, "stateVariable": false, "storageLocation": "memory", "type": "bytes", @@ -7581,14 +8053,14 @@ "name": "bytes", "type": "bytes" }, - "id": 219, + "id": 234, "name": "ElementaryTypeName", - "src": "2917:5:0" + "src": "3049:5:0" } ], - "id": 220, + "id": 235, "name": "VariableDeclaration", - "src": "2917:17:0" + "src": "3049:17:0" }, { "attributes": { @@ -7628,18 +8100,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 6, + "referencedDeclaration": 7, "type": "address", "value": "token" }, - "id": 221, + "id": 236, "name": "Identifier", - "src": "2938:5:0" + "src": "3070:5:0" } ], - "id": 222, + "id": 237, "name": "MemberAccess", - "src": "2938:10:0" + "src": "3070:10:0" }, { "attributes": { @@ -7687,18 +8159,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3257, + "referencedDeclaration": 1395, "type": "abi", "value": "abi" }, - "id": 223, + "id": 238, "name": "Identifier", - "src": "2949:3:0" + "src": "3081:3:0" } ], - "id": 224, + "id": 239, "name": "MemberAccess", - "src": "2949:22:0" + "src": "3081:22:0" }, { "attributes": { @@ -7713,9 +8185,9 @@ "type": "int_const 2835717307", "value": "0xa9059cbb" }, - "id": 225, + "id": 240, "name": "Literal", - "src": "2972:10:0" + "src": "3104:10:0" }, { "attributes": { @@ -7723,13 +8195,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 212, + "referencedDeclaration": 227, "type": "address", "value": "_to" }, - "id": 226, + "id": 241, "name": "Identifier", - "src": "2999:3:0" + "src": "3131:3:0" }, { "attributes": { @@ -7737,28 +8209,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 214, + "referencedDeclaration": 229, "type": "uint256", "value": "_amount" }, - "id": 227, + "id": 242, "name": "Identifier", - "src": "3004:7:0" + "src": "3136:7:0" } ], - "id": 228, + "id": 243, "name": "FunctionCall", - "src": "2949:63:0" + "src": "3081:63:0" } ], - "id": 229, + "id": 244, "name": "FunctionCall", - "src": "2938:75:0" + "src": "3070:75:0" } ], - "id": 230, + "id": 245, "name": "VariableDeclarationStatement", - "src": "2902:111:0" + "src": "3034:111:0" }, { "children": [ @@ -7790,16 +8262,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 231, + "id": 246, "name": "Identifier", - "src": "3019:7:0" + "src": "3151:7:0" }, { "attributes": { @@ -7807,13 +8279,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 218, + "referencedDeclaration": 233, "type": "bool", "value": "success" }, - "id": 232, + "id": 247, "name": "Identifier", - "src": "3027:7:0" + "src": "3159:7:0" }, { "attributes": { @@ -7828,19 +8300,19 @@ "type": "literal_string \"not enough tokens\"", "value": "not enough tokens" }, - "id": 233, + "id": 248, "name": "Literal", - "src": "3036:19:0" + "src": "3168:19:0" } ], - "id": 234, + "id": 249, "name": "FunctionCall", - "src": "3019:37:0" + "src": "3151:37:0" } ], - "id": 235, + "id": 250, "name": "ExpressionStatement", - "src": "3019:37:0" + "src": "3151:37:0" }, { "attributes": { @@ -7880,18 +8352,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 220, + "referencedDeclaration": 235, "type": "bytes memory", "value": "data" }, - "id": 236, + "id": 251, "name": "Identifier", - "src": "3156:4:0" + "src": "3288:4:0" } ], - "id": 237, + "id": 252, "name": "MemberAccess", - "src": "3156:11:0" + "src": "3288:11:0" }, { "attributes": { @@ -7906,14 +8378,14 @@ "type": "int_const 0", "value": "0" }, - "id": 238, + "id": 253, "name": "Literal", - "src": "3170:1:0" + "src": "3302:1:0" } ], - "id": 239, + "id": 254, "name": "BinaryOperation", - "src": "3156:15:0" + "src": "3288:15:0" }, { "children": [ @@ -7947,16 +8419,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 240, + "id": 255, "name": "Identifier", - "src": "3181:7:0" + "src": "3313:7:0" }, { "attributes": { @@ -7991,18 +8463,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 220, + "referencedDeclaration": 235, "type": "bytes memory", "value": "data" }, - "id": 241, + "id": 256, "name": "Identifier", - "src": "3189:4:0" + "src": "3321:4:0" } ], - "id": 242, + "id": 257, "name": "MemberAccess", - "src": "3189:11:0" + "src": "3321:11:0" }, { "attributes": { @@ -8017,14 +8489,14 @@ "type": "int_const 32", "value": "32" }, - "id": 243, + "id": 258, "name": "Literal", - "src": "3204:2:0" + "src": "3336:2:0" } ], - "id": 244, + "id": 259, "name": "BinaryOperation", - "src": "3189:17:0" + "src": "3321:17:0" }, { "attributes": { @@ -8039,19 +8511,19 @@ "type": "literal_string \"data length should be either 0 or 32 bytes\"", "value": "data length should be either 0 or 32 bytes" }, - "id": 245, + "id": 260, "name": "Literal", - "src": "3208:44:0" + "src": "3340:44:0" } ], - "id": 246, + "id": 261, "name": "FunctionCall", - "src": "3181:72:0" + "src": "3313:72:0" } ], - "id": 247, + "id": 262, "name": "ExpressionStatement", - "src": "3181:72:0" + "src": "3313:72:0" }, { "children": [ @@ -8072,13 +8544,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 218, + "referencedDeclaration": 233, "type": "bool", "value": "success" }, - "id": 248, + "id": 263, "name": "Identifier", - "src": "3261:7:0" + "src": "3393:7:0" }, { "attributes": { @@ -8122,18 +8594,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3257, + "referencedDeclaration": 1395, "type": "abi", "value": "abi" }, - "id": 249, + "id": 264, "name": "Identifier", - "src": "3271:3:0" + "src": "3403:3:0" } ], - "id": 250, + "id": 265, "name": "MemberAccess", - "src": "3271:10:0" + "src": "3403:10:0" }, { "attributes": { @@ -8141,13 +8613,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 220, + "referencedDeclaration": 235, "type": "bytes memory", "value": "data" }, - "id": 251, + "id": 266, "name": "Identifier", - "src": "3282:4:0" + "src": "3414:4:0" }, { "attributes": { @@ -8170,29 +8642,29 @@ "type": "type(bool)", "value": "bool" }, - "id": 252, + "id": 267, "name": "ElementaryTypeNameExpression", - "src": "3289:4:0" + "src": "3421:4:0" } ], - "id": 253, + "id": 268, "name": "TupleExpression", - "src": "3288:6:0" + "src": "3420:6:0" } ], - "id": 254, + "id": 269, "name": "FunctionCall", - "src": "3271:24:0" + "src": "3403:24:0" } ], - "id": 255, + "id": 270, "name": "Assignment", - "src": "3261:34:0" + "src": "3393:34:0" } ], - "id": 256, + "id": 271, "name": "ExpressionStatement", - "src": "3261:34:0" + "src": "3393:34:0" }, { "children": [ @@ -8224,16 +8696,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 257, + "id": 272, "name": "Identifier", - "src": "3303:7:0" + "src": "3435:7:0" }, { "attributes": { @@ -8241,13 +8713,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 218, + "referencedDeclaration": 233, "type": "bool", "value": "success" }, - "id": 258, + "id": 273, "name": "Identifier", - "src": "3311:7:0" + "src": "3443:7:0" }, { "attributes": { @@ -8262,49 +8734,49 @@ "type": "literal_string \"not enough tokens. Token returns false.\"", "value": "not enough tokens. Token returns false." }, - "id": 259, + "id": 274, "name": "Literal", - "src": "3320:41:0" + "src": "3452:41:0" } ], - "id": 260, + "id": 275, "name": "FunctionCall", - "src": "3303:59:0" + "src": "3435:59:0" } ], - "id": 261, + "id": 276, "name": "ExpressionStatement", - "src": "3303:59:0" + "src": "3435:59:0" } ], - "id": 262, + "id": 277, "name": "Block", - "src": "3173:196:0" + "src": "3305:196:0" } ], - "id": 263, + "id": 278, "name": "IfStatement", - "src": "3152:217:0" + "src": "3284:217:0" } ], - "id": 264, + "id": 279, "name": "Block", - "src": "2896:477:0" + "src": "3028:477:0" } ], - "id": 265, + "id": 280, "name": "FunctionDefinition", - "src": "2829:544:0" + "src": "2961:544:0" } ], - "id": 266, + "id": 281, "name": "ContractDefinition", - "src": "805:2570:0" + "src": "830:2677:0" } ], - "id": 267, + "id": 282, "name": "SourceUnit", - "src": "755:2621:0" + "src": "755:2753:0" }, "compiler": { "name": "solc", @@ -8329,8 +8801,7 @@ } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-04-05T02:45:55.181Z", - "networkType": "ethereum", + "updatedAt": "2021-04-12T00:15:10.039Z", "devdoc": { "methods": { "changeOperator(address)": { diff --git a/client/contracts/ETHTornado.json b/client/contracts/ETHTornado.json new file mode 100644 index 0000000..3b5b954 --- /dev/null +++ b/client/contracts/ETHTornado.json @@ -0,0 +1,3625 @@ +{ + "contractName": "ETHTornado", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVerifier", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "contract IFeeManager", + "name": "_feeManager", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_denomination", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_merkleTreeHeight", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "commitment", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "leafIndex", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "nullifierHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "relayer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "FIELD_SIZE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ROOT_HISTORY_SIZE", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ZERO_VALUE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_newOperator", + "type": "address" + } + ], + "name": "changeOperator", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "commitments", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "currentRootIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "denomination", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes32", + "name": "_commitment", + "type": "bytes32" + } + ], + "name": "deposit", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "feeManager", + "outputs": [ + { + "internalType": "contract IFeeManager", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "filledSubtrees", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getLastRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "_left", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_right", + "type": "bytes32" + } + ], + "name": "hashLeftRight", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "_root", + "type": "bytes32" + } + ], + "name": "isKnownRoot", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "_nullifierHash", + "type": "bytes32" + } + ], + "name": "isSpent", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_nullifierHashes", + "type": "bytes32[]" + } + ], + "name": "isSpentArray", + "outputs": [ + { + "internalType": "bool[]", + "name": "spent", + "type": "bool[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "levels", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "nextIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nullifierHashes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "roots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_newVerifier", + "type": "address" + } + ], + "name": "updateVerifier", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "verifier", + "outputs": [ + { + "internalType": "contract IVerifier", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "_proof", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "_root", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_nullifierHash", + "type": "bytes32" + }, + { + "internalType": "address payable", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_relayer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_refund", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "zeros", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"contract IFeeManager\",\"name\":\"_feeManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_denomination\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_merkleTreeHeight\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"leafIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"nullifierHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"FIELD_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ROOT_HISTORY_SIZE\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ZERO_VALUE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOperator\",\"type\":\"address\"}],\"name\":\"changeOperator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"commitments\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentRootIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"denomination\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_commitment\",\"type\":\"bytes32\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeManager\",\"outputs\":[{\"internalType\":\"contract IFeeManager\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"filledSubtrees\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLastRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_left\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_right\",\"type\":\"bytes32\"}],\"name\":\"hashLeftRight\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"}],\"name\":\"isKnownRoot\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"}],\"name\":\"isSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_nullifierHashes\",\"type\":\"bytes32[]\"}],\"name\":\"isSpentArray\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"spent\",\"type\":\"bool[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"levels\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nullifierHashes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"roots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_refund\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"zeros\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"changeOperator(address)\":{\"details\":\"operator can change his address \"},\"deposit(bytes32)\":{\"details\":\"Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\",\"params\":{\"_commitment\":\"the note commitment, which is PedersenHash(nullifier + secret)\"}},\"getLastRoot()\":{\"details\":\"Returns the last root\"},\"hashLeftRight(bytes32,bytes32)\":{\"details\":\"Hash 2 tree leaves, returns MiMC(_left, _right)\"},\"isKnownRoot(bytes32)\":{\"details\":\"Whether the root is present in the root history\"},\"isSpent(bytes32)\":{\"details\":\"whether a note is already spent \"},\"isSpentArray(bytes32[])\":{\"details\":\"whether an array of notes is already spent \"},\"updateVerifier(address)\":{\"details\":\"allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address\"},\"withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)\":{\"details\":\"Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/ETHTornado.sol\":\"ETHTornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/ETHTornado.sol\":{\"keccak256\":\"0x0f1eb47edc626014653de7d83559246020e28700f2e394813a28f06d99049016\",\"urls\":[\"bzz-raw://b4da9d118dab1a5449076868c7191717bfca38b26d17704defed63649918e855\",\"dweb:/ipfs/QmTBfg9TpqAJdmiUQnc6Kru2twoEQYbP9fTPKQBYJS43uw\"]},\"/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x7269c9361452a555e6f29e924e70d4478a8a5bd86c7b33ea3731470a52c235b5\",\"urls\":[\"bzz-raw://eddd542888565cb84d4dac710511b0f02afbed2e0e1a7d25e0425e6d69b7712f\",\"dweb:/ipfs/Qma1KWoX8nZYK1d1PAfRiZH4prYqM347dMkWM6DjJzTqYY\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001a1738038062001a17833981810160405260a08110156200004757600080fd5b5080516020820151604083015160608401516080909401519293919290919084848484848163ffffffff8116620000b05760405162461bcd60e51b81526004018080602001828103825260278152602001806200198e6027913960400191505060405180910390fd5b60208163ffffffff1610620000f75760405162461bcd60e51b8152600401808060200182810382526022815260200180620019d56022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c6000805160206200194d8339815191529091018190558154808301835592829052600080516020620019f78339815191529092018290555b60005463ffffffff9081169082161015620001e5576200019b82806001600160e01b036200029d16565b6002805460018181019092556000805160206200194d83398151915201829055805480820182556000829052600080516020620019f7833981519152018290559092500162000171565b50620001fb81806001600160e01b036200029d16565b60046000015550506068805460ff19166001179055826200024e5760405162461bcd60e51b8152600401808060200182810382526025815260200180620019286025913960400191505060405180910390fd5b606c80546001600160a01b03199081166001600160a01b0397881617909155606d8054821695871695909517909455606e8054909416941693909317909155606955506200048a945050505050565b6000600080516020620019b5833981519152831062000303576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b600080516020620019b58339815191528210620003525760405162461bcd60e51b81526004018080602001828103825260218152602001806200196d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003ad57600080fd5b505af4158015620003c2573d6000803e3d6000fd5b505050506040513d6040811015620003d957600080fd5b5080516020909101519092509050600080516020620019b5833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200045357600080fd5b505af415801562000468573d6000803e3d6000fd5b505050506040513d60408110156200047f57600080fd5b505195945050505050565b61148e806200049a6000396000f3fe60806040526004361061014b5760003560e01c806397fc007c116100b6578063d0fb02031161006f578063d0fb020314610514578063e5285dcc14610529578063e829558814610553578063ec7329591461057d578063f178e47c14610592578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b50610271610eae565b34801561053557600080fd5b506101af6004803603602081101561054c57600080fd5b5035610ebd565b34801561055f57600080fd5b506102bd6004803603602081101561057657600080fd5b5035610ed2565b34801561058957600080fd5b506102bd610ef0565b34801561059e57600080fd5b506102bd600480360360208110156105b557600080fd5b5035610f14565b3480156105c857600080fd5b506102f9610f21565b606e546001600160a01b0316331461061a5760405162461bcd60e51b81526004018080602001828103825260258152602001806114006025913960400191505060405180910390fd5b606e80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206113778339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206113778339815191528210610a5d5760405162461bcd60e51b81526004018080602001828103825260218152602001806113226021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b5080516020909101519092509050600080516020611377833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b60008051602061137783398151915281565b60005463ffffffff1681565b606e546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606e546001600160a01b03163314610c9e5760405162461bcd60e51b81526004018080602001828103825260258152602001806114006025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610ebd565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806113976021913960400191505060405180910390fd5b6000610e02826110e1565b6000838152606b60205260409020805460ff191660011790559050610e25611278565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b606d546001600160a01b031681565b6000908152606a602052604090205460ff1690565b60028181548110610edf57fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610edf57fe5b600354600160201b900463ffffffff1681565b3415610f715760405162461bcd60e51b81526004018080602001828103825260358152602001806114256035913960400191505060405180910390fd5b8015610fae5760405162461bcd60e51b81526004018080602001828103825260348152602001806113436034913960400191505060405180910390fd5b6069546040516000916001600160a01b0387169190859003908381818185875af1925050503d8060008114610fff576040519150601f19603f3d011682016040523d82523d6000602084013e611004565b606091505b50509050806110445760405162461bcd60e51b81526004018080602001828103825260258152602001806113b86025913960400191505060405180910390fd5b82156110da576040516001600160a01b038516908490600081818185875af1925050503d8060008114611093576040519150601f19603f3d011682016040523d82523d6000602084013e611098565b606091505b505080915050806110da5760405162461bcd60e51b81526004018080602001828103825260238152602001806113dd6023913960400191505060405180910390fd5b5050505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561113e5760405162461bcd60e51b815260040180806020018281038252602f8152602001806112bb602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561121657600185166111d25783925060028163ffffffff16815481106111a057fe5b906000526020600020015491508360018263ffffffff16815481106111c157fe5b6000918252602090912001556111f6565b60018163ffffffff16815481106111e557fe5b906000526020600020015492508391505b61120083836109ad565b9350600263ffffffff861604945060010161116e565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff90811692909217908190558491600491166064811061125857fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b60695434146112b85760405162461bcd60e51b81526004018080602001828103825260388152602001806112ea6038913960400191505060405180910390fd5b56fe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e206265206164646564506c656173652073656e6420606d697844656e6f6d696e6174696f6e602045544820616c6f6e672077697468207472616e73616374696f6e5f72696768742073686f756c6420626520696e7369646520746865206669656c64526566756e642076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e636530644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465647061796d656e7420746f205f726563697069656e7420646964206e6f7420676f20746872757061796d656e7420746f205f72656c6179657220646964206e6f7420676f20746872754f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2e4d6573736167652076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e6365a265627a7a723158205f90414ffd8c30349c0e95a8d2d66f0ed24e7acc28edd437efcc1f8ff8dfeec864736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c806397fc007c116100b6578063d0fb02031161006f578063d0fb020314610514578063e5285dcc14610529578063e829558814610553578063ec7329591461057d578063f178e47c14610592578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b50610271610eae565b34801561053557600080fd5b506101af6004803603602081101561054c57600080fd5b5035610ebd565b34801561055f57600080fd5b506102bd6004803603602081101561057657600080fd5b5035610ed2565b34801561058957600080fd5b506102bd610ef0565b34801561059e57600080fd5b506102bd600480360360208110156105b557600080fd5b5035610f14565b3480156105c857600080fd5b506102f9610f21565b606e546001600160a01b0316331461061a5760405162461bcd60e51b81526004018080602001828103825260258152602001806114006025913960400191505060405180910390fd5b606e80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206113778339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206113778339815191528210610a5d5760405162461bcd60e51b81526004018080602001828103825260218152602001806113226021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b5080516020909101519092509050600080516020611377833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b60008051602061137783398151915281565b60005463ffffffff1681565b606e546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606e546001600160a01b03163314610c9e5760405162461bcd60e51b81526004018080602001828103825260258152602001806114006025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610ebd565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806113976021913960400191505060405180910390fd5b6000610e02826110e1565b6000838152606b60205260409020805460ff191660011790559050610e25611278565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b606d546001600160a01b031681565b6000908152606a602052604090205460ff1690565b60028181548110610edf57fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610edf57fe5b600354600160201b900463ffffffff1681565b3415610f715760405162461bcd60e51b81526004018080602001828103825260358152602001806114256035913960400191505060405180910390fd5b8015610fae5760405162461bcd60e51b81526004018080602001828103825260348152602001806113436034913960400191505060405180910390fd5b6069546040516000916001600160a01b0387169190859003908381818185875af1925050503d8060008114610fff576040519150601f19603f3d011682016040523d82523d6000602084013e611004565b606091505b50509050806110445760405162461bcd60e51b81526004018080602001828103825260258152602001806113b86025913960400191505060405180910390fd5b82156110da576040516001600160a01b038516908490600081818185875af1925050503d8060008114611093576040519150601f19603f3d011682016040523d82523d6000602084013e611098565b606091505b505080915050806110da5760405162461bcd60e51b81526004018080602001828103825260238152602001806113dd6023913960400191505060405180910390fd5b5050505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561113e5760405162461bcd60e51b815260040180806020018281038252602f8152602001806112bb602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561121657600185166111d25783925060028163ffffffff16815481106111a057fe5b906000526020600020015491508360018263ffffffff16815481106111c157fe5b6000918252602090912001556111f6565b60018163ffffffff16815481106111e557fe5b906000526020600020015492508391505b61120083836109ad565b9350600263ffffffff861604945060010161116e565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff90811692909217908190558491600491166064811061125857fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b60695434146112b85760405162461bcd60e51b81526004018080602001828103825260388152602001806112ea6038913960400191505060405180910390fd5b56fe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e206265206164646564506c656173652073656e6420606d697844656e6f6d696e6174696f6e602045544820616c6f6e672077697468207472616e73616374696f6e5f72696768742073686f756c6420626520696e7369646520746865206669656c64526566756e642076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e636530644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465647061796d656e7420746f205f726563697069656e7420646964206e6f7420676f20746872757061796d656e7420746f205f72656c6179657220646964206e6f7420676f20746872754f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2e4d6573736167652076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e6365a265627a7a723158205f90414ffd8c30349c0e95a8d2d66f0ed24e7acc28edd437efcc1f8ff8dfeec864736f6c63430005110032", + "sourceMap": "805:1015:1:-;;;1430:34:3;;;-1:-1:-1;;;;;;1468:27:3;;;840:239:1;5:2:-1;;;;30:1;27;20:12;5:2;840:239:1;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;840:239:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1646:15:3;;;1638:67;;;;-1:-1:-1;;;1638:67:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1733:2;1719:11;:16;;;1711:63;;;;-1:-1:-1;;;1711:63:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1780:6;:20;;-1:-1:-1;;1780:20:3;;;;;;;1854:5;27:10:-1;;-1:-1;23:18;;;45:23;;;1088:77:3;-1:-1:-1;;;;;;;;;;;1854:23:3;;;;;;27:10:-1;;23:18;;;45:23;;1883:32:3;;;;-1:-1:-1;;;;;;;;;;;1883:32:3;;;;;;1922:175;1945:6;;;;;;1941:10;;;;1922:175;;;1980:39;1994:11;;-1:-1:-1;;;;;1980:13:3;:39;:::i;:::-;2027:5;27:10:-1;;39:1;23:18;;;45:23;;;-1:-1;;;;;;;;;;;2027:23:3;;;;27:10:-1;;23:18;;;45:23;;-1:-1;2058:32:3;;;-1:-1:-1;;;;;;;;;;;2058:32:3;;;;1966:53;;-1:-1:-1;1953:3:3;1922:175;;;-1:-1:-1;2114:39:3;2128:11;;-1:-1:-1;;;;;2114:13:3;:39;:::i;:::-;2103:5;2109:1;2103:8;:50;-1:-1:-1;;1421:11:6;:18;;-1:-1:-1;;1421:18:6;1435:4;1421:18;;;1710:17:5;1702:67;;;;-1:-1:-1;;;1702:67:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1775:8;:20;;-1:-1:-1;;;;;;1775:20:5;;;-1:-1:-1;;;;;1775:20:5;;;;;;;1801:10;:24;;;;;;;;;;;;;;1831:8;:20;;;;;;;;;;;;;;1857:12;:28;-1:-1:-1;805:1015:1;;-1:-1:-1;;;;;805:1015:1;2230:445:3;2305:7;-1:-1:-1;;;;;;;;;;;2328:27:3;;2320:72;;;;;-1:-1:-1;;;2320:72:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2406:28:3;;2398:74;;;;-1:-1:-1;;;2398:74:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2538:23;;;-1:-1:-1;;;2538:23:3;;;;;;;;2478:9;2538:23;;;;;;;;2498:5;;2478:9;;2538:6;;:17;;:23;;;;;;;;;;:6;:23;;;5:2:-1;;;;30:1;27;20:12;5:2;2538:23:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2538:23:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2538:23:3;;;;;;;;;-1:-1:-1;2538:23:3;-1:-1:-1;;;;;;;;;;;;2589:6:3;2578:1;2571:38;2567:42;;2624:6;:17;2642:1;2645;2624:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2624:23:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2624:23:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2624:23:3;;2230:445;-1:-1:-1;;;;;2230:445:3:o;805:1015:1:-;;;;;;;", + "deployedSourceMap": "805:1015:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4843:102:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4843:102:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4843:102:5;-1:-1:-1;;;;;4843:102:5;;:::i;:::-;;477:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;477:47:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;477:47:5;;:::i;:::-;;;;;;;;;;;;;;;;;;2958:781;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2958:781:5;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;2958:781:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2958:781:5;;;;;;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;2958:781:5;;-1:-1:-1;2958:781:5;-1:-1:-1;2958:781:5;;;;;;;;-1:-1:-1;;;;;2958:781:5;;;;;;;;;;;;;;;;;;;;;;;;:::i;666:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;666:25:5;;;:::i;:::-;;;;-1:-1:-1;;;;;666:25:5;;;;;;;;;;;;;;2230:445:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2230:445:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2230:445:3;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;933:114;;8:9:-1;5:2;;;30:1;27;20:12;5:2;933:114:3;;;:::i;1209:20::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1209:20:3;;;:::i;:::-;;;;;;;;;;;;;;;;;;;884:23:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;884:23:5;;;:::i;3553:342:3:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3553:342:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3553:342:3;;:::i;619:43:5:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;619:43:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;619:43:5;;:::i;446:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;446:27:5;;;:::i;1430:34:3:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:3;;;:::i;4680:113:5:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4680:113:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4680:113:5;-1:-1:-1;;;;;4680:113:5;;:::i;4157:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4157:293:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4157:293:5;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4157:293:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4157:293:5;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;4157:293:5;;-1:-1:-1;4157:293:5;-1:-1:-1;4157:293:5;:::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;4157:293:5;;;;;;;;;;;;;;;;;2138:324;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2138:324:5;;:::i;3941:93:3:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3941:93:3;;;:::i;1549:39::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1549:39:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1549:39:3;;:::i;1499:46::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1499:46:3;;;:::i;695:29:5:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;695:29:5;;;:::i;3980:116::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3980:116:5;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3980:116:5;;:::i;1404:22:3:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1404:22:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1404:22:3;;:::i;1051:114::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1051:114:3;;;:::i;1369:31::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1369:31:3;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1369:31:3;;:::i;1468:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1468:27:3;;;:::i;4843:102:5:-;961:8;;-1:-1:-1;;;;;961:8:5;947:10;:22;939:72;;;;-1:-1:-1;;;939:72:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4917:8;:23;;-1:-1:-1;;;;;;4917:23:5;-1:-1:-1;;;;;4917:23:5;;;;;;;;;;4843:102::o;477:47::-;;;;;;;;;;;;;;;:::o;2958:781::-;1934:11:6;;;;1926:55;;;;;-1:-1:-1;;;1926:55:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:6;;;3175:12:5;;3167:20;;;3159:59;;;;;-1:-1:-1;;;3159:59:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;3233:31;;;;:15;:31;;;;;;;;3232:32;3224:76;;;;;-1:-1:-1;;;3224:76:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;3314:18;3326:5;3314:11;:18::i;:::-;3306:59;;;;;-1:-1:-1;;;3306:59:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;3412:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3483:19:5;;;3412:126;;;;3504:17;;;3412:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3412:126:5;;:8;;;;;:20;;3433:6;;;;3412:126;;;;;;;;;;;;;;;;:8;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;3412:126:5;;;;;;;;;;;;;;;;;;;;;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;;3412:126:5;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3412:126:5;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3412:126:5;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3412:126:5;3404:161;;;;;-1:-1:-1;;;3404:161:5;;;;;;;;;;;;-1:-1:-1;;;3404:161:5;;;;;;;;;;;;;;;3572:31;;;;:15;:31;;;;;:38;;-1:-1:-1;;3572:38:5;3606:4;3572:38;;;3616:53;3633:10;3645:8;3655:4;3661:7;3616:16;:53::i;:::-;3680:54;;;-1:-1:-1;;;;;3680:54:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:6;:18;;-1:-1:-1;;2230:18:6;2244:4;2230:18;;;-1:-1:-1;;;;;;2958:781:5:o;666:25::-;;;-1:-1:-1;;;;;666:25:5;;:::o;2230:445:3:-;2305:7;-1:-1:-1;;;;;;;;;;;2328:27:3;;2320:72;;;;;-1:-1:-1;;;2320:72:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2406:28:3;;2398:74;;;;-1:-1:-1;;;2398:74:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2538:23;;;-1:-1:-1;;;2538:23:3;;;;;;;;2478:9;2538:23;;;;;;;;2498:5;;2478:9;;2538:6;;:17;;:23;;;;;;;;;;:6;:23;;;5:2:-1;;;;30:1;27;20:12;5:2;2538:23:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2538:23:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2538:23:3;;;;;;;;;-1:-1:-1;2538:23:3;-1:-1:-1;;;;;;;;;;;;2589:6:3;2578:1;2571:38;2567:42;;2624:6;:17;2642:1;2645;2624:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2624:23:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2624:23:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2624:23:3;;2230:445;-1:-1:-1;;;;;2230:445:3:o;933:114::-;-1:-1:-1;;;;;;;;;;;933:114:3;:::o;1209:20::-;;;;;;:::o;884:23:5:-;;;-1:-1:-1;;;;;884:23:5;;:::o;3553:342:3:-;3609:4;3625:10;3621:43;;-1:-1:-1;3652:5:3;3645:12;;3621:43;3680:16;;;;3702:171;3726:5;3732:1;3726:8;;;;;;;;;;;3717:5;:17;3713:53;;;3753:4;3746:11;;;;;3713:53;3777:6;;;3773:52;;-1:-1:-1;1542:3:3;3773:52;3855:16;;-1:-1:-1;;3832:3:3;;;;3855:16;3850:21;;;3855:16;;3850:21;;3702:171;;3885:5;3878:12;;;3553:342;;;;:::o;619:43:5:-;;;;;;;;;;;;;;;:::o;446:27::-;;;;:::o;1430:34:3:-;;;;;;:::o;4680:113:5:-;961:8;;-1:-1:-1;;;;;961:8:5;947:10;:22;939:72;;;;-1:-1:-1;;;939:72:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4754:8;:34;;-1:-1:-1;;;;;;4754:34:5;-1:-1:-1;;;;;4754:34:5;;;;;;;;;;4680:113::o;4157:293::-;4273:35;;;;;;;;;;;;;;;;4238:19;;4284:16;4273:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4273:35:5;-1:-1:-1;4265:43:5;-1:-1:-1;4318:6:5;4314:132;4330:27;;;4314:132;;;4376:28;4384:16;;4401:1;4384:19;;;;;;;;;;;;;4376:7;:28::i;:::-;4372:68;;;4427:4;4416:5;4422:1;4416:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4372:68;4359:3;;4314:132;;;;4157:293;;;;:::o;2138:324::-;1934:11:6;;;;1926:55;;;;;-1:-1:-1;;;1926:55:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:6;;;2070:5;2221:24:5;;;:11;:24;;;;;;2056:19:6;2221:24:5;2220:25;2212:71;;;;-1:-1:-1;;;2212:71:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2290:20;2313;2321:11;2313:7;:20::i;:::-;2339:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2339:31:5;2366:4;2339:31;;;2290:43;-1:-1:-1;2376:17:5;:15;:17::i;:::-;2405:52;;;;;;;;2441:15;2405:52;;;;;;2413:11;;2405:52;;;;;;;;-1:-1:-1;;2230:11:6;:18;;-1:-1:-1;;2230:18:6;2244:4;2230:18;;;2138:324:5:o;3941:93:3:-;4012:16;;3984:7;;4006:5;;4012:16;;4006:23;;;;;;;;;3999:30;;3941:93;:::o;1549:39::-;;;;;;;;;;;;;-1:-1:-1;1549:39:3;:::o;1499:46::-;1542:3;1499:46;:::o;695:29:5:-;;;-1:-1:-1;;;;;695:29:5;;:::o;3980:116::-;4041:4;4060:31;;;:15;:31;;;;;;;;;3980:116::o;1404:22:3:-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1404:22:3;:::o;1051:114::-;1088:77;1051:114;:::o;1369:31::-;;;;;;;;;;1468:27;;;-1:-1:-1;;;1468:27:3;;;;;:::o;1228:590:1:-;1383:9;:14;1375:80;;;;-1:-1:-1;;;1375:80:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1469:12;;1461:77;;;;-1:-1:-1;;;1461:77:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1586:12;;1564:46;;1546:12;;-1:-1:-1;;;;;1564:15:1;;;1586:19;;;;;1546:12;1564:46;1546:12;1564:46;1586:19;1564:15;:46;;;;;;;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;;1545:65:1;;;1624:7;1616:57;;;;-1:-1:-1;;;1616:57:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1683:8;;1679:135;;1715:29;;-1:-1:-1;;;;;1715:13:1;;;1735:4;;1715:29;;;;1735:4;1715:13;:29;;;;;;;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;;1701:43:1;;;;;1760:7;1752:55;;;;-1:-1:-1;;;1752:55:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1228:590;;;;;:::o;2679:802:3:-;2770:9;;2728:12;2820:6;;2728:12;;2770:9;-1:-1:-1;;;2770:9:3;;;;;;2820:6;;2816:1;2809:17;2793:33;;;;2785:93;;;;-1:-1:-1;;;2785:93:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2884:9;:14;;;-1:-1:-1;;;2884:14:3;;;;;2897:1;2884:14;;;;;-1:-1:-1;;2884:14:3;;;;;;2931:5;-1:-1:-1;;;2980:355:3;3003:6;;;;;;2999:10;;;;2980:355;;;3028:16;;;3024:225;;3068:16;3061:23;;3102:5;3108:1;3102:8;;;;;;;;;;;;;;;;;;3094:16;;3141;3121:14;3136:1;3121:17;;;;;;;;;;;;;;;;;;;:36;3024:225;;;3189:14;3204:1;3189:17;;;;;;;;;;;;;;;;;;3182:24;;3224:16;3216:24;;3024:225;3276:26;3290:4;3296:5;3276:13;:26::i;:::-;3257:45;-1:-1:-1;3327:1:3;3311:17;;;;;-1:-1:-1;3011:3:3;;2980:355;;;-1:-1:-1;3361:16:3;;1542:3;;3360:42;3361:16;;;;:20;3360:42;3341:16;:61;;-1:-1:-1;;3341:61:3;3360:42;;;;3341:61;;;;;;;;;;;;3434:16;;3408:5;;3414:16;3408:23;;;;;;;;:42;-1:-1:-1;;3463:9:3;;-1:-1:-1;;;3463:9:3;;;;-1:-1:-1;;3463:13:3;;2679:802;-1:-1:-1;;;;2679:802:3:o;1083:141:1:-;1146:12;;1133:9;:25;1125:94;;;;-1:-1:-1;;;1125:94:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:141::o", + "source": "// https://tornado.cash\n/*\n* d888888P dP a88888b. dP\n* 88 88 d8' `88 88\n* 88 .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b. 88 .d8888b. .d8888b. 88d888b.\n* 88 88' `88 88' `88 88' `88 88' `88 88' `88 88' `88 88 88' `88 Y8ooooo. 88' `88\n* 88 88. .88 88 88 88 88. .88 88. .88 88. .88 dP Y8. .88 88. .88 88 88 88\n* dP `88888P' dP dP dP `88888P8 `88888P8 `88888P' 88 Y88888P' `88888P8 `88888P' dP dP\n* ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\n*/\n\npragma solidity 0.5.17;\n\nimport \"./Tornado.sol\";\n\ncontract ETHTornado is Tornado {\n constructor(\n IVerifier _verifier,\n IFeeManager _feeManager,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator\n ) Tornado(_verifier, _feeManager, _denomination, _merkleTreeHeight, _operator) public {\n }\n\n function _processDeposit() internal {\n require(msg.value == denomination, \"Please send `mixDenomination` ETH along with transaction\");\n }\n\n function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund) internal {\n // sanity checks\n require(msg.value == 0, \"Message value is supposed to be zero for ETH instance\");\n require(_refund == 0, \"Refund value is supposed to be zero for ETH instance\");\n\n (bool success, ) = _recipient.call.value(denomination - _fee)(\"\");\n require(success, \"payment to _recipient did not go thru\");\n if (_fee > 0) {\n (success, ) = _relayer.call.value(_fee)(\"\");\n require(success, \"payment to _relayer did not go thru\");\n }\n }\n}", + "sourcePath": "/home/home/dotfiles/tornado-core/contracts/ETHTornado.sol", + "ast": { + "absolutePath": "/home/home/dotfiles/tornado-core/contracts/ETHTornado.sol", + "exportedSymbols": { + "ETHTornado": [ + 385 + ] + }, + "id": 386, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 283, + "literals": [ + "solidity", + "0.5", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "755:23:1" + }, + { + "absolutePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "id": 284, + "nodeType": "ImportDirective", + "scope": 386, + "sourceUnit": 1364, + "src": "780:23:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 285, + "name": "Tornado", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1363, + "src": "828:7:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Tornado_$1363", + "typeString": "contract Tornado" + } + }, + "id": 286, + "nodeType": "InheritanceSpecifier", + "src": "828:7:1" + } + ], + "contractDependencies": [ + 838, + 1363, + 1393 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 385, + "linearizedBaseContracts": [ + 385, + 1363, + 1393, + 838 + ], + "name": "ETHTornado", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 306, + "nodeType": "Block", + "src": "1074:5:1", + "statements": [] + }, + "documentation": null, + "id": 307, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 299, + "name": "_verifier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 288, + "src": "998:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$1041", + "typeString": "contract IVerifier" + } + }, + { + "argumentTypes": null, + "id": 300, + "name": "_feeManager", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 290, + "src": "1009:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFeeManager_$1052", + "typeString": "contract IFeeManager" + } + }, + { + "argumentTypes": null, + "id": 301, + "name": "_denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 292, + "src": "1022:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 302, + "name": "_merkleTreeHeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "1037:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 303, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1056:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 304, + "modifierName": { + "argumentTypes": null, + "id": 298, + "name": "Tornado", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1363, + "src": "990:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Tornado_$1363_$", + "typeString": "type(contract Tornado)" + } + }, + "nodeType": "ModifierInvocation", + "src": "990:76:1" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "name": "_verifier", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "857:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$1041", + "typeString": "contract IVerifier" + }, + "typeName": { + "contractScope": null, + "id": 287, + "name": "IVerifier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1041, + "src": "857:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$1041", + "typeString": "contract IVerifier" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "name": "_feeManager", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "882:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFeeManager_$1052", + "typeString": "contract IFeeManager" + }, + "typeName": { + "contractScope": null, + "id": 289, + "name": "IFeeManager", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1052, + "src": "882:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFeeManager_$1052", + "typeString": "contract IFeeManager" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "name": "_denomination", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "911:21:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "911:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 294, + "name": "_merkleTreeHeight", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "938:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 293, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "938:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 296, + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "968:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "968:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "851:138:1" + }, + "returnParameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "1074:0:1" + }, + "scope": 385, + "src": "840:239:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 318, + "nodeType": "Block", + "src": "1119:105:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 311, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1408, + "src": "1133:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1133:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 313, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "1146:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1133:25:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "506c656173652073656e6420606d697844656e6f6d696e6174696f6e602045544820616c6f6e672077697468207472616e73616374696f6e", + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1160:58:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f304eb3b48ff9764f62a411a9ffb7aa0b97f5844028e285830061a3eb6b03a1", + "typeString": "literal_string \"Please send `mixDenomination` ETH along with transaction\"" + }, + "value": "Please send `mixDenomination` ETH along with transaction" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f304eb3b48ff9764f62a411a9ffb7aa0b97f5844028e285830061a3eb6b03a1", + "typeString": "literal_string \"Please send `mixDenomination` ETH along with transaction\"" + } + ], + "id": 310, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "src": "1125:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1125:94:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 317, + "nodeType": "ExpressionStatement", + "src": "1125:94:1" + } + ] + }, + "documentation": null, + "id": 319, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 308, + "nodeType": "ParameterList", + "parameters": [], + "src": "1107:2:1" + }, + "returnParameters": { + "id": 309, + "nodeType": "ParameterList", + "parameters": [], + "src": "1119:0:1" + }, + "scope": 385, + "src": "1083:141:1", + "stateMutability": "nonpayable", + "superFunction": 1183, + "visibility": "internal" + }, + { + "body": { + "id": 383, + "nodeType": "Block", + "src": "1348:470:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 331, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1408, + "src": "1383:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1383:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1396:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1383:14:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6573736167652076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e6365", + "id": 335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1399:55:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fb42cba8716e5ef1890027a84a51d30b8a9b3b6aff292fa4436fdfdb093e2b04", + "typeString": "literal_string \"Message value is supposed to be zero for ETH instance\"" + }, + "value": "Message value is supposed to be zero for ETH instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fb42cba8716e5ef1890027a84a51d30b8a9b3b6aff292fa4436fdfdb093e2b04", + "typeString": "literal_string \"Message value is supposed to be zero for ETH instance\"" + } + ], + "id": 330, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "src": "1375:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1375:80:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 337, + "nodeType": "ExpressionStatement", + "src": "1375:80:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 339, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 327, + "src": "1469:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1480:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1469:12:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "526566756e642076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e6365", + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1483:54:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_81ced7081bd66f683c55140bd49cd7b11c81bd1cdd704658426bd50e1bd8ff84", + "typeString": "literal_string \"Refund value is supposed to be zero for ETH instance\"" + }, + "value": "Refund value is supposed to be zero for ETH instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_81ced7081bd66f683c55140bd49cd7b11c81bd1cdd704658426bd50e1bd8ff84", + "typeString": "literal_string \"Refund value is supposed to be zero for ETH instance\"" + } + ], + "id": 338, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "src": "1461:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1461:77:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 344, + "nodeType": "ExpressionStatement", + "src": "1461:77:1" + }, + { + "assignments": [ + 346, + null + ], + "declarations": [ + { + "constant": false, + "id": 346, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 383, + "src": "1546:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 345, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1546:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 356, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1607:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 350, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "1586:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 351, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1601:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1586:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 347, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "src": "1564:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1564:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1564:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", + "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" + } + }, + "id": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1564:42:1", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1564:46:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1545:65:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 358, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "1624:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "7061796d656e7420746f205f726563697069656e7420646964206e6f7420676f2074687275", + "id": 359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1633:39:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b817ea600508ee7f5bd41bf8aaa06721dfdc08b3c90f6e232639455b89be34a9", + "typeString": "literal_string \"payment to _recipient did not go thru\"" + }, + "value": "payment to _recipient did not go thru" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b817ea600508ee7f5bd41bf8aaa06721dfdc08b3c90f6e232639455b89be34a9", + "typeString": "literal_string \"payment to _recipient did not go thru\"" + } + ], + "id": 357, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "src": "1616:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1616:57:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 361, + "nodeType": "ExpressionStatement", + "src": "1616:57:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 362, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1683:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1690:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1683:8:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 382, + "nodeType": "IfStatement", + "src": "1679:135:1", + "trueBody": { + "id": 381, + "nodeType": "Block", + "src": "1693:121:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 365, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "1702:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + null + ], + "id": 366, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "1701:11:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$__$", + "typeString": "tuple(bool,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1741:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "arguments": [ + { + "argumentTypes": null, + "id": 370, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1735:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 367, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "1715:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1715:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1715:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", + "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" + } + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1715:25:1", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1715:29:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "src": "1701:43:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 375, + "nodeType": "ExpressionStatement", + "src": "1701:43:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 377, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 346, + "src": "1760:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "7061796d656e7420746f205f72656c6179657220646964206e6f7420676f2074687275", + "id": 378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1769:37:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d23a9425cb4f79b7ef092634b094eea804c04088be6543a697545fa4aa8c0ef0", + "typeString": "literal_string \"payment to _relayer did not go thru\"" + }, + "value": "payment to _relayer did not go thru" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d23a9425cb4f79b7ef092634b094eea804c04088be6543a697545fa4aa8c0ef0", + "typeString": "literal_string \"payment to _relayer did not go thru\"" + } + ], + "id": 376, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "src": "1752:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1752:55:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 380, + "nodeType": "ExpressionStatement", + "src": "1752:55:1" + } + ] + } + } + ] + }, + "documentation": null, + "id": 384, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processWithdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 321, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "1254:26:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 320, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1254:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 323, + "name": "_relayer", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "1282:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 322, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1282:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 325, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "1308:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1308:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 327, + "name": "_refund", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "1322:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 326, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1322:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1253:85:1" + }, + "returnParameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [], + "src": "1348:0:1" + }, + "scope": 385, + "src": "1228:590:1", + "stateMutability": "nonpayable", + "superFunction": 1279, + "visibility": "internal" + } + ], + "scope": 386, + "src": "805:1015:1" + } + ], + "src": "755:1065:1" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/home/home/dotfiles/tornado-core/contracts/ETHTornado.sol", + "exportedSymbols": { + "ETHTornado": [ + 385 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".17" + ] + }, + "id": 283, + "name": "PragmaDirective", + "src": "755:23:1" + }, + { + "attributes": { + "SourceUnit": 1364, + "absolutePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "scope": 386, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 284, + "name": "ImportDirective", + "src": "780:23:1" + }, + { + "attributes": { + "contractDependencies": [ + 838, + 1363, + 1393 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 385, + 1363, + 1393, + 838 + ], + "name": "ETHTornado", + "scope": 386 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Tornado", + "referencedDeclaration": 1363, + "type": "contract Tornado" + }, + "id": 285, + "name": "UserDefinedTypeName", + "src": "828:7:1" + } + ], + "id": 286, + "name": "InheritanceSpecifier", + "src": "828:7:1" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "name": "", + "scope": 385, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_verifier", + "scope": 307, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IVerifier", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IVerifier", + "referencedDeclaration": 1041, + "type": "contract IVerifier" + }, + "id": 287, + "name": "UserDefinedTypeName", + "src": "857:9:1" + } + ], + "id": 288, + "name": "VariableDeclaration", + "src": "857:19:1" + }, + { + "attributes": { + "constant": false, + "name": "_feeManager", + "scope": 307, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IFeeManager", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IFeeManager", + "referencedDeclaration": 1052, + "type": "contract IFeeManager" + }, + "id": 289, + "name": "UserDefinedTypeName", + "src": "882:11:1" + } + ], + "id": 290, + "name": "VariableDeclaration", + "src": "882:23:1" + }, + { + "attributes": { + "constant": false, + "name": "_denomination", + "scope": 307, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 291, + "name": "ElementaryTypeName", + "src": "911:7:1" + } + ], + "id": 292, + "name": "VariableDeclaration", + "src": "911:21:1" + }, + { + "attributes": { + "constant": false, + "name": "_merkleTreeHeight", + "scope": 307, + "stateVariable": false, + "storageLocation": "default", + "type": "uint32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint32", + "type": "uint32" + }, + "id": 293, + "name": "ElementaryTypeName", + "src": "938:6:1" + } + ], + "id": 294, + "name": "VariableDeclaration", + "src": "938:24:1" + }, + { + "attributes": { + "constant": false, + "name": "_operator", + "scope": 307, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 295, + "name": "ElementaryTypeName", + "src": "968:7:1" + } + ], + "id": 296, + "name": "VariableDeclaration", + "src": "968:17:1" + } + ], + "id": 297, + "name": "ParameterList", + "src": "851:138:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 305, + "name": "ParameterList", + "src": "1074:0:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1363, + "type": "type(contract Tornado)", + "value": "Tornado" + }, + "id": 298, + "name": "Identifier", + "src": "990:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 288, + "type": "contract IVerifier", + "value": "_verifier" + }, + "id": 299, + "name": "Identifier", + "src": "998:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 290, + "type": "contract IFeeManager", + "value": "_feeManager" + }, + "id": 300, + "name": "Identifier", + "src": "1009:11:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 292, + "type": "uint256", + "value": "_denomination" + }, + "id": 301, + "name": "Identifier", + "src": "1022:13:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 294, + "type": "uint32", + "value": "_merkleTreeHeight" + }, + "id": 302, + "name": "Identifier", + "src": "1037:17:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 296, + "type": "address", + "value": "_operator" + }, + "id": 303, + "name": "Identifier", + "src": "1056:9:1" + } + ], + "id": 304, + "name": "ModifierInvocation", + "src": "990:76:1" + }, + { + "attributes": { + "statements": [ + null + ] + }, + "children": [], + "id": 306, + "name": "Block", + "src": "1074:5:1" + } + ], + "id": 307, + "name": "FunctionDefinition", + "src": "840:239:1" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processDeposit", + "scope": 385, + "stateMutability": "nonpayable", + "superFunction": 1183, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 308, + "name": "ParameterList", + "src": "1107:2:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 309, + "name": "ParameterList", + "src": "1119:0:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f304eb3b48ff9764f62a411a9ffb7aa0b97f5844028e285830061a3eb6b03a1", + "typeString": "literal_string \"Please send `mixDenomination` ETH along with transaction\"" + } + ], + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 310, + "name": "Identifier", + "src": "1125:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1408, + "type": "msg", + "value": "msg" + }, + "id": 311, + "name": "Identifier", + "src": "1133:3:1" + } + ], + "id": 312, + "name": "MemberAccess", + "src": "1133:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1058, + "type": "uint256", + "value": "denomination" + }, + "id": 313, + "name": "Identifier", + "src": "1146:12:1" + } + ], + "id": 314, + "name": "BinaryOperation", + "src": "1133:25:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "506c656173652073656e6420606d697844656e6f6d696e6174696f6e602045544820616c6f6e672077697468207472616e73616374696f6e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Please send `mixDenomination` ETH along with transaction\"", + "value": "Please send `mixDenomination` ETH along with transaction" + }, + "id": 315, + "name": "Literal", + "src": "1160:58:1" + } + ], + "id": 316, + "name": "FunctionCall", + "src": "1125:94:1" + } + ], + "id": 317, + "name": "ExpressionStatement", + "src": "1125:94:1" + } + ], + "id": 318, + "name": "Block", + "src": "1119:105:1" + } + ], + "id": 319, + "name": "FunctionDefinition", + "src": "1083:141:1" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processWithdraw", + "scope": 385, + "stateMutability": "nonpayable", + "superFunction": 1279, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_recipient", + "scope": 384, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 320, + "name": "ElementaryTypeName", + "src": "1254:15:1" + } + ], + "id": 321, + "name": "VariableDeclaration", + "src": "1254:26:1" + }, + { + "attributes": { + "constant": false, + "name": "_relayer", + "scope": 384, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 322, + "name": "ElementaryTypeName", + "src": "1282:15:1" + } + ], + "id": 323, + "name": "VariableDeclaration", + "src": "1282:24:1" + }, + { + "attributes": { + "constant": false, + "name": "_fee", + "scope": 384, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 324, + "name": "ElementaryTypeName", + "src": "1308:7:1" + } + ], + "id": 325, + "name": "VariableDeclaration", + "src": "1308:12:1" + }, + { + "attributes": { + "constant": false, + "name": "_refund", + "scope": 384, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 326, + "name": "ElementaryTypeName", + "src": "1322:7:1" + } + ], + "id": 327, + "name": "VariableDeclaration", + "src": "1322:15:1" + } + ], + "id": 328, + "name": "ParameterList", + "src": "1253:85:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 329, + "name": "ParameterList", + "src": "1348:0:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fb42cba8716e5ef1890027a84a51d30b8a9b3b6aff292fa4436fdfdb093e2b04", + "typeString": "literal_string \"Message value is supposed to be zero for ETH instance\"" + } + ], + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 330, + "name": "Identifier", + "src": "1375:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1408, + "type": "msg", + "value": "msg" + }, + "id": 331, + "name": "Identifier", + "src": "1383:3:1" + } + ], + "id": 332, + "name": "MemberAccess", + "src": "1383:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 333, + "name": "Literal", + "src": "1396:1:1" + } + ], + "id": 334, + "name": "BinaryOperation", + "src": "1383:14:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4d6573736167652076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Message value is supposed to be zero for ETH instance\"", + "value": "Message value is supposed to be zero for ETH instance" + }, + "id": 335, + "name": "Literal", + "src": "1399:55:1" + } + ], + "id": 336, + "name": "FunctionCall", + "src": "1375:80:1" + } + ], + "id": 337, + "name": "ExpressionStatement", + "src": "1375:80:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_81ced7081bd66f683c55140bd49cd7b11c81bd1cdd704658426bd50e1bd8ff84", + "typeString": "literal_string \"Refund value is supposed to be zero for ETH instance\"" + } + ], + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 338, + "name": "Identifier", + "src": "1461:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 327, + "type": "uint256", + "value": "_refund" + }, + "id": 339, + "name": "Identifier", + "src": "1469:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 340, + "name": "Literal", + "src": "1480:1:1" + } + ], + "id": 341, + "name": "BinaryOperation", + "src": "1469:12:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "526566756e642076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Refund value is supposed to be zero for ETH instance\"", + "value": "Refund value is supposed to be zero for ETH instance" + }, + "id": 342, + "name": "Literal", + "src": "1483:54:1" + } + ], + "id": 343, + "name": "FunctionCall", + "src": "1461:77:1" + } + ], + "id": 344, + "name": "ExpressionStatement", + "src": "1461:77:1" + }, + { + "attributes": { + "assignments": [ + 346, + null + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 383, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 345, + "name": "ElementaryTypeName", + "src": "1546:4:1" + } + ], + "id": 346, + "name": "VariableDeclaration", + "src": "1546:12:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple(bool,bytes memory)", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "function (bytes memory) payable returns (bool,bytes memory)", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "call", + "referencedDeclaration": null, + "type": "function (bytes memory) payable returns (bool,bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 321, + "type": "address payable", + "value": "_recipient" + }, + "id": 347, + "name": "Identifier", + "src": "1564:10:1" + } + ], + "id": 348, + "name": "MemberAccess", + "src": "1564:15:1" + } + ], + "id": 349, + "name": "MemberAccess", + "src": "1564:21:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "-", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1058, + "type": "uint256", + "value": "denomination" + }, + "id": 350, + "name": "Identifier", + "src": "1586:12:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 325, + "type": "uint256", + "value": "_fee" + }, + "id": 351, + "name": "Identifier", + "src": "1601:4:1" + } + ], + "id": 352, + "name": "BinaryOperation", + "src": "1586:19:1" + } + ], + "id": 353, + "name": "FunctionCall", + "src": "1564:42:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"\"", + "value": "" + }, + "id": 354, + "name": "Literal", + "src": "1607:2:1" + } + ], + "id": 355, + "name": "FunctionCall", + "src": "1564:46:1" + } + ], + "id": 356, + "name": "VariableDeclarationStatement", + "src": "1545:65:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b817ea600508ee7f5bd41bf8aaa06721dfdc08b3c90f6e232639455b89be34a9", + "typeString": "literal_string \"payment to _recipient did not go thru\"" + } + ], + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 357, + "name": "Identifier", + "src": "1616:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 346, + "type": "bool", + "value": "success" + }, + "id": 358, + "name": "Identifier", + "src": "1624:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "7061796d656e7420746f205f726563697069656e7420646964206e6f7420676f2074687275", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"payment to _recipient did not go thru\"", + "value": "payment to _recipient did not go thru" + }, + "id": 359, + "name": "Literal", + "src": "1633:39:1" + } + ], + "id": 360, + "name": "FunctionCall", + "src": "1616:57:1" + } + ], + "id": 361, + "name": "ExpressionStatement", + "src": "1616:57:1" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 325, + "type": "uint256", + "value": "_fee" + }, + "id": 362, + "name": "Identifier", + "src": "1683:4:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 363, + "name": "Literal", + "src": "1690:1:1" + } + ], + "id": 364, + "name": "BinaryOperation", + "src": "1683:8:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "tuple()" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "tuple(bool,)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 346, + "type": "bool", + "value": "success" + }, + "id": 365, + "name": "Identifier", + "src": "1702:7:1" + } + ], + "id": 366, + "name": "TupleExpression", + "src": "1701:11:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple(bool,bytes memory)", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "function (bytes memory) payable returns (bool,bytes memory)", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "call", + "referencedDeclaration": null, + "type": "function (bytes memory) payable returns (bool,bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 323, + "type": "address payable", + "value": "_relayer" + }, + "id": 367, + "name": "Identifier", + "src": "1715:8:1" + } + ], + "id": 368, + "name": "MemberAccess", + "src": "1715:13:1" + } + ], + "id": 369, + "name": "MemberAccess", + "src": "1715:19:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 325, + "type": "uint256", + "value": "_fee" + }, + "id": 370, + "name": "Identifier", + "src": "1735:4:1" + } + ], + "id": 371, + "name": "FunctionCall", + "src": "1715:25:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"\"", + "value": "" + }, + "id": 372, + "name": "Literal", + "src": "1741:2:1" + } + ], + "id": 373, + "name": "FunctionCall", + "src": "1715:29:1" + } + ], + "id": 374, + "name": "Assignment", + "src": "1701:43:1" + } + ], + "id": 375, + "name": "ExpressionStatement", + "src": "1701:43:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d23a9425cb4f79b7ef092634b094eea804c04088be6543a697545fa4aa8c0ef0", + "typeString": "literal_string \"payment to _relayer did not go thru\"" + } + ], + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 376, + "name": "Identifier", + "src": "1752:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 346, + "type": "bool", + "value": "success" + }, + "id": 377, + "name": "Identifier", + "src": "1760:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "7061796d656e7420746f205f72656c6179657220646964206e6f7420676f2074687275", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"payment to _relayer did not go thru\"", + "value": "payment to _relayer did not go thru" + }, + "id": 378, + "name": "Literal", + "src": "1769:37:1" + } + ], + "id": 379, + "name": "FunctionCall", + "src": "1752:55:1" + } + ], + "id": 380, + "name": "ExpressionStatement", + "src": "1752:55:1" + } + ], + "id": 381, + "name": "Block", + "src": "1693:121:1" + } + ], + "id": 382, + "name": "IfStatement", + "src": "1679:135:1" + } + ], + "id": 383, + "name": "Block", + "src": "1348:470:1" + } + ], + "id": 384, + "name": "FunctionDefinition", + "src": "1228:590:1" + } + ], + "id": 385, + "name": "ContractDefinition", + "src": "805:1015:1" + } + ], + "id": 386, + "name": "SourceUnit", + "src": "755:1065:1" + }, + "compiler": { + "name": "solc", + "version": "0.5.17+commit.d19bba13.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-12T00:15:10.052Z", + "devdoc": { + "methods": { + "changeOperator(address)": { + "details": "operator can change his address " + }, + "deposit(bytes32)": { + "details": "Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.", + "params": { + "_commitment": "the note commitment, which is PedersenHash(nullifier + secret)" + } + }, + "getLastRoot()": { + "details": "Returns the last root" + }, + "hashLeftRight(bytes32,bytes32)": { + "details": "Hash 2 tree leaves, returns MiMC(_left, _right)" + }, + "isKnownRoot(bytes32)": { + "details": "Whether the root is present in the root history" + }, + "isSpent(bytes32)": { + "details": "whether a note is already spent " + }, + "isSpentArray(bytes32[])": { + "details": "whether an array of notes is already spent " + }, + "updateVerifier(address)": { + "details": "allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address" + }, + "withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)": { + "details": "Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)" + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/client/contracts/FeeManager.json b/client/contracts/FeeManager.json index e869504..c5293de 100644 --- a/client/contracts/FeeManager.json +++ b/client/contracts/FeeManager.json @@ -13,6 +13,21 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "constant": true, + "inputs": [], + "name": "MIN_PROTOCOL_FEE_DIVISOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -43,6 +58,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolFeeDivisor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -72,34 +102,49 @@ "payable": false, "stateMutability": "nonpayable", "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "_protocolFeeDivisor", + "type": "uint256" + } + ], + "name": "setProtocolFeeDivisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToSetter\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeToSetter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeTo\",\"type\":\"address\"}],\"name\":\"setFeeTo\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToSetter\",\"type\":\"address\"}],\"name\":\"setFeeToSetter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/FeeManager.sol\":\"FeeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/FeeManager.sol\":{\"keccak256\":\"0x4d54892e74f27c38f1e40bcdaf44a67aa65e2692b30246850b8c32491f1b3d02\",\"urls\":[\"bzz-raw://ca5bd8d25a99b03a29a764ce6f887dd1022b50b9308ef705be0d71ad79687f08\",\"dweb:/ipfs/QmSYMnxLnn4HGNy32YHDEs8rNkNwV6h4xsvDbKCv3vAMMt\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102673803806102678339818101604052602081101561003357600080fd5b5051600180546001600160a01b0319166001600160a01b03909216919091179055610204806100636000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063017e7e5814610051578063094b741514610075578063a2e74af61461007d578063f46901ed146100a5575b600080fd5b6100596100cb565b604080516001600160a01b039092168252519081900360200190f35b6100596100da565b6100a36004803603602081101561009357600080fd5b50356001600160a01b03166100e9565b005b6100a3600480360360208110156100bb57600080fd5b50356001600160a01b031661015c565b6000546001600160a01b031681565b6001546001600160a01b031681565b6001546001600160a01b0316331461013a576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146101ad576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b039290921691909117905556fea265627a7a723158206a757806aa409461ff72f1edf5093477492e6d063b792779acb98460ba01efdf64736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063017e7e5814610051578063094b741514610075578063a2e74af61461007d578063f46901ed146100a5575b600080fd5b6100596100cb565b604080516001600160a01b039092168252519081900360200190f35b6100596100da565b6100a36004803603602081101561009357600080fd5b50356001600160a01b03166100e9565b005b6100a3600480360360208110156100bb57600080fd5b50356001600160a01b031661015c565b6000546001600160a01b031681565b6001546001600160a01b031681565b6001546001600160a01b0316331461013a576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146101ad576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b039290921691909117905556fea265627a7a723158206a757806aa409461ff72f1edf5093477492e6d063b792779acb98460ba01efdf64736f6c63430005110032", - "sourceMap": "25:453:1:-;;;104:78;8:9:-1;5:2;;;30:1;27;20:12;5:2;104:78:1;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;104:78:1;151:11;:26;;-1:-1:-1;;;;;;151:26:1;-1:-1:-1;;;;;151:26:1;;;;;;;;;25:453;;;-1:-1:-1;25:453:1;;", - "deployedSourceMap": "25:453:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:453:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:20;;;:::i;:::-;;;;-1:-1:-1;;;;;49:20:1;;;;;;;;;;;;;;73:26;;;:::i;321:155::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;321:155:1;-1:-1:-1;;;;;321:155:1;;:::i;:::-;;186:131;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;186:131:1;-1:-1:-1;;;;;186:131:1;;:::i;49:20::-;;;-1:-1:-1;;;;;49:20:1;;:::o;73:26::-;;;-1:-1:-1;;;;;73:26:1;;:::o;321:155::-;406:11;;-1:-1:-1;;;;;406:11:1;392:10;:25;384:53;;;;;-1:-1:-1;;;384:53:1;;;;;;;;;;;;-1:-1:-1;;;384:53:1;;;;;;;;;;;;;;;445:11;:26;;-1:-1:-1;;;;;;445:26:1;-1:-1:-1;;;;;445:26:1;;;;;;;;;;321:155::o;186:131::-;259:11;;-1:-1:-1;;;;;259:11:1;245:10;:25;237:53;;;;;-1:-1:-1;;;237:53:1;;;;;;;;;;;;-1:-1:-1;;;237:53:1;;;;;;;;;;;;;;;298:5;:14;;-1:-1:-1;;;;;;298:14:1;-1:-1:-1;;;;;298:14:1;;;;;;;;;;186:131::o", - "source": "pragma solidity 0.5.17;\n\ncontract FeeManager {\n address public feeTo;\n address public feeToSetter;\n\n constructor(address _feeToSetter) public {\n feeToSetter = _feeToSetter;\n }\n\n function setFeeTo(address _feeTo) external {\n require(msg.sender == feeToSetter, 'Poof: FORBIDDEN');\n feeTo = _feeTo;\n }\n\n function setFeeToSetter(address _feeToSetter) external {\n require(msg.sender == feeToSetter, 'Poof: FORBIDDEN');\n feeToSetter = _feeToSetter;\n }\n}\n", + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToSetter\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_PROTOCOL_FEE_DIVISOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeToSetter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"protocolFeeDivisor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeTo\",\"type\":\"address\"}],\"name\":\"setFeeTo\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToSetter\",\"type\":\"address\"}],\"name\":\"setFeeToSetter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_protocolFeeDivisor\",\"type\":\"uint256\"}],\"name\":\"setProtocolFeeDivisor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/FeeManager.sol\":\"FeeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/FeeManager.sol\":{\"keccak256\":\"0x8e8e5c1f677a907492945e9fb2417518c26f65d0adee9a752cbed7d114494e85\",\"urls\":[\"bzz-raw://54d89eac6b895cf779adb46160cfd1eb921911544d82eec6d4ac7fb0bdf6cd91\",\"dweb:/ipfs/QmTw8beeSWhYCAWohhQgHSwyg4AFoJmVhmmCn2h6S3NFD7\"]}},\"version\":1}", + "bytecode": "0x608060405260c860005534801561001557600080fd5b5060405161039c38038061039c8339818101604052602081101561003857600080fd5b5051600280546001600160a01b039092166001600160a01b0319909216919091179055600060035561032d8061006f6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806370971aa71161005b57806370971aa7146100c8578063a2e74af6146100e7578063b72cd5121461010d578063f46901ed146101155761007d565b8063017e7e5814610082578063094b7415146100a65780633b46a6e7146100ae575b600080fd5b61008a61013b565b604080516001600160a01b039092168252519081900360200190f35b61008a61014a565b6100b6610159565b60408051918252519081900360200190f35b6100e5600480360360208110156100de57600080fd5b503561015f565b005b6100e5600480360360208110156100fd57600080fd5b50356001600160a01b031661020c565b6100b661027f565b6100e56004803603602081101561012b57600080fd5b50356001600160a01b0316610285565b6001546001600160a01b031681565b6002546001600160a01b031681565b60035481565b6002546001600160a01b031633146101b0576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600054811015610207576040805162461bcd60e51b815260206004820152601b60248201527f506f6f663a2050726f746f636f6c2066656520746f6f20686967680000000000604482015290519081900360640190fd5b600355565b6002546001600160a01b0316331461025d576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60005481565b6002546001600160a01b031633146102d6576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fea265627a7a72315820f540febae0ffa222749dcd2eb69b67411ddb6f3c1a3d8c13e0701743d180c3b064736f6c63430005110032", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806370971aa71161005b57806370971aa7146100c8578063a2e74af6146100e7578063b72cd5121461010d578063f46901ed146101155761007d565b8063017e7e5814610082578063094b7415146100a65780633b46a6e7146100ae575b600080fd5b61008a61013b565b604080516001600160a01b039092168252519081900360200190f35b61008a61014a565b6100b6610159565b60408051918252519081900360200190f35b6100e5600480360360208110156100de57600080fd5b503561015f565b005b6100e5600480360360208110156100fd57600080fd5b50356001600160a01b031661020c565b6100b661027f565b6100e56004803603602081101561012b57600080fd5b50356001600160a01b0316610285565b6001546001600160a01b031681565b6002546001600160a01b031681565b60035481565b6002546001600160a01b031633146101b0576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600054811015610207576040805162461bcd60e51b815260206004820152601b60248201527f506f6f663a2050726f746f636f6c2066656520746f6f20686967680000000000604482015290519081900360640190fd5b600355565b6002546001600160a01b0316331461025d576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60005481565b6002546001600160a01b031633146102d6576040805162461bcd60e51b815260206004820152600f60248201526e2837b7b31d102327a92124a22222a760891b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fea265627a7a72315820f540febae0ffa222749dcd2eb69b67411ddb6f3c1a3d8c13e0701743d180c3b064736f6c63430005110032", + "sourceMap": "25:875:2:-;;;116:3;74:45;;216:106;8:9:-1;5:2;;;30:1;27;20:12;5:2;216:106:2;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;216:106:2;263:11;:26;;-1:-1:-1;;;;;263:26:2;;;-1:-1:-1;;;;;;263:26:2;;;;;;;;;:11;295:18;:22;25:875;;;;;;", + "deployedSourceMap": "25:875:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:875:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;124:20;;;:::i;:::-;;;;-1:-1:-1;;;;;124:20:2;;;;;;;;;;;;;;148:26;;;:::i;178:33::-;;;:::i;:::-;;;;;;;;;;;;;;;;620:278;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;620:278:2;;:::i;:::-;;461:155;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;461:155:2;-1:-1:-1;;;;;461:155:2;;:::i;74:45::-;;;:::i;326:131::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;326:131:2;-1:-1:-1;;;;;326:131:2;;:::i;124:20::-;;;-1:-1:-1;;;;;124:20:2;;:::o;148:26::-;;;-1:-1:-1;;;;;148:26:2;;:::o;178:33::-;;;;:::o;620:278::-;719:11;;-1:-1:-1;;;;;719:11:2;705:10;:25;697:53;;;;;-1:-1:-1;;;697:53:2;;;;;;;;;;;;-1:-1:-1;;;697:53:2;;;;;;;;;;;;;;;789:24;;766:19;:47;;758:87;;;;;-1:-1:-1;;;758:87:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;853:18;:40;620:278::o;461:155::-;546:11;;-1:-1:-1;;;;;546:11:2;532:10;:25;524:53;;;;;-1:-1:-1;;;524:53:2;;;;;;;;;;;;-1:-1:-1;;;524:53:2;;;;;;;;;;;;;;;585:11;:26;;-1:-1:-1;;;;;;585:26:2;-1:-1:-1;;;;;585:26:2;;;;;;;;;;461:155::o;74:45::-;;;;:::o;326:131::-;399:11;;-1:-1:-1;;;;;399:11:2;385:10;:25;377:53;;;;;-1:-1:-1;;;377:53:2;;;;;;;;;;;;-1:-1:-1;;;377:53:2;;;;;;;;;;;;;;;438:5;:14;;-1:-1:-1;;;;;;438:14:2;-1:-1:-1;;;;;438:14:2;;;;;;;;;;326:131::o", + "source": "pragma solidity 0.5.17;\n\ncontract FeeManager {\n // Maximum fee of 0.5%\n uint256 public MIN_PROTOCOL_FEE_DIVISOR = 200;\n\n address public feeTo;\n address public feeToSetter;\n uint256 public protocolFeeDivisor;\n\n constructor(address _feeToSetter) public {\n feeToSetter = _feeToSetter;\n protocolFeeDivisor = 0;\n }\n\n function setFeeTo(address _feeTo) external {\n require(msg.sender == feeToSetter, 'Poof: FORBIDDEN');\n feeTo = _feeTo;\n }\n\n function setFeeToSetter(address _feeToSetter) external {\n require(msg.sender == feeToSetter, 'Poof: FORBIDDEN');\n feeToSetter = _feeToSetter;\n }\n\n function setProtocolFeeDivisor(uint256 _protocolFeeDivisor) external {\n require(msg.sender == feeToSetter, 'Poof: FORBIDDEN');\n require(_protocolFeeDivisor >= MIN_PROTOCOL_FEE_DIVISOR, 'Poof: Protocol fee too high');\n protocolFeeDivisor = _protocolFeeDivisor;\n }\n}\n", "sourcePath": "/home/home/dotfiles/tornado-core/contracts/FeeManager.sol", "ast": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/FeeManager.sol", "exportedSymbols": { "FeeManager": [ - 319 + 472 ] }, - "id": 320, + "id": 473, "nodeType": "SourceUnit", "nodes": [ { - "id": 268, + "id": 387, "literals": [ "solidity", "0.5", ".17" ], "nodeType": "PragmaDirective", - "src": "0:23:1" + "src": "0:23:2" }, { "baseContracts": [], @@ -107,20 +152,63 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 319, + "id": 472, "linearizedBaseContracts": [ - 319 + 472 ], "name": "FeeManager", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 270, + "id": 390, + "name": "MIN_PROTOCOL_FEE_DIVISOR", + "nodeType": "VariableDeclaration", + "scope": 472, + "src": "74:45:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 388, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "74:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "323030", + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "116:3:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_200_by_1", + "typeString": "int_const 200" + }, + "value": "200" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 392, "name": "feeTo", "nodeType": "VariableDeclaration", - "scope": 319, - "src": "49:20:1", + "scope": 472, + "src": "124:20:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -128,10 +216,10 @@ "typeString": "address" }, "typeName": { - "id": 269, + "id": 391, "name": "address", "nodeType": "ElementaryTypeName", - "src": "49:7:1", + "src": "124:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -143,11 +231,11 @@ }, { "constant": false, - "id": 272, + "id": 394, "name": "feeToSetter", "nodeType": "VariableDeclaration", - "scope": 319, - "src": "73:26:1", + "scope": 472, + "src": "148:26:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -155,10 +243,10 @@ "typeString": "address" }, "typeName": { - "id": 271, + "id": 393, "name": "address", "nodeType": "ElementaryTypeName", - "src": "73:7:1", + "src": "148:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -168,28 +256,54 @@ "value": null, "visibility": "public" }, + { + "constant": false, + "id": 396, + "name": "protocolFeeDivisor", + "nodeType": "VariableDeclaration", + "scope": 472, + "src": "178:33:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 395, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "178:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, { "body": { - "id": 281, + "id": 409, "nodeType": "Block", - "src": "145:37:1", + "src": "257:65:2", "statements": [ { "expression": { "argumentTypes": null, - "id": 279, + "id": 403, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 277, + "id": 401, "name": "feeToSetter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 272, - "src": "151:11:1", + "referencedDeclaration": 394, + "src": "263:11:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -199,47 +313,98 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 278, + "id": 402, "name": "_feeToSetter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 274, - "src": "165:12:1", + "referencedDeclaration": 398, + "src": "277:12:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "151:26:1", + "src": "263:26:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 280, + "id": 404, "nodeType": "ExpressionStatement", - "src": "151:26:1" + "src": "263:26:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 405, + "name": "protocolFeeDivisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 396, + "src": "295:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "316:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "295:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 408, + "nodeType": "ExpressionStatement", + "src": "295:22:2" } ] }, "documentation": null, - "id": 282, + "id": 410, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 275, + "id": 399, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 274, + "id": 398, "name": "_feeToSetter", "nodeType": "VariableDeclaration", - "scope": 282, - "src": "116:20:1", + "scope": 410, + "src": "228:20:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -247,10 +412,10 @@ "typeString": "address" }, "typeName": { - "id": 273, + "id": 397, "name": "address", "nodeType": "ElementaryTypeName", - "src": "116:7:1", + "src": "228:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -261,25 +426,25 @@ "visibility": "internal" } ], - "src": "115:22:1" + "src": "227:22:2" }, "returnParameters": { - "id": 276, + "id": 400, "nodeType": "ParameterList", "parameters": [], - "src": "145:0:1" + "src": "257:0:2" }, - "scope": 319, - "src": "104:78:1", + "scope": 472, + "src": "216:106:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 299, + "id": 427, "nodeType": "Block", - "src": "229:88:1", + "src": "369:88:2", "statements": [ { "expression": { @@ -291,7 +456,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 291, + "id": 419, "isConstant": false, "isLValue": false, "isPure": false, @@ -300,18 +465,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 288, + "id": 416, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "245:3:1", + "referencedDeclaration": 1408, + "src": "385:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 289, + "id": 417, "isConstant": false, "isLValue": false, "isPure": false, @@ -319,7 +484,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "245:10:1", + "src": "385:10:2", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -329,18 +494,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 290, + "id": 418, "name": "feeToSetter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 272, - "src": "259:11:1", + "referencedDeclaration": 394, + "src": "399:11:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "245:25:1", + "src": "385:25:2", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -349,14 +514,14 @@ { "argumentTypes": null, "hexValue": "506f6f663a20464f5242494444454e", - "id": 292, + "id": 420, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "272:17:1", + "src": "412:17:2", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b0ea5653e0e519b050ef336c67727a3a431509a369a785f89e8479e85ce40165", @@ -376,21 +541,21 @@ "typeString": "literal_string \"Poof: FORBIDDEN\"" } ], - "id": 287, + "id": 415, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "237:7:1", + "referencedDeclaration": 1412, + "src": "377:7:2", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 293, + "id": 421, "isConstant": false, "isLValue": false, "isPure": false, @@ -398,32 +563,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "237:53:1", + "src": "377:53:2", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 294, + "id": 422, "nodeType": "ExpressionStatement", - "src": "237:53:1" + "src": "377:53:2" }, { "expression": { "argumentTypes": null, - "id": 297, + "id": 425, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 295, + "id": 423, "name": "feeTo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "298:5:1", + "referencedDeclaration": 392, + "src": "438:5:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -433,47 +598,47 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 296, + "id": 424, "name": "_feeTo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 284, - "src": "306:6:1", + "referencedDeclaration": 412, + "src": "446:6:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "298:14:1", + "src": "438:14:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 298, + "id": 426, "nodeType": "ExpressionStatement", - "src": "298:14:1" + "src": "438:14:2" } ] }, "documentation": null, - "id": 300, + "id": 428, "implemented": true, "kind": "function", "modifiers": [], "name": "setFeeTo", "nodeType": "FunctionDefinition", "parameters": { - "id": 285, + "id": 413, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 284, + "id": 412, "name": "_feeTo", "nodeType": "VariableDeclaration", - "scope": 300, - "src": "204:14:1", + "scope": 428, + "src": "344:14:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -481,10 +646,10 @@ "typeString": "address" }, "typeName": { - "id": 283, + "id": 411, "name": "address", "nodeType": "ElementaryTypeName", - "src": "204:7:1", + "src": "344:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -495,25 +660,25 @@ "visibility": "internal" } ], - "src": "203:16:1" + "src": "343:16:2" }, "returnParameters": { - "id": 286, + "id": 414, "nodeType": "ParameterList", "parameters": [], - "src": "229:0:1" + "src": "369:0:2" }, - "scope": 319, - "src": "186:131:1", + "scope": 472, + "src": "326:131:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 317, + "id": 445, "nodeType": "Block", - "src": "376:100:1", + "src": "516:100:2", "statements": [ { "expression": { @@ -525,7 +690,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 309, + "id": 437, "isConstant": false, "isLValue": false, "isPure": false, @@ -534,18 +699,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 306, + "id": 434, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "392:3:1", + "referencedDeclaration": 1408, + "src": "532:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 307, + "id": 435, "isConstant": false, "isLValue": false, "isPure": false, @@ -553,7 +718,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "392:10:1", + "src": "532:10:2", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -563,18 +728,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 308, + "id": 436, "name": "feeToSetter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 272, - "src": "406:11:1", + "referencedDeclaration": 394, + "src": "546:11:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "392:25:1", + "src": "532:25:2", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -583,14 +748,14 @@ { "argumentTypes": null, "hexValue": "506f6f663a20464f5242494444454e", - "id": 310, + "id": 438, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "419:17:1", + "src": "559:17:2", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b0ea5653e0e519b050ef336c67727a3a431509a369a785f89e8479e85ce40165", @@ -610,21 +775,21 @@ "typeString": "literal_string \"Poof: FORBIDDEN\"" } ], - "id": 305, + "id": 433, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "384:7:1", + "referencedDeclaration": 1412, + "src": "524:7:2", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 311, + "id": 439, "isConstant": false, "isLValue": false, "isPure": false, @@ -632,32 +797,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "384:53:1", + "src": "524:53:2", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 312, + "id": 440, "nodeType": "ExpressionStatement", - "src": "384:53:1" + "src": "524:53:2" }, { "expression": { "argumentTypes": null, - "id": 315, + "id": 443, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 313, + "id": 441, "name": "feeToSetter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 272, - "src": "445:11:1", + "referencedDeclaration": 394, + "src": "585:11:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -667,47 +832,47 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 314, + "id": 442, "name": "_feeToSetter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 302, - "src": "459:12:1", + "referencedDeclaration": 430, + "src": "599:12:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "445:26:1", + "src": "585:26:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 316, + "id": 444, "nodeType": "ExpressionStatement", - "src": "445:26:1" + "src": "585:26:2" } ] }, "documentation": null, - "id": 318, + "id": 446, "implemented": true, "kind": "function", "modifiers": [], "name": "setFeeToSetter", "nodeType": "FunctionDefinition", "parameters": { - "id": 303, + "id": 431, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 302, + "id": 430, "name": "_feeToSetter", "nodeType": "VariableDeclaration", - "scope": 318, - "src": "345:20:1", + "scope": 446, + "src": "485:20:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -715,10 +880,10 @@ "typeString": "address" }, "typeName": { - "id": 301, + "id": 429, "name": "address", "nodeType": "ElementaryTypeName", - "src": "345:7:1", + "src": "485:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -729,33 +894,377 @@ "visibility": "internal" } ], - "src": "344:22:1" + "src": "484:22:2" }, "returnParameters": { - "id": 304, + "id": 432, "nodeType": "ParameterList", "parameters": [], - "src": "376:0:1" + "src": "516:0:2" }, - "scope": 319, - "src": "321:155:1", + "scope": 472, + "src": "461:155:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 470, + "nodeType": "Block", + "src": "689:209:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 452, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1408, + "src": "705:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "705:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 454, + "name": "feeToSetter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 394, + "src": "719:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "705:25:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "506f6f663a20464f5242494444454e", + "id": 456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "732:17:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b0ea5653e0e519b050ef336c67727a3a431509a369a785f89e8479e85ce40165", + "typeString": "literal_string \"Poof: FORBIDDEN\"" + }, + "value": "Poof: FORBIDDEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b0ea5653e0e519b050ef336c67727a3a431509a369a785f89e8479e85ce40165", + "typeString": "literal_string \"Poof: FORBIDDEN\"" + } + ], + "id": 451, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "src": "697:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "697:53:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 458, + "nodeType": "ExpressionStatement", + "src": "697:53:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 460, + "name": "_protocolFeeDivisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 448, + "src": "766:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 461, + "name": "MIN_PROTOCOL_FEE_DIVISOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "789:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "766:47:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "506f6f663a2050726f746f636f6c2066656520746f6f2068696768", + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "815:29:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5c096880b05c9468650c913ec6feafc9810ea461905d92390e74b130ffc27862", + "typeString": "literal_string \"Poof: Protocol fee too high\"" + }, + "value": "Poof: Protocol fee too high" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5c096880b05c9468650c913ec6feafc9810ea461905d92390e74b130ffc27862", + "typeString": "literal_string \"Poof: Protocol fee too high\"" + } + ], + "id": 459, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "src": "758:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "758:87:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 465, + "nodeType": "ExpressionStatement", + "src": "758:87:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 466, + "name": "protocolFeeDivisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 396, + "src": "853:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 467, + "name": "_protocolFeeDivisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 448, + "src": "874:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "853:40:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 469, + "nodeType": "ExpressionStatement", + "src": "853:40:2" + } + ] + }, + "documentation": null, + "id": 471, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setProtocolFeeDivisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 448, + "name": "_protocolFeeDivisor", + "nodeType": "VariableDeclaration", + "scope": 471, + "src": "651:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 447, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "651:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "650:29:2" + }, + "returnParameters": { + "id": 450, + "nodeType": "ParameterList", + "parameters": [], + "src": "689:0:2" + }, + "scope": 472, + "src": "620:278:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], - "scope": 320, - "src": "25:453:1" + "scope": 473, + "src": "25:875:2" } ], - "src": "0:479:1" + "src": "0:901:2" }, "legacyAST": { "attributes": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/FeeManager.sol", "exportedSymbols": { "FeeManager": [ - 319 + 472 ] } }, @@ -768,9 +1277,9 @@ ".17" ] }, - "id": 268, + "id": 387, "name": "PragmaDirective", - "src": "0:23:1" + "src": "0:23:2" }, { "attributes": { @@ -784,17 +1293,59 @@ "documentation": null, "fullyImplemented": true, "linearizedBaseContracts": [ - 319 + 472 ], "name": "FeeManager", - "scope": 320 + "scope": 473 }, "children": [ + { + "attributes": { + "constant": false, + "name": "MIN_PROTOCOL_FEE_DIVISOR", + "scope": 472, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 388, + "name": "ElementaryTypeName", + "src": "74:7:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "323030", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 200", + "value": "200" + }, + "id": 389, + "name": "Literal", + "src": "116:3:2" + } + ], + "id": 390, + "name": "VariableDeclaration", + "src": "74:45:2" + }, { "attributes": { "constant": false, "name": "feeTo", - "scope": 319, + "scope": 472, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -808,20 +1359,20 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 269, + "id": 391, "name": "ElementaryTypeName", - "src": "49:7:1" + "src": "124:7:2" } ], - "id": 270, + "id": 392, "name": "VariableDeclaration", - "src": "49:20:1" + "src": "124:20:2" }, { "attributes": { "constant": false, "name": "feeToSetter", - "scope": 319, + "scope": 472, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -835,14 +1386,40 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 271, + "id": 393, "name": "ElementaryTypeName", - "src": "73:7:1" + "src": "148:7:2" } ], - "id": 272, + "id": 394, "name": "VariableDeclaration", - "src": "73:26:1" + "src": "148:26:2" + }, + { + "attributes": { + "constant": false, + "name": "protocolFeeDivisor", + "scope": 472, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 395, + "name": "ElementaryTypeName", + "src": "178:7:2" + } + ], + "id": 396, + "name": "VariableDeclaration", + "src": "178:33:2" }, { "attributes": { @@ -854,7 +1431,7 @@ null ], "name": "", - "scope": 319, + "scope": 472, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -866,7 +1443,7 @@ "attributes": { "constant": false, "name": "_feeToSetter", - "scope": 282, + "scope": 410, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -880,19 +1457,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 273, + "id": 397, "name": "ElementaryTypeName", - "src": "116:7:1" + "src": "228:7:2" } ], - "id": 274, + "id": 398, "name": "VariableDeclaration", - "src": "116:20:1" + "src": "228:20:2" } ], - "id": 275, + "id": 399, "name": "ParameterList", - "src": "115:22:1" + "src": "227:22:2" }, { "attributes": { @@ -901,9 +1478,9 @@ ] }, "children": [], - "id": 276, + "id": 400, "name": "ParameterList", - "src": "145:0:1" + "src": "257:0:2" }, { "children": [ @@ -926,13 +1503,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 272, + "referencedDeclaration": 394, "type": "address", "value": "feeToSetter" }, - "id": 277, + "id": 401, "name": "Identifier", - "src": "151:11:1" + "src": "263:11:2" }, { "attributes": { @@ -940,33 +1517,87 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 274, + "referencedDeclaration": 398, "type": "address", "value": "_feeToSetter" }, - "id": 278, + "id": 402, "name": "Identifier", - "src": "165:12:1" + "src": "277:12:2" } ], - "id": 279, + "id": 403, "name": "Assignment", - "src": "151:26:1" + "src": "263:26:2" } ], - "id": 280, + "id": 404, "name": "ExpressionStatement", - "src": "151:26:1" + "src": "263:26:2" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 396, + "type": "uint256", + "value": "protocolFeeDivisor" + }, + "id": 405, + "name": "Identifier", + "src": "295:18:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 406, + "name": "Literal", + "src": "316:1:2" + } + ], + "id": 407, + "name": "Assignment", + "src": "295:22:2" + } + ], + "id": 408, + "name": "ExpressionStatement", + "src": "295:22:2" } ], - "id": 281, + "id": 409, "name": "Block", - "src": "145:37:1" + "src": "257:65:2" } ], - "id": 282, + "id": 410, "name": "FunctionDefinition", - "src": "104:78:1" + "src": "216:106:2" }, { "attributes": { @@ -978,7 +1609,7 @@ null ], "name": "setFeeTo", - "scope": 319, + "scope": 472, "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" @@ -990,7 +1621,7 @@ "attributes": { "constant": false, "name": "_feeTo", - "scope": 300, + "scope": 428, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -1004,19 +1635,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 283, + "id": 411, "name": "ElementaryTypeName", - "src": "204:7:1" + "src": "344:7:2" } ], - "id": 284, + "id": 412, "name": "VariableDeclaration", - "src": "204:14:1" + "src": "344:14:2" } ], - "id": 285, + "id": 413, "name": "ParameterList", - "src": "203:16:1" + "src": "343:16:2" }, { "attributes": { @@ -1025,9 +1656,9 @@ ] }, "children": [], - "id": 286, + "id": 414, "name": "ParameterList", - "src": "229:0:1" + "src": "369:0:2" }, { "children": [ @@ -1061,16 +1692,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 287, + "id": 415, "name": "Identifier", - "src": "237:7:1" + "src": "377:7:2" }, { "attributes": { @@ -1105,18 +1736,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3270, + "referencedDeclaration": 1408, "type": "msg", "value": "msg" }, - "id": 288, + "id": 416, "name": "Identifier", - "src": "245:3:1" + "src": "385:3:2" } ], - "id": 289, + "id": 417, "name": "MemberAccess", - "src": "245:10:1" + "src": "385:10:2" }, { "attributes": { @@ -1124,18 +1755,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 272, + "referencedDeclaration": 394, "type": "address", "value": "feeToSetter" }, - "id": 290, + "id": 418, "name": "Identifier", - "src": "259:11:1" + "src": "399:11:2" } ], - "id": 291, + "id": 419, "name": "BinaryOperation", - "src": "245:25:1" + "src": "385:25:2" }, { "attributes": { @@ -1150,19 +1781,19 @@ "type": "literal_string \"Poof: FORBIDDEN\"", "value": "Poof: FORBIDDEN" }, - "id": 292, + "id": 420, "name": "Literal", - "src": "272:17:1" + "src": "412:17:2" } ], - "id": 293, + "id": 421, "name": "FunctionCall", - "src": "237:53:1" + "src": "377:53:2" } ], - "id": 294, + "id": 422, "name": "ExpressionStatement", - "src": "237:53:1" + "src": "377:53:2" }, { "children": [ @@ -1183,13 +1814,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 270, + "referencedDeclaration": 392, "type": "address", "value": "feeTo" }, - "id": 295, + "id": 423, "name": "Identifier", - "src": "298:5:1" + "src": "438:5:2" }, { "attributes": { @@ -1197,33 +1828,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 284, + "referencedDeclaration": 412, "type": "address", "value": "_feeTo" }, - "id": 296, + "id": 424, "name": "Identifier", - "src": "306:6:1" + "src": "446:6:2" } ], - "id": 297, + "id": 425, "name": "Assignment", - "src": "298:14:1" + "src": "438:14:2" } ], - "id": 298, + "id": 426, "name": "ExpressionStatement", - "src": "298:14:1" + "src": "438:14:2" } ], - "id": 299, + "id": 427, "name": "Block", - "src": "229:88:1" + "src": "369:88:2" } ], - "id": 300, + "id": 428, "name": "FunctionDefinition", - "src": "186:131:1" + "src": "326:131:2" }, { "attributes": { @@ -1235,7 +1866,7 @@ null ], "name": "setFeeToSetter", - "scope": 319, + "scope": 472, "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" @@ -1247,7 +1878,7 @@ "attributes": { "constant": false, "name": "_feeToSetter", - "scope": 318, + "scope": 446, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -1261,19 +1892,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 301, + "id": 429, "name": "ElementaryTypeName", - "src": "345:7:1" + "src": "485:7:2" } ], - "id": 302, + "id": 430, "name": "VariableDeclaration", - "src": "345:20:1" + "src": "485:20:2" } ], - "id": 303, + "id": 431, "name": "ParameterList", - "src": "344:22:1" + "src": "484:22:2" }, { "attributes": { @@ -1282,9 +1913,9 @@ ] }, "children": [], - "id": 304, + "id": 432, "name": "ParameterList", - "src": "376:0:1" + "src": "516:0:2" }, { "children": [ @@ -1318,16 +1949,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 305, + "id": 433, "name": "Identifier", - "src": "384:7:1" + "src": "524:7:2" }, { "attributes": { @@ -1362,18 +1993,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3270, + "referencedDeclaration": 1408, "type": "msg", "value": "msg" }, - "id": 306, + "id": 434, "name": "Identifier", - "src": "392:3:1" + "src": "532:3:2" } ], - "id": 307, + "id": 435, "name": "MemberAccess", - "src": "392:10:1" + "src": "532:10:2" }, { "attributes": { @@ -1381,18 +2012,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 272, + "referencedDeclaration": 394, "type": "address", "value": "feeToSetter" }, - "id": 308, + "id": 436, "name": "Identifier", - "src": "406:11:1" + "src": "546:11:2" } ], - "id": 309, + "id": 437, "name": "BinaryOperation", - "src": "392:25:1" + "src": "532:25:2" }, { "attributes": { @@ -1407,19 +2038,19 @@ "type": "literal_string \"Poof: FORBIDDEN\"", "value": "Poof: FORBIDDEN" }, - "id": 310, + "id": 438, "name": "Literal", - "src": "419:17:1" + "src": "559:17:2" } ], - "id": 311, + "id": 439, "name": "FunctionCall", - "src": "384:53:1" + "src": "524:53:2" } ], - "id": 312, + "id": 440, "name": "ExpressionStatement", - "src": "384:53:1" + "src": "524:53:2" }, { "children": [ @@ -1440,13 +2071,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 272, + "referencedDeclaration": 394, "type": "address", "value": "feeToSetter" }, - "id": 313, + "id": 441, "name": "Identifier", - "src": "445:11:1" + "src": "585:11:2" }, { "attributes": { @@ -1454,43 +2085,415 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 302, + "referencedDeclaration": 430, "type": "address", "value": "_feeToSetter" }, - "id": 314, + "id": 442, "name": "Identifier", - "src": "459:12:1" + "src": "599:12:2" } ], - "id": 315, + "id": 443, "name": "Assignment", - "src": "445:26:1" + "src": "585:26:2" } ], - "id": 316, + "id": 444, "name": "ExpressionStatement", - "src": "445:26:1" + "src": "585:26:2" } ], - "id": 317, + "id": 445, "name": "Block", - "src": "376:100:1" + "src": "516:100:2" } ], - "id": 318, + "id": 446, "name": "FunctionDefinition", - "src": "321:155:1" + "src": "461:155:2" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "setProtocolFeeDivisor", + "scope": 472, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_protocolFeeDivisor", + "scope": 471, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 447, + "name": "ElementaryTypeName", + "src": "651:7:2" + } + ], + "id": 448, + "name": "VariableDeclaration", + "src": "651:27:2" + } + ], + "id": 449, + "name": "ParameterList", + "src": "650:29:2" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 450, + "name": "ParameterList", + "src": "689:0:2" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b0ea5653e0e519b050ef336c67727a3a431509a369a785f89e8479e85ce40165", + "typeString": "literal_string \"Poof: FORBIDDEN\"" + } + ], + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 451, + "name": "Identifier", + "src": "697:7:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1408, + "type": "msg", + "value": "msg" + }, + "id": 452, + "name": "Identifier", + "src": "705:3:2" + } + ], + "id": 453, + "name": "MemberAccess", + "src": "705:10:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 394, + "type": "address", + "value": "feeToSetter" + }, + "id": 454, + "name": "Identifier", + "src": "719:11:2" + } + ], + "id": 455, + "name": "BinaryOperation", + "src": "705:25:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "506f6f663a20464f5242494444454e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Poof: FORBIDDEN\"", + "value": "Poof: FORBIDDEN" + }, + "id": 456, + "name": "Literal", + "src": "732:17:2" + } + ], + "id": 457, + "name": "FunctionCall", + "src": "697:53:2" + } + ], + "id": 458, + "name": "ExpressionStatement", + "src": "697:53:2" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5c096880b05c9468650c913ec6feafc9810ea461905d92390e74b130ffc27862", + "typeString": "literal_string \"Poof: Protocol fee too high\"" + } + ], + "overloadedDeclarations": [ + 1411, + 1412 + ], + "referencedDeclaration": 1412, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 459, + "name": "Identifier", + "src": "758:7:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 448, + "type": "uint256", + "value": "_protocolFeeDivisor" + }, + "id": 460, + "name": "Identifier", + "src": "766:19:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 390, + "type": "uint256", + "value": "MIN_PROTOCOL_FEE_DIVISOR" + }, + "id": 461, + "name": "Identifier", + "src": "789:24:2" + } + ], + "id": 462, + "name": "BinaryOperation", + "src": "766:47:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "506f6f663a2050726f746f636f6c2066656520746f6f2068696768", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Poof: Protocol fee too high\"", + "value": "Poof: Protocol fee too high" + }, + "id": 463, + "name": "Literal", + "src": "815:29:2" + } + ], + "id": 464, + "name": "FunctionCall", + "src": "758:87:2" + } + ], + "id": 465, + "name": "ExpressionStatement", + "src": "758:87:2" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 396, + "type": "uint256", + "value": "protocolFeeDivisor" + }, + "id": 466, + "name": "Identifier", + "src": "853:18:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 448, + "type": "uint256", + "value": "_protocolFeeDivisor" + }, + "id": 467, + "name": "Identifier", + "src": "874:19:2" + } + ], + "id": 468, + "name": "Assignment", + "src": "853:40:2" + } + ], + "id": 469, + "name": "ExpressionStatement", + "src": "853:40:2" + } + ], + "id": 470, + "name": "Block", + "src": "689:209:2" + } + ], + "id": 471, + "name": "FunctionDefinition", + "src": "620:278:2" } ], - "id": 319, + "id": 472, "name": "ContractDefinition", - "src": "25:453:1" + "src": "25:875:2" } ], - "id": 320, + "id": 473, "name": "SourceUnit", - "src": "0:479:1" + "src": "0:901:2" }, "compiler": { "name": "solc", @@ -1511,8 +2514,7 @@ } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-04-05T02:45:55.200Z", - "networkType": "ethereum", + "updatedAt": "2021-04-12T00:15:10.054Z", "devdoc": { "methods": {} }, diff --git a/client/contracts/Hasher.json b/client/contracts/Hasher.json index ec1752d..8d87570 100644 --- a/client/contracts/Hasher.json +++ b/client/contracts/Hasher.json @@ -51,6 +51,5 @@ } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-04-05T02:45:55.201Z", - "networkType": "ethereum" + "updatedAt": "2021-04-12T00:15:10.073Z" } \ No newline at end of file diff --git a/client/contracts/IFeeManager.json b/client/contracts/IFeeManager.json index 3eb773c..7457098 100644 --- a/client/contracts/IFeeManager.json +++ b/client/contracts/IFeeManager.json @@ -15,60 +15,75 @@ "payable": false, "stateMutability": "view", "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "protocolFeeDivisor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"feeTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":\"IFeeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0xe7db8acb3efcecf95c7364f447ed1764c571dbf5090fd4641fe4668a965332eb\",\"urls\":[\"bzz-raw://45e790c247c38ed8ae473e3165c1148ea10a753cf6e9f9c8742394019be2aef6\",\"dweb:/ipfs/QmaGfk1ndvqur2NvCY3TWoKuorfBVShXeykKei18GDY582\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"feeTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"protocolFeeDivisor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":\"IFeeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x7269c9361452a555e6f29e924e70d4478a8a5bd86c7b33ea3731470a52c235b5\",\"urls\":[\"bzz-raw://eddd542888565cb84d4dac710511b0f02afbed2e0e1a7d25e0425e6d69b7712f\",\"dweb:/ipfs/Qma1KWoX8nZYK1d1PAfRiZH4prYqM347dMkWM6DjJzTqYY\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", - "source": "pragma solidity 0.5.17;\n\nimport \"./MerkleTreeWithHistory.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\ncontract IVerifier {\n function verifyProof(bytes memory _proof, uint256[6] memory _input) public returns(bool);\n}\n\ncontract IFeeManager {\n function feeTo() external view returns (address);\n}\n\ncontract Tornado is MerkleTreeWithHistory, ReentrancyGuard {\n uint256 public denomination;\n mapping(bytes32 => bool) public nullifierHashes;\n // we store all commitments just to prevent accidental deposits with the same commitment\n mapping(bytes32 => bool) public commitments;\n IVerifier public verifier;\n IFeeManager public feeManager;\n\n // operator can update snark verification key\n // after the final trusted setup ceremony operator rights are supposed to be transferred to zero address\n address public operator;\n modifier onlyOperator {\n require(msg.sender == operator, \"Only operator can call this function.\");\n _;\n }\n\n event Deposit(bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp);\n event Withdrawal(address to, bytes32 nullifierHash, address indexed relayer, uint256 fee);\n\n /**\n @dev The constructor\n @param _verifier the address of SNARK verifier for this contract\n @param _denomination transfer amount for each deposit\n @param _merkleTreeHeight the height of deposits' Merkle Tree\n @param _operator operator address (see operator comment above)\n */\n constructor(\n IVerifier _verifier,\n IFeeManager _feeManager,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator\n ) MerkleTreeWithHistory(_merkleTreeHeight) public {\n require(_denomination > 0, \"denomination should be greater than 0\");\n verifier = _verifier;\n feeManager = _feeManager;\n operator = _operator;\n denomination = _denomination;\n }\n\n /**\n @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\n @param _commitment the note commitment, which is PedersenHash(nullifier + secret)\n */\n function deposit(bytes32 _commitment) external payable nonReentrant {\n require(!commitments[_commitment], \"The commitment has been submitted\");\n\n uint32 insertedIndex = _insert(_commitment);\n commitments[_commitment] = true;\n _processDeposit();\n\n emit Deposit(_commitment, insertedIndex, block.timestamp);\n }\n\n /** @dev this function is defined in a child contract */\n function _processDeposit() internal;\n\n /**\n @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs\n `input` array consists of:\n - merkle root of all deposits in the contract\n - hash of unique deposit nullifier to prevent double spends\n - the recipient of funds\n - optional fee that goes to the transaction sender (usually a relay)\n */\n function withdraw(bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund) external payable nonReentrant {\n require(_fee <= denomination, \"Fee exceeds transfer value\");\n require(!nullifierHashes[_nullifierHash], \"The note has been already spent\");\n require(isKnownRoot(_root), \"Cannot find your merkle root\"); // Make sure to use a recent one\n require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(_recipient), uint256(_relayer), _fee, _refund]), \"Invalid withdraw proof\");\n\n nullifierHashes[_nullifierHash] = true;\n _processWithdraw(_recipient, _relayer, _fee, _refund, feeManager.feeTo());\n emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee);\n }\n\n /** @dev this function is defined in a child contract */\n function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund, address _feeTo) internal;\n\n /** @dev whether a note is already spent */\n function isSpent(bytes32 _nullifierHash) public view returns(bool) {\n return nullifierHashes[_nullifierHash];\n }\n\n /** @dev whether an array of notes is already spent */\n function isSpentArray(bytes32[] calldata _nullifierHashes) external view returns(bool[] memory spent) {\n spent = new bool[](_nullifierHashes.length);\n for(uint i = 0; i < _nullifierHashes.length; i++) {\n if (isSpent(_nullifierHashes[i])) {\n spent[i] = true;\n }\n }\n }\n\n /**\n @dev allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held.\n After that operator rights are supposed to be transferred to zero address\n */\n function updateVerifier(address _newVerifier) external onlyOperator {\n verifier = IVerifier(_newVerifier);\n }\n\n /** @dev operator can change his address */\n function changeOperator(address _newOperator) external onlyOperator {\n operator = _newOperator;\n }\n}\n", + "source": "pragma solidity 0.5.17;\n\nimport \"./MerkleTreeWithHistory.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\ncontract IVerifier {\n function verifyProof(bytes memory _proof, uint256[6] memory _input) public returns(bool);\n}\n\ncontract IFeeManager {\n function feeTo() external view returns (address);\n function protocolFeeDivisor() external view returns (uint256);\n}\n\ncontract Tornado is MerkleTreeWithHistory, ReentrancyGuard {\n uint256 public denomination;\n mapping(bytes32 => bool) public nullifierHashes;\n // we store all commitments just to prevent accidental deposits with the same commitment\n mapping(bytes32 => bool) public commitments;\n IVerifier public verifier;\n IFeeManager public feeManager;\n\n // operator can update snark verification key\n // after the final trusted setup ceremony operator rights are supposed to be transferred to zero address\n address public operator;\n modifier onlyOperator {\n require(msg.sender == operator, \"Only operator can call this function.\");\n _;\n }\n\n event Deposit(bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp);\n event Withdrawal(address to, bytes32 nullifierHash, address indexed relayer, uint256 fee);\n\n /**\n @dev The constructor\n @param _verifier the address of SNARK verifier for this contract\n @param _denomination transfer amount for each deposit\n @param _merkleTreeHeight the height of deposits' Merkle Tree\n @param _operator operator address (see operator comment above)\n */\n constructor(\n IVerifier _verifier,\n IFeeManager _feeManager,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator\n ) MerkleTreeWithHistory(_merkleTreeHeight) public {\n require(_denomination > 0, \"denomination should be greater than 0\");\n verifier = _verifier;\n feeManager = _feeManager;\n operator = _operator;\n denomination = _denomination;\n }\n\n /**\n @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\n @param _commitment the note commitment, which is PedersenHash(nullifier + secret)\n */\n function deposit(bytes32 _commitment) external payable nonReentrant {\n require(!commitments[_commitment], \"The commitment has been submitted\");\n\n uint32 insertedIndex = _insert(_commitment);\n commitments[_commitment] = true;\n _processDeposit();\n\n emit Deposit(_commitment, insertedIndex, block.timestamp);\n }\n\n /** @dev this function is defined in a child contract */\n function _processDeposit() internal;\n\n /**\n @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs\n `input` array consists of:\n - merkle root of all deposits in the contract\n - hash of unique deposit nullifier to prevent double spends\n - the recipient of funds\n - optional fee that goes to the transaction sender (usually a relay)\n */\n function withdraw(bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund) external payable nonReentrant {\n require(_fee <= denomination, \"Fee exceeds transfer value\");\n require(!nullifierHashes[_nullifierHash], \"The note has been already spent\");\n require(isKnownRoot(_root), \"Cannot find your merkle root\"); // Make sure to use a recent one\n require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(_recipient), uint256(_relayer), _fee, _refund]), \"Invalid withdraw proof\");\n\n nullifierHashes[_nullifierHash] = true;\n _processWithdraw(_recipient, _relayer, _fee, _refund);\n emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee);\n }\n\n /** @dev this function is defined in a child contract */\n function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund) internal;\n\n /** @dev whether a note is already spent */\n function isSpent(bytes32 _nullifierHash) public view returns(bool) {\n return nullifierHashes[_nullifierHash];\n }\n\n /** @dev whether an array of notes is already spent */\n function isSpentArray(bytes32[] calldata _nullifierHashes) external view returns(bool[] memory spent) {\n spent = new bool[](_nullifierHashes.length);\n for(uint i = 0; i < _nullifierHashes.length; i++) {\n if (isSpent(_nullifierHashes[i])) {\n spent[i] = true;\n }\n }\n }\n\n /**\n @dev allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held.\n After that operator rights are supposed to be transferred to zero address\n */\n function updateVerifier(address _newVerifier) external onlyOperator {\n verifier = IVerifier(_newVerifier);\n }\n\n /** @dev operator can change his address */\n function changeOperator(address _newOperator) external onlyOperator {\n operator = _newOperator;\n }\n}\n", "sourcePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "ast": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "exportedSymbols": { "IFeeManager": [ - 888 + 1052 ], "IVerifier": [ - 882 + 1041 ], "Tornado": [ - 1204 + 1363 ] }, - "id": 1205, + "id": 1364, "nodeType": "SourceUnit", "nodes": [ { - "id": 868, + "id": 1027, "literals": [ "solidity", "0.5", ".17" ], "nodeType": "PragmaDirective", - "src": "0:23:8" + "src": "0:23:5" }, { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol", "file": "./MerkleTreeWithHistory.sol", - "id": 869, + "id": 1028, "nodeType": "ImportDirective", - "scope": 1205, - "sourceUnit": 686, - "src": "25:37:8", + "scope": 1364, + "sourceUnit": 839, + "src": "25:37:5", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "id": 870, + "id": 1029, "nodeType": "ImportDirective", - "scope": 1205, - "sourceUnit": 3256, - "src": "63:59:8", + "scope": 1364, + "sourceUnit": 1394, + "src": "63:59:5", "symbolAliases": [], "unitAlias": "" }, @@ -78,9 +93,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": false, - "id": 882, + "id": 1041, "linearizedBaseContracts": [ - 882 + 1041 ], "name": "IVerifier", "nodeType": "ContractDefinition", @@ -88,23 +103,23 @@ { "body": null, "documentation": null, - "id": 881, + "id": 1040, "implemented": false, "kind": "function", "modifiers": [], "name": "verifyProof", "nodeType": "FunctionDefinition", "parameters": { - "id": 877, + "id": 1036, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 872, + "id": 1031, "name": "_proof", "nodeType": "VariableDeclaration", - "scope": 881, - "src": "168:19:8", + "scope": 1040, + "src": "168:19:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -112,10 +127,10 @@ "typeString": "bytes" }, "typeName": { - "id": 871, + "id": 1030, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "168:5:8", + "src": "168:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -126,11 +141,11 @@ }, { "constant": false, - "id": 876, + "id": 1035, "name": "_input", "nodeType": "VariableDeclaration", - "scope": 881, - "src": "189:24:8", + "scope": 1040, + "src": "189:24:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -139,27 +154,27 @@ }, "typeName": { "baseType": { - "id": 873, + "id": 1032, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "189:7:8", + "src": "189:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 875, + "id": 1034, "length": { "argumentTypes": null, "hexValue": "36", - "id": 874, + "id": 1033, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "197:1:8", + "src": "197:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_6_by_1", @@ -168,7 +183,7 @@ "value": "6" }, "nodeType": "ArrayTypeName", - "src": "189:10:8", + "src": "189:10:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$6_storage_ptr", "typeString": "uint256[6]" @@ -178,19 +193,19 @@ "visibility": "internal" } ], - "src": "167:47:8" + "src": "167:47:5" }, "returnParameters": { - "id": 880, + "id": 1039, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 879, + "id": 1038, "name": "", "nodeType": "VariableDeclaration", - "scope": 881, - "src": "230:4:8", + "scope": 1040, + "src": "230:4:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -198,10 +213,10 @@ "typeString": "bool" }, "typeName": { - "id": 878, + "id": 1037, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "230:4:8", + "src": "230:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -211,17 +226,17 @@ "visibility": "internal" } ], - "src": "229:6:8" + "src": "229:6:5" }, - "scope": 882, - "src": "147:89:8", + "scope": 1041, + "src": "147:89:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 1205, - "src": "124:114:8" + "scope": 1364, + "src": "124:114:5" }, { "baseContracts": [], @@ -229,9 +244,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": false, - "id": 888, + "id": 1052, "linearizedBaseContracts": [ - 888 + 1052 ], "name": "IFeeManager", "nodeType": "ContractDefinition", @@ -239,29 +254,29 @@ { "body": null, "documentation": null, - "id": 887, + "id": 1046, "implemented": false, "kind": "function", "modifiers": [], "name": "feeTo", "nodeType": "FunctionDefinition", "parameters": { - "id": 883, + "id": 1042, "nodeType": "ParameterList", "parameters": [], - "src": "279:2:8" + "src": "279:2:5" }, "returnParameters": { - "id": 886, + "id": 1045, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 885, + "id": 1044, "name": "", "nodeType": "VariableDeclaration", - "scope": 887, - "src": "305:7:8", + "scope": 1046, + "src": "305:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -269,10 +284,10 @@ "typeString": "address" }, "typeName": { - "id": 884, + "id": 1043, "name": "address", "nodeType": "ElementaryTypeName", - "src": "305:7:8", + "src": "305:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -283,17 +298,71 @@ "visibility": "internal" } ], - "src": "304:9:8" + "src": "304:9:5" }, - "scope": 888, - "src": "265:49:8", + "scope": 1052, + "src": "265:49:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1051, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "protocolFeeDivisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1047, + "nodeType": "ParameterList", + "parameters": [], + "src": "344:2:5" + }, + "returnParameters": { + "id": 1050, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1049, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "370:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1048, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "370:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "369:9:5" + }, + "scope": 1052, + "src": "317:62:5", "stateMutability": "view", "superFunction": null, "visibility": "external" } ], - "scope": 1205, - "src": "240:76:8" + "scope": 1364, + "src": "240:141:5" }, { "baseContracts": [ @@ -301,62 +370,62 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 889, + "id": 1053, "name": "MerkleTreeWithHistory", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 685, - "src": "338:21:8", + "referencedDeclaration": 838, + "src": "403:21:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_MerkleTreeWithHistory_$685", + "typeIdentifier": "t_contract$_MerkleTreeWithHistory_$838", "typeString": "contract MerkleTreeWithHistory" } }, - "id": 890, + "id": 1054, "nodeType": "InheritanceSpecifier", - "src": "338:21:8" + "src": "403:21:5" }, { "arguments": null, "baseName": { "contractScope": null, - "id": 891, + "id": 1055, "name": "ReentrancyGuard", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3255, - "src": "361:15:8", + "referencedDeclaration": 1393, + "src": "426:15:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_ReentrancyGuard_$3255", + "typeIdentifier": "t_contract$_ReentrancyGuard_$1393", "typeString": "contract ReentrancyGuard" } }, - "id": 892, + "id": 1056, "nodeType": "InheritanceSpecifier", - "src": "361:15:8" + "src": "426:15:5" } ], "contractDependencies": [ - 685, - 3255 + 838, + 1393 ], "contractKind": "contract", "documentation": null, "fullyImplemented": false, - "id": 1204, + "id": 1363, "linearizedBaseContracts": [ - 1204, - 3255, - 685 + 1363, + 1393, + 838 ], "name": "Tornado", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 894, + "id": 1058, "name": "denomination", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "381:27:8", + "scope": 1363, + "src": "446:27:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -364,10 +433,10 @@ "typeString": "uint256" }, "typeName": { - "id": 893, + "id": 1057, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "381:7:8", + "src": "446:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -378,11 +447,11 @@ }, { "constant": false, - "id": 898, + "id": 1062, "name": "nullifierHashes", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "412:47:8", + "scope": 1363, + "src": "477:47:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -390,28 +459,28 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 897, + "id": 1061, "keyType": { - "id": 895, + "id": 1059, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "420:7:8", + "src": "485:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "412:24:8", + "src": "477:24:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 896, + "id": 1060, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "431:4:8", + "src": "496:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -423,11 +492,11 @@ }, { "constant": false, - "id": 902, + "id": 1066, "name": "commitments", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "554:43:8", + "scope": 1363, + "src": "619:43:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -435,28 +504,28 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 901, + "id": 1065, "keyType": { - "id": 899, + "id": 1063, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "562:7:8", + "src": "627:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "554:24:8", + "src": "619:24:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 900, + "id": 1064, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "573:4:8", + "src": "638:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -468,26 +537,26 @@ }, { "constant": false, - "id": 904, + "id": 1068, "name": "verifier", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "601:25:8", + "scope": 1363, + "src": "666:25:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" }, "typeName": { "contractScope": null, - "id": 903, + "id": 1067, "name": "IVerifier", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 882, - "src": "601:9:8", + "referencedDeclaration": 1041, + "src": "666:9:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -496,26 +565,26 @@ }, { "constant": false, - "id": 906, + "id": 1070, "name": "feeManager", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "630:29:8", + "scope": 1363, + "src": "695:29:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" }, "typeName": { "contractScope": null, - "id": 905, + "id": 1069, "name": "IFeeManager", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 888, - "src": "630:11:8", + "referencedDeclaration": 1052, + "src": "695:11:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -524,11 +593,11 @@ }, { "constant": false, - "id": 908, + "id": 1072, "name": "operator", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "819:23:8", + "scope": 1363, + "src": "884:23:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -536,10 +605,10 @@ "typeString": "address" }, "typeName": { - "id": 907, + "id": 1071, "name": "address", "nodeType": "ElementaryTypeName", - "src": "819:7:8", + "src": "884:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -551,9 +620,9 @@ }, { "body": { - "id": 919, + "id": 1083, "nodeType": "Block", - "src": "868:90:8", + "src": "933:90:5", "statements": [ { "expression": { @@ -565,7 +634,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 914, + "id": 1078, "isConstant": false, "isLValue": false, "isPure": false, @@ -574,18 +643,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 911, + "id": 1075, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "882:3:8", + "referencedDeclaration": 1408, + "src": "947:3:5", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 912, + "id": 1076, "isConstant": false, "isLValue": false, "isPure": false, @@ -593,7 +662,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "882:10:8", + "src": "947:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -603,18 +672,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 913, + "id": 1077, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "896:8:8", + "referencedDeclaration": 1072, + "src": "961:8:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "882:22:8", + "src": "947:22:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -623,14 +692,14 @@ { "argumentTypes": null, "hexValue": "4f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2e", - "id": 915, + "id": 1079, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "906:39:8", + "src": "971:39:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e8393660073679be7a6133571fe2ca8983a31a683c72e9055f401ac33a2efffc", @@ -650,21 +719,21 @@ "typeString": "literal_string \"Only operator can call this function.\"" } ], - "id": 910, + "id": 1074, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "874:7:8", + "referencedDeclaration": 1412, + "src": "939:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 916, + "id": 1080, "isConstant": false, "isLValue": false, "isPure": false, @@ -672,54 +741,54 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "874:72:8", + "src": "939:72:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 917, + "id": 1081, "nodeType": "ExpressionStatement", - "src": "874:72:8" + "src": "939:72:5" }, { - "id": 918, + "id": 1082, "nodeType": "PlaceholderStatement", - "src": "952:1:8" + "src": "1017:1:5" } ] }, "documentation": null, - "id": 920, + "id": 1084, "name": "onlyOperator", "nodeType": "ModifierDefinition", "parameters": { - "id": 909, + "id": 1073, "nodeType": "ParameterList", "parameters": [], - "src": "868:0:8" + "src": "933:0:5" }, - "src": "846:112:8", + "src": "911:112:5", "visibility": "internal" }, { "anonymous": false, "documentation": null, - "id": 928, + "id": 1092, "name": "Deposit", "nodeType": "EventDefinition", "parameters": { - "id": 927, + "id": 1091, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 922, + "id": 1086, "indexed": true, "name": "commitment", "nodeType": "VariableDeclaration", - "scope": 928, - "src": "976:26:8", + "scope": 1092, + "src": "1041:26:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -727,10 +796,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 921, + "id": 1085, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "976:7:8", + "src": "1041:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -741,12 +810,12 @@ }, { "constant": false, - "id": 924, + "id": 1088, "indexed": false, "name": "leafIndex", "nodeType": "VariableDeclaration", - "scope": 928, - "src": "1004:16:8", + "scope": 1092, + "src": "1069:16:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -754,10 +823,10 @@ "typeString": "uint32" }, "typeName": { - "id": 923, + "id": 1087, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "1004:6:8", + "src": "1069:6:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -768,12 +837,12 @@ }, { "constant": false, - "id": 926, + "id": 1090, "indexed": false, "name": "timestamp", "nodeType": "VariableDeclaration", - "scope": 928, - "src": "1022:17:8", + "scope": 1092, + "src": "1087:17:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -781,10 +850,10 @@ "typeString": "uint256" }, "typeName": { - "id": 925, + "id": 1089, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1022:7:8", + "src": "1087:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -794,28 +863,28 @@ "visibility": "internal" } ], - "src": "975:65:8" + "src": "1040:65:5" }, - "src": "962:79:8" + "src": "1027:79:5" }, { "anonymous": false, "documentation": null, - "id": 938, + "id": 1102, "name": "Withdrawal", "nodeType": "EventDefinition", "parameters": { - "id": 937, + "id": 1101, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 930, + "id": 1094, "indexed": false, "name": "to", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1061:10:8", + "scope": 1102, + "src": "1126:10:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -823,10 +892,10 @@ "typeString": "address" }, "typeName": { - "id": 929, + "id": 1093, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1061:7:8", + "src": "1126:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -838,12 +907,12 @@ }, { "constant": false, - "id": 932, + "id": 1096, "indexed": false, "name": "nullifierHash", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1073:21:8", + "scope": 1102, + "src": "1138:21:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -851,10 +920,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 931, + "id": 1095, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1073:7:8", + "src": "1138:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -865,12 +934,12 @@ }, { "constant": false, - "id": 934, + "id": 1098, "indexed": true, "name": "relayer", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1096:23:8", + "scope": 1102, + "src": "1161:23:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -878,10 +947,10 @@ "typeString": "address" }, "typeName": { - "id": 933, + "id": 1097, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1096:7:8", + "src": "1161:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -893,12 +962,12 @@ }, { "constant": false, - "id": 936, + "id": 1100, "indexed": false, "name": "fee", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1121:11:8", + "scope": 1102, + "src": "1186:11:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -906,10 +975,10 @@ "typeString": "uint256" }, "typeName": { - "id": 935, + "id": 1099, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1121:7:8", + "src": "1186:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -919,15 +988,15 @@ "visibility": "internal" } ], - "src": "1060:73:8" + "src": "1125:73:5" }, - "src": "1044:90:8" + "src": "1109:90:5" }, { "body": { - "id": 977, + "id": 1141, "nodeType": "Block", - "src": "1631:194:8", + "src": "1696:194:5", "statements": [ { "expression": { @@ -939,19 +1008,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 957, + "id": 1121, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 955, + "id": 1119, "name": "_denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "1645:13:8", + "referencedDeclaration": 1108, + "src": "1710:13:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -962,14 +1031,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 956, + "id": 1120, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1661:1:8", + "src": "1726:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -977,7 +1046,7 @@ }, "value": "0" }, - "src": "1645:17:8", + "src": "1710:17:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -986,14 +1055,14 @@ { "argumentTypes": null, "hexValue": "64656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030", - "id": 958, + "id": 1122, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1664:39:8", + "src": "1729:39:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_04818fb803bf7e7ff6c9059d97eae335b77b108931ead0a529924d35ccaf3fc8", @@ -1013,21 +1082,21 @@ "typeString": "literal_string \"denomination should be greater than 0\"" } ], - "id": 954, + "id": 1118, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "1637:7:8", + "referencedDeclaration": 1412, + "src": "1702:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 959, + "id": 1123, "isConstant": false, "isLValue": false, "isPure": false, @@ -1035,34 +1104,34 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1637:67:8", + "src": "1702:67:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 960, + "id": 1124, "nodeType": "ExpressionStatement", - "src": "1637:67:8" + "src": "1702:67:5" }, { "expression": { "argumentTypes": null, - "id": 963, + "id": 1127, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 961, + "id": 1125, "name": "verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "1710:8:8", + "referencedDeclaration": 1068, + "src": "1775:8:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -1070,45 +1139,45 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 962, + "id": 1126, "name": "_verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 940, - "src": "1721:9:8", + "referencedDeclaration": 1104, + "src": "1786:9:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "src": "1710:20:8", + "src": "1775:20:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "id": 964, + "id": 1128, "nodeType": "ExpressionStatement", - "src": "1710:20:8" + "src": "1775:20:5" }, { "expression": { "argumentTypes": null, - "id": 967, + "id": 1131, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 965, + "id": 1129, "name": "feeManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "1736:10:8", + "referencedDeclaration": 1070, + "src": "1801:10:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -1116,43 +1185,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 966, + "id": 1130, "name": "_feeManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 942, - "src": "1749:11:8", + "referencedDeclaration": 1106, + "src": "1814:11:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, - "src": "1736:24:8", + "src": "1801:24:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, - "id": 968, + "id": 1132, "nodeType": "ExpressionStatement", - "src": "1736:24:8" + "src": "1801:24:5" }, { "expression": { "argumentTypes": null, - "id": 971, + "id": 1135, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 969, + "id": 1133, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "1766:8:8", + "referencedDeclaration": 1072, + "src": "1831:8:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1162,43 +1231,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 970, + "id": 1134, "name": "_operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 948, - "src": "1777:9:8", + "referencedDeclaration": 1112, + "src": "1842:9:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1766:20:8", + "src": "1831:20:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 972, + "id": 1136, "nodeType": "ExpressionStatement", - "src": "1766:20:8" + "src": "1831:20:5" }, { "expression": { "argumentTypes": null, - "id": 975, + "id": 1139, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 973, + "id": 1137, "name": "denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 894, - "src": "1792:12:8", + "referencedDeclaration": 1058, + "src": "1857:12:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1208,31 +1277,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 974, + "id": 1138, "name": "_denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "1807:13:8", + "referencedDeclaration": 1108, + "src": "1872:13:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1792:28:8", + "src": "1857:28:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 976, + "id": 1140, "nodeType": "ExpressionStatement", - "src": "1792:28:8" + "src": "1857:28:5" } ] }, "documentation": "@dev The constructor\n@param _verifier the address of SNARK verifier for this contract\n@param _denomination transfer amount for each deposit\n@param _merkleTreeHeight the height of deposits' Merkle Tree\n@param _operator operator address (see operator comment above)", - "id": 978, + "id": 1142, "implemented": true, "kind": "constructor", "modifiers": [ @@ -1240,64 +1309,64 @@ "arguments": [ { "argumentTypes": null, - "id": 951, + "id": 1115, "name": "_merkleTreeHeight", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 946, - "src": "1605:17:8", + "referencedDeclaration": 1110, + "src": "1670:17:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } } ], - "id": 952, + "id": 1116, "modifierName": { "argumentTypes": null, - "id": 950, + "id": 1114, "name": "MerkleTreeWithHistory", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 685, - "src": "1583:21:8", + "referencedDeclaration": 838, + "src": "1648:21:5", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MerkleTreeWithHistory_$685_$", + "typeIdentifier": "t_type$_t_contract$_MerkleTreeWithHistory_$838_$", "typeString": "type(contract MerkleTreeWithHistory)" } }, "nodeType": "ModifierInvocation", - "src": "1583:40:8" + "src": "1648:40:5" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 949, + "id": 1113, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 940, + "id": 1104, "name": "_verifier", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1450:19:8", + "scope": 1142, + "src": "1515:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" }, "typeName": { "contractScope": null, - "id": 939, + "id": 1103, "name": "IVerifier", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 882, - "src": "1450:9:8", + "referencedDeclaration": 1041, + "src": "1515:9:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -1306,26 +1375,26 @@ }, { "constant": false, - "id": 942, + "id": 1106, "name": "_feeManager", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1475:23:8", + "scope": 1142, + "src": "1540:23:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" }, "typeName": { "contractScope": null, - "id": 941, + "id": 1105, "name": "IFeeManager", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 888, - "src": "1475:11:8", + "referencedDeclaration": 1052, + "src": "1540:11:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -1334,11 +1403,11 @@ }, { "constant": false, - "id": 944, + "id": 1108, "name": "_denomination", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1504:21:8", + "scope": 1142, + "src": "1569:21:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1346,10 +1415,10 @@ "typeString": "uint256" }, "typeName": { - "id": 943, + "id": 1107, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1504:7:8", + "src": "1569:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1360,11 +1429,11 @@ }, { "constant": false, - "id": 946, + "id": 1110, "name": "_merkleTreeHeight", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1531:24:8", + "scope": 1142, + "src": "1596:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1372,10 +1441,10 @@ "typeString": "uint32" }, "typeName": { - "id": 945, + "id": 1109, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "1531:6:8", + "src": "1596:6:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1386,11 +1455,11 @@ }, { "constant": false, - "id": 948, + "id": 1112, "name": "_operator", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1561:17:8", + "scope": 1142, + "src": "1626:17:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1398,10 +1467,10 @@ "typeString": "address" }, "typeName": { - "id": 947, + "id": 1111, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1561:7:8", + "src": "1626:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1412,25 +1481,25 @@ "visibility": "internal" } ], - "src": "1444:138:8" + "src": "1509:138:5" }, "returnParameters": { - "id": 953, + "id": 1117, "nodeType": "ParameterList", "parameters": [], - "src": "1631:0:8" + "src": "1696:0:5" }, - "scope": 1204, - "src": "1433:392:8", + "scope": 1363, + "src": "1498:392:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 1015, + "id": 1179, "nodeType": "Block", - "src": "2141:256:8", + "src": "2206:256:5", "statements": [ { "expression": { @@ -1438,7 +1507,7 @@ "arguments": [ { "argumentTypes": null, - "id": 989, + "id": 1153, "isConstant": false, "isLValue": false, "isPure": false, @@ -1446,31 +1515,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "2155:25:8", + "src": "2220:25:5", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 986, + "id": 1150, "name": "commitments", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "2156:11:8", + "referencedDeclaration": 1066, + "src": "2221:11:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 988, + "id": 1152, "indexExpression": { "argumentTypes": null, - "id": 987, + "id": 1151, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2168:11:8", + "referencedDeclaration": 1144, + "src": "2233:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1481,7 +1550,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2156:24:8", + "src": "2221:24:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1495,14 +1564,14 @@ { "argumentTypes": null, "hexValue": "54686520636f6d6d69746d656e7420686173206265656e207375626d6974746564", - "id": 990, + "id": 1154, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2182:35:8", + "src": "2247:35:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ae5f231636554c1cb3bf839359e4dfbb338ccb221c7c5dbdf2da91ddc6e2ee6b", @@ -1522,21 +1591,21 @@ "typeString": "literal_string \"The commitment has been submitted\"" } ], - "id": 985, + "id": 1149, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "2147:7:8", + "referencedDeclaration": 1412, + "src": "2212:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 991, + "id": 1155, "isConstant": false, "isLValue": false, "isPure": false, @@ -1544,28 +1613,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2147:71:8", + "src": "2212:71:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 992, + "id": 1156, "nodeType": "ExpressionStatement", - "src": "2147:71:8" + "src": "2212:71:5" }, { "assignments": [ - 994 + 1158 ], "declarations": [ { "constant": false, - "id": 994, + "id": 1158, "name": "insertedIndex", "nodeType": "VariableDeclaration", - "scope": 1015, - "src": "2225:20:8", + "scope": 1179, + "src": "2290:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1573,10 +1642,10 @@ "typeString": "uint32" }, "typeName": { - "id": 993, + "id": 1157, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "2225:6:8", + "src": "2290:6:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1586,18 +1655,18 @@ "visibility": "internal" } ], - "id": 998, + "id": 1162, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 996, + "id": 1160, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2256:11:8", + "referencedDeclaration": 1144, + "src": "2321:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1611,18 +1680,18 @@ "typeString": "bytes32" } ], - "id": 995, + "id": 1159, "name": "_insert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 627, - "src": "2248:7:8", + "referencedDeclaration": 780, + "src": "2313:7:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_uint32_$", "typeString": "function (bytes32) returns (uint32)" } }, - "id": 997, + "id": 1161, "isConstant": false, "isLValue": false, "isPure": false, @@ -1630,19 +1699,19 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2248:20:8", + "src": "2313:20:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "VariableDeclarationStatement", - "src": "2225:43:8" + "src": "2290:43:5" }, { "expression": { "argumentTypes": null, - "id": 1003, + "id": 1167, "isConstant": false, "isLValue": false, "isPure": false, @@ -1651,26 +1720,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 999, + "id": 1163, "name": "commitments", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "2274:11:8", + "referencedDeclaration": 1066, + "src": "2339:11:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1001, + "id": 1165, "indexExpression": { "argumentTypes": null, - "id": 1000, + "id": 1164, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2286:11:8", + "referencedDeclaration": 1144, + "src": "2351:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1681,7 +1750,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2274:24:8", + "src": "2339:24:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1692,14 +1761,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1002, + "id": 1166, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "2301:4:8", + "src": "2366:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -1707,15 +1776,15 @@ }, "value": "true" }, - "src": "2274:31:8", + "src": "2339:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1004, + "id": 1168, "nodeType": "ExpressionStatement", - "src": "2274:31:8" + "src": "2339:31:5" }, { "expression": { @@ -1723,18 +1792,18 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 1005, + "id": 1169, "name": "_processDeposit", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1019, - "src": "2311:15:8", + "referencedDeclaration": 1183, + "src": "2376:15:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, - "id": 1006, + "id": 1170, "isConstant": false, "isLValue": false, "isPure": false, @@ -1742,15 +1811,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2311:17:8", + "src": "2376:17:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1007, + "id": 1171, "nodeType": "ExpressionStatement", - "src": "2311:17:8" + "src": "2376:17:5" }, { "eventCall": { @@ -1758,12 +1827,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1009, + "id": 1173, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2348:11:8", + "referencedDeclaration": 1144, + "src": "2413:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1771,12 +1840,12 @@ }, { "argumentTypes": null, - "id": 1010, + "id": 1174, "name": "insertedIndex", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 994, - "src": "2361:13:8", + "referencedDeclaration": 1158, + "src": "2426:13:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1786,18 +1855,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1011, + "id": 1175, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3260, - "src": "2376:5:8", + "referencedDeclaration": 1398, + "src": "2441:5:5", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 1012, + "id": 1176, "isConstant": false, "isLValue": false, "isPure": false, @@ -1805,7 +1874,7 @@ "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2376:15:8", + "src": "2441:15:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1827,18 +1896,18 @@ "typeString": "uint256" } ], - "id": 1008, + "id": 1172, "name": "Deposit", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "2340:7:8", + "referencedDeclaration": 1092, + "src": "2405:7:5", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint32_$_t_uint256_$returns$__$", "typeString": "function (bytes32,uint32,uint256)" } }, - "id": 1013, + "id": 1177, "isConstant": false, "isLValue": false, "isPure": false, @@ -1846,56 +1915,56 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2340:52:8", + "src": "2405:52:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1014, + "id": 1178, "nodeType": "EmitStatement", - "src": "2335:57:8" + "src": "2400:57:5" } ] }, "documentation": "@dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\n@param _commitment the note commitment, which is PedersenHash(nullifier + secret)", - "id": 1016, + "id": 1180, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 983, + "id": 1147, "modifierName": { "argumentTypes": null, - "id": 982, + "id": 1146, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "2128:12:8", + "referencedDeclaration": 1392, + "src": "2193:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "2128:12:8" + "src": "2193:12:5" } ], "name": "deposit", "nodeType": "FunctionDefinition", "parameters": { - "id": 981, + "id": 1145, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 980, + "id": 1144, "name": "_commitment", "nodeType": "VariableDeclaration", - "scope": 1016, - "src": "2090:19:8", + "scope": 1180, + "src": "2155:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1903,10 +1972,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 979, + "id": 1143, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2090:7:8", + "src": "2155:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1916,16 +1985,16 @@ "visibility": "internal" } ], - "src": "2089:21:8" + "src": "2154:21:5" }, "returnParameters": { - "id": 984, + "id": 1148, "nodeType": "ParameterList", "parameters": [], - "src": "2141:0:8" + "src": "2206:0:5" }, - "scope": 1204, - "src": "2073:324:8", + "scope": 1363, + "src": "2138:324:5", "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -1933,35 +2002,35 @@ { "body": null, "documentation": "@dev this function is defined in a child contract ", - "id": 1019, + "id": 1183, "implemented": false, "kind": "function", "modifiers": [], "name": "_processDeposit", "nodeType": "FunctionDefinition", "parameters": { - "id": 1017, + "id": 1181, "nodeType": "ParameterList", "parameters": [], - "src": "2484:2:8" + "src": "2549:2:5" }, "returnParameters": { - "id": 1018, + "id": 1182, "nodeType": "ParameterList", "parameters": [], - "src": "2495:0:8" + "src": "2560:0:5" }, - "scope": 1204, - "src": "2460:36:8", + "scope": 1363, + "src": "2525:36:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1106, + "id": 1267, "nodeType": "Block", - "src": "3088:606:8", + "src": "3153:586:5", "statements": [ { "expression": { @@ -1973,19 +2042,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1041, + "id": 1205, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1039, + "id": 1203, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3102:4:8", + "referencedDeclaration": 1195, + "src": "3167:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1995,18 +2064,18 @@ "operator": "<=", "rightExpression": { "argumentTypes": null, - "id": 1040, + "id": 1204, "name": "denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 894, - "src": "3110:12:8", + "referencedDeclaration": 1058, + "src": "3175:12:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3102:20:8", + "src": "3167:20:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2015,14 +2084,14 @@ { "argumentTypes": null, "hexValue": "4665652065786365656473207472616e736665722076616c7565", - "id": 1042, + "id": 1206, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3124:28:8", + "src": "3189:28:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2ce218df547d416f80ea8a5deadaf9453d23523ffa5f2e880a48adfdb4053a9c", @@ -2042,21 +2111,21 @@ "typeString": "literal_string \"Fee exceeds transfer value\"" } ], - "id": 1038, + "id": 1202, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3094:7:8", + "referencedDeclaration": 1412, + "src": "3159:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1043, + "id": 1207, "isConstant": false, "isLValue": false, "isPure": false, @@ -2064,15 +2133,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3094:59:8", + "src": "3159:59:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1044, + "id": 1208, "nodeType": "ExpressionStatement", - "src": "3094:59:8" + "src": "3159:59:5" }, { "expression": { @@ -2080,7 +2149,7 @@ "arguments": [ { "argumentTypes": null, - "id": 1049, + "id": 1213, "isConstant": false, "isLValue": false, "isPure": false, @@ -2088,31 +2157,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "3167:32:8", + "src": "3232:32:5", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1046, + "id": 1210, "name": "nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 898, - "src": "3168:15:8", + "referencedDeclaration": 1062, + "src": "3233:15:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1048, + "id": 1212, "indexExpression": { "argumentTypes": null, - "id": 1047, + "id": 1211, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3184:14:8", + "referencedDeclaration": 1189, + "src": "3249:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2123,7 +2192,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3168:31:8", + "src": "3233:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2137,14 +2206,14 @@ { "argumentTypes": null, "hexValue": "546865206e6f746520686173206265656e20616c7265616479207370656e74", - "id": 1050, + "id": 1214, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3201:33:8", + "src": "3266:33:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_a1bef92d7a18b1c6975dc8de68df6140a52afea05a2c6c91da2b1562c617e896", @@ -2164,21 +2233,21 @@ "typeString": "literal_string \"The note has been already spent\"" } ], - "id": 1045, + "id": 1209, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3159:7:8", + "referencedDeclaration": 1412, + "src": "3224:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1051, + "id": 1215, "isConstant": false, "isLValue": false, "isPure": false, @@ -2186,15 +2255,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3159:76:8", + "src": "3224:76:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1052, + "id": 1216, "nodeType": "ExpressionStatement", - "src": "3159:76:8" + "src": "3224:76:5" }, { "expression": { @@ -2205,12 +2274,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1055, + "id": 1219, "name": "_root", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "3261:5:8", + "referencedDeclaration": 1187, + "src": "3326:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2224,18 +2293,18 @@ "typeString": "bytes32" } ], - "id": 1054, + "id": 1218, "name": "isKnownRoot", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 674, - "src": "3249:11:8", + "referencedDeclaration": 827, + "src": "3314:11:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$", "typeString": "function (bytes32) view returns (bool)" } }, - "id": 1056, + "id": 1220, "isConstant": false, "isLValue": false, "isPure": false, @@ -2243,7 +2312,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3249:18:8", + "src": "3314:18:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2252,14 +2321,14 @@ { "argumentTypes": null, "hexValue": "43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f74", - "id": 1057, + "id": 1221, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3269:30:8", + "src": "3334:30:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2a69086763073955418d2fd7dfee3d2f1fbc5b21047a216b7855d3f313d8e204", @@ -2279,21 +2348,21 @@ "typeString": "literal_string \"Cannot find your merkle root\"" } ], - "id": 1053, + "id": 1217, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3241:7:8", + "referencedDeclaration": 1412, + "src": "3306:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1058, + "id": 1222, "isConstant": false, "isLValue": false, "isPure": false, @@ -2301,15 +2370,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3241:59:8", + "src": "3306:59:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1059, + "id": 1223, "nodeType": "ExpressionStatement", - "src": "3241:59:8" + "src": "3306:59:5" }, { "expression": { @@ -2320,12 +2389,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1063, + "id": 1227, "name": "_proof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "3368:6:8", + "referencedDeclaration": 1185, + "src": "3433:6:5", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" @@ -2339,12 +2408,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1065, + "id": 1229, "name": "_root", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "3385:5:8", + "referencedDeclaration": 1187, + "src": "3450:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2358,20 +2427,20 @@ "typeString": "bytes32" } ], - "id": 1064, + "id": 1228, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3377:7:8", + "src": "3442:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1066, + "id": 1230, "isConstant": false, "isLValue": false, "isPure": false, @@ -2379,7 +2448,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3377:14:8", + "src": "3442:14:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2390,12 +2459,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1068, + "id": 1232, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3401:14:8", + "referencedDeclaration": 1189, + "src": "3466:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2409,20 +2478,20 @@ "typeString": "bytes32" } ], - "id": 1067, + "id": 1231, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3393:7:8", + "src": "3458:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1069, + "id": 1233, "isConstant": false, "isLValue": false, "isPure": false, @@ -2430,7 +2499,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3393:23:8", + "src": "3458:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2441,12 +2510,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1071, + "id": 1235, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "3426:10:8", + "referencedDeclaration": 1191, + "src": "3491:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2460,20 +2529,20 @@ "typeString": "address payable" } ], - "id": 1070, + "id": 1234, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3418:7:8", + "src": "3483:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1072, + "id": 1236, "isConstant": false, "isLValue": false, "isPure": false, @@ -2481,7 +2550,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3418:19:8", + "src": "3483:19:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2492,12 +2561,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1074, + "id": 1238, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "3447:8:8", + "referencedDeclaration": 1193, + "src": "3512:8:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2511,20 +2580,20 @@ "typeString": "address payable" } ], - "id": 1073, + "id": 1237, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3439:7:8", + "src": "3504:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1075, + "id": 1239, "isConstant": false, "isLValue": false, "isPure": false, @@ -2532,7 +2601,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3439:17:8", + "src": "3504:17:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2540,12 +2609,12 @@ }, { "argumentTypes": null, - "id": 1076, + "id": 1240, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3458:4:8", + "referencedDeclaration": 1195, + "src": "3523:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2553,26 +2622,26 @@ }, { "argumentTypes": null, - "id": 1077, + "id": 1241, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1033, - "src": "3464:7:8", + "referencedDeclaration": 1197, + "src": "3529:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 1078, + "id": 1242, "isConstant": false, "isInlineArray": true, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "3376:96:8", + "src": "3441:96:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", "typeString": "uint256[6] memory" @@ -2592,32 +2661,32 @@ ], "expression": { "argumentTypes": null, - "id": 1061, + "id": 1225, "name": "verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "3347:8:8", + "referencedDeclaration": 1068, + "src": "3412:8:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "id": 1062, + "id": 1226, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "verifyProof", "nodeType": "MemberAccess", - "referencedDeclaration": 881, - "src": "3347:20:8", + "referencedDeclaration": 1040, + "src": "3412:20:5", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_bytes_memory_ptr_$_t_array$_t_uint256_$6_memory_ptr_$returns$_t_bool_$", "typeString": "function (bytes memory,uint256[6] memory) external returns (bool)" } }, - "id": 1079, + "id": 1243, "isConstant": false, "isLValue": false, "isPure": false, @@ -2625,7 +2694,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3347:126:8", + "src": "3412:126:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2634,14 +2703,14 @@ { "argumentTypes": null, "hexValue": "496e76616c69642077697468647261772070726f6f66", - "id": 1080, + "id": 1244, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3475:24:8", + "src": "3540:24:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_7021ea58137dba96e572e94936410b0b0e4cbc344e1ab2ee7f47660768b81ff4", @@ -2661,21 +2730,21 @@ "typeString": "literal_string \"Invalid withdraw proof\"" } ], - "id": 1060, + "id": 1224, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3339:7:8", + "referencedDeclaration": 1412, + "src": "3404:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1081, + "id": 1245, "isConstant": false, "isLValue": false, "isPure": false, @@ -2683,20 +2752,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3339:161:8", + "src": "3404:161:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1082, + "id": 1246, "nodeType": "ExpressionStatement", - "src": "3339:161:8" + "src": "3404:161:5" }, { "expression": { "argumentTypes": null, - "id": 1087, + "id": 1251, "isConstant": false, "isLValue": false, "isPure": false, @@ -2705,26 +2774,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1083, + "id": 1247, "name": "nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 898, - "src": "3507:15:8", + "referencedDeclaration": 1062, + "src": "3572:15:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1085, + "id": 1249, "indexExpression": { "argumentTypes": null, - "id": 1084, + "id": 1248, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3523:14:8", + "referencedDeclaration": 1189, + "src": "3588:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2735,7 +2804,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3507:31:8", + "src": "3572:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2746,14 +2815,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1086, + "id": 1250, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3541:4:8", + "src": "3606:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -2761,15 +2830,15 @@ }, "value": "true" }, - "src": "3507:38:8", + "src": "3572:38:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1088, + "id": 1252, "nodeType": "ExpressionStatement", - "src": "3507:38:8" + "src": "3572:38:5" }, { "expression": { @@ -2777,12 +2846,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1090, + "id": 1254, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "3568:10:8", + "referencedDeclaration": 1191, + "src": "3633:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2790,12 +2859,12 @@ }, { "argumentTypes": null, - "id": 1091, + "id": 1255, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "3580:8:8", + "referencedDeclaration": 1193, + "src": "3645:8:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2803,12 +2872,12 @@ }, { "argumentTypes": null, - "id": 1092, + "id": 1256, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3590:4:8", + "referencedDeclaration": 1195, + "src": "3655:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2816,62 +2885,16 @@ }, { "argumentTypes": null, - "id": 1093, + "id": 1257, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1033, - "src": "3596:7:8", + "referencedDeclaration": 1197, + "src": "3661:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 1094, - "name": "feeManager", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "3605:10:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", - "typeString": "contract IFeeManager" - } - }, - "id": 1095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "feeTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 887, - "src": "3605:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", - "typeString": "function () view external returns (address)" - } - }, - "id": 1096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3605:18:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } } ], "expression": { @@ -2891,24 +2914,20 @@ { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" } ], - "id": 1089, + "id": 1253, "name": "_processWithdraw", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1120, - "src": "3551:16:8", + "referencedDeclaration": 1279, + "src": "3616:16:5", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_address_payable_$_t_uint256_$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (address payable,address payable,uint256,uint256,address)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_address_payable_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address payable,address payable,uint256,uint256)" } }, - "id": 1097, + "id": 1258, "isConstant": false, "isLValue": false, "isPure": false, @@ -2916,15 +2935,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3551:73:8", + "src": "3616:53:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1098, + "id": 1259, "nodeType": "ExpressionStatement", - "src": "3551:73:8" + "src": "3616:53:5" }, { "eventCall": { @@ -2932,12 +2951,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1100, + "id": 1261, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "3646:10:8", + "referencedDeclaration": 1191, + "src": "3691:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2945,12 +2964,12 @@ }, { "argumentTypes": null, - "id": 1101, + "id": 1262, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3658:14:8", + "referencedDeclaration": 1189, + "src": "3703:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2958,12 +2977,12 @@ }, { "argumentTypes": null, - "id": 1102, + "id": 1263, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "3674:8:8", + "referencedDeclaration": 1193, + "src": "3719:8:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2971,12 +2990,12 @@ }, { "argumentTypes": null, - "id": 1103, + "id": 1264, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3684:4:8", + "referencedDeclaration": 1195, + "src": "3729:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3002,18 +3021,18 @@ "typeString": "uint256" } ], - "id": 1099, + "id": 1260, "name": "Withdrawal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 938, - "src": "3635:10:8", + "referencedDeclaration": 1102, + "src": "3680:10:5", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,bytes32,address,uint256)" } }, - "id": 1104, + "id": 1265, "isConstant": false, "isLValue": false, "isPure": false, @@ -3021,56 +3040,56 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3635:54:8", + "src": "3680:54:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1105, + "id": 1266, "nodeType": "EmitStatement", - "src": "3630:59:8" + "src": "3675:59:5" } ] }, "documentation": "@dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs\n`input` array consists of:\n- merkle root of all deposits in the contract\n- hash of unique deposit nullifier to prevent double spends\n- the recipient of funds\n- optional fee that goes to the transaction sender (usually a relay)", - "id": 1107, + "id": 1268, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 1036, + "id": 1200, "modifierName": { "argumentTypes": null, - "id": 1035, + "id": 1199, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "3075:12:8", + "referencedDeclaration": 1392, + "src": "3140:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "3075:12:8" + "src": "3140:12:5" } ], "name": "withdraw", "nodeType": "FunctionDefinition", "parameters": { - "id": 1034, + "id": 1198, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1021, + "id": 1185, "name": "_proof", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2911:21:8", + "scope": 1268, + "src": "2976:21:5", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -3078,10 +3097,10 @@ "typeString": "bytes" }, "typeName": { - "id": 1020, + "id": 1184, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2911:5:8", + "src": "2976:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -3092,11 +3111,11 @@ }, { "constant": false, - "id": 1023, + "id": 1187, "name": "_root", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2934:13:8", + "scope": 1268, + "src": "2999:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3104,10 +3123,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1022, + "id": 1186, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2934:7:8", + "src": "2999:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3118,11 +3137,11 @@ }, { "constant": false, - "id": 1025, + "id": 1189, "name": "_nullifierHash", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2949:22:8", + "scope": 1268, + "src": "3014:22:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3130,10 +3149,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1024, + "id": 1188, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2949:7:8", + "src": "3014:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3144,11 +3163,11 @@ }, { "constant": false, - "id": 1027, + "id": 1191, "name": "_recipient", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2973:26:8", + "scope": 1268, + "src": "3038:26:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3156,10 +3175,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1026, + "id": 1190, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2973:15:8", + "src": "3038:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3171,11 +3190,11 @@ }, { "constant": false, - "id": 1029, + "id": 1193, "name": "_relayer", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "3001:24:8", + "scope": 1268, + "src": "3066:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3183,10 +3202,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1028, + "id": 1192, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3001:15:8", + "src": "3066:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3198,11 +3217,11 @@ }, { "constant": false, - "id": 1031, + "id": 1195, "name": "_fee", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "3027:12:8", + "scope": 1268, + "src": "3092:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3210,10 +3229,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1030, + "id": 1194, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3027:7:8", + "src": "3092:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3224,11 +3243,11 @@ }, { "constant": false, - "id": 1033, + "id": 1197, "name": "_refund", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "3041:15:8", + "scope": 1268, + "src": "3106:15:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3236,10 +3255,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1032, + "id": 1196, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3041:7:8", + "src": "3106:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3249,16 +3268,16 @@ "visibility": "internal" } ], - "src": "2910:147:8" + "src": "2975:147:5" }, "returnParameters": { - "id": 1037, + "id": 1201, "nodeType": "ParameterList", "parameters": [], - "src": "3088:0:8" + "src": "3153:0:5" }, - "scope": 1204, - "src": "2893:801:8", + "scope": 1363, + "src": "2958:781:5", "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -3266,23 +3285,23 @@ { "body": null, "documentation": "@dev this function is defined in a child contract ", - "id": 1120, + "id": 1279, "implemented": false, "kind": "function", "modifiers": [], "name": "_processWithdraw", "nodeType": "FunctionDefinition", "parameters": { - "id": 1118, + "id": 1277, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1109, + "id": 1270, "name": "_recipient", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3783:26:8", + "scope": 1279, + "src": "3828:26:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3290,10 +3309,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1108, + "id": 1269, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3783:15:8", + "src": "3828:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3305,11 +3324,11 @@ }, { "constant": false, - "id": 1111, + "id": 1272, "name": "_relayer", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3811:24:8", + "scope": 1279, + "src": "3856:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3317,10 +3336,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1110, + "id": 1271, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3811:15:8", + "src": "3856:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3332,11 +3351,11 @@ }, { "constant": false, - "id": 1113, + "id": 1274, "name": "_relayer_fee", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3837:20:8", + "scope": 1279, + "src": "3882:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3344,10 +3363,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1112, + "id": 1273, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3837:7:8", + "src": "3882:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3358,11 +3377,11 @@ }, { "constant": false, - "id": 1115, + "id": 1276, "name": "_refund", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3859:15:8", + "scope": 1279, + "src": "3904:15:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3370,10 +3389,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1114, + "id": 1275, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3859:7:8", + "src": "3904:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3381,80 +3400,53 @@ }, "value": null, "visibility": "internal" - }, - { - "constant": false, - "id": 1117, - "name": "_feeTo", - "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3876:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1116, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3876:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" } ], - "src": "3782:109:8" + "src": "3827:93:5" }, "returnParameters": { - "id": 1119, + "id": 1278, "nodeType": "ParameterList", "parameters": [], - "src": "3900:0:8" + "src": "3929:0:5" }, - "scope": 1204, - "src": "3757:144:8", + "scope": 1363, + "src": "3802:128:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1131, + "id": 1290, "nodeType": "Block", - "src": "4018:49:8", + "src": "4047:49:5", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1127, + "id": 1286, "name": "nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 898, - "src": "4031:15:8", + "referencedDeclaration": 1062, + "src": "4060:15:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1129, + "id": 1288, "indexExpression": { "argumentTypes": null, - "id": 1128, + "id": 1287, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1122, - "src": "4047:14:8", + "referencedDeclaration": 1281, + "src": "4076:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3465,37 +3457,37 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4031:31:8", + "src": "4060:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 1126, - "id": 1130, + "functionReturnParameters": 1285, + "id": 1289, "nodeType": "Return", - "src": "4024:38:8" + "src": "4053:38:5" } ] }, "documentation": "@dev whether a note is already spent ", - "id": 1132, + "id": 1291, "implemented": true, "kind": "function", "modifiers": [], "name": "isSpent", "nodeType": "FunctionDefinition", "parameters": { - "id": 1123, + "id": 1282, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1122, + "id": 1281, "name": "_nullifierHash", "nodeType": "VariableDeclaration", - "scope": 1132, - "src": "3968:22:8", + "scope": 1291, + "src": "3997:22:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3503,10 +3495,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1121, + "id": 1280, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3968:7:8", + "src": "3997:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3516,19 +3508,19 @@ "visibility": "internal" } ], - "src": "3967:24:8" + "src": "3996:24:5" }, "returnParameters": { - "id": 1126, + "id": 1285, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1125, + "id": 1284, "name": "", "nodeType": "VariableDeclaration", - "scope": 1132, - "src": "4012:4:8", + "scope": 1291, + "src": "4041:4:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3536,10 +3528,10 @@ "typeString": "bool" }, "typeName": { - "id": 1124, + "id": 1283, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4012:4:8", + "src": "4041:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3549,36 +3541,36 @@ "visibility": "internal" } ], - "src": "4011:6:8" + "src": "4040:6:5" }, - "scope": 1204, - "src": "3951:116:8", + "scope": 1363, + "src": "3980:116:5", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 1176, + "id": 1335, "nodeType": "Block", - "src": "4230:191:8", + "src": "4259:191:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1148, + "id": 1307, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 1141, + "id": 1300, "name": "spent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1139, - "src": "4236:5:8", + "referencedDeclaration": 1298, + "src": "4265:5:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", "typeString": "bool[] memory" @@ -3593,18 +3585,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1145, + "id": 1304, "name": "_nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1135, - "src": "4255:16:8", + "referencedDeclaration": 1294, + "src": "4284:16:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", "typeString": "bytes32[] calldata" } }, - "id": 1146, + "id": 1305, "isConstant": false, "isLValue": false, "isPure": false, @@ -3612,7 +3604,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4255:23:8", + "src": "4284:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3626,39 +3618,39 @@ "typeString": "uint256" } ], - "id": 1144, + "id": 1303, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", - "src": "4244:10:8", + "src": "4273:10:5", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bool_$dyn_memory_$", "typeString": "function (uint256) pure returns (bool[] memory)" }, "typeName": { "baseType": { - "id": 1142, + "id": 1301, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4248:4:8", + "src": "4277:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1143, + "id": 1302, "length": null, "nodeType": "ArrayTypeName", - "src": "4248:6:8", + "src": "4277:6:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr", "typeString": "bool[]" } } }, - "id": 1147, + "id": 1306, "isConstant": false, "isLValue": false, "isPure": false, @@ -3666,27 +3658,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4244:35:8", + "src": "4273:35:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory", "typeString": "bool[] memory" } }, - "src": "4236:43:8", + "src": "4265:43:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", "typeString": "bool[] memory" } }, - "id": 1149, + "id": 1308, "nodeType": "ExpressionStatement", - "src": "4236:43:8" + "src": "4265:43:5" }, { "body": { - "id": 1174, + "id": 1333, "nodeType": "Block", - "src": "4335:82:8", + "src": "4364:82:5", "statements": [ { "condition": { @@ -3696,26 +3688,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1162, + "id": 1321, "name": "_nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1135, - "src": "4355:16:8", + "referencedDeclaration": 1294, + "src": "4384:16:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", "typeString": "bytes32[] calldata" } }, - "id": 1164, + "id": 1323, "indexExpression": { "argumentTypes": null, - "id": 1163, + "id": 1322, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4372:1:8", + "referencedDeclaration": 1310, + "src": "4401:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3726,7 +3718,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4355:19:8", + "src": "4384:19:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3740,18 +3732,18 @@ "typeString": "bytes32" } ], - "id": 1161, + "id": 1320, "name": "isSpent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1132, - "src": "4347:7:8", + "referencedDeclaration": 1291, + "src": "4376:7:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$", "typeString": "function (bytes32) view returns (bool)" } }, - "id": 1165, + "id": 1324, "isConstant": false, "isLValue": false, "isPure": false, @@ -3759,25 +3751,25 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4347:28:8", + "src": "4376:28:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 1173, + "id": 1332, "nodeType": "IfStatement", - "src": "4343:68:8", + "src": "4372:68:5", "trueBody": { - "id": 1172, + "id": 1331, "nodeType": "Block", - "src": "4377:34:8", + "src": "4406:34:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1170, + "id": 1329, "isConstant": false, "isLValue": false, "isPure": false, @@ -3786,26 +3778,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1166, + "id": 1325, "name": "spent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1139, - "src": "4387:5:8", + "referencedDeclaration": 1298, + "src": "4416:5:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", "typeString": "bool[] memory" } }, - "id": 1168, + "id": 1327, "indexExpression": { "argumentTypes": null, - "id": 1167, + "id": 1326, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4393:1:8", + "referencedDeclaration": 1310, + "src": "4422:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3816,7 +3808,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4387:8:8", + "src": "4416:8:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3827,14 +3819,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1169, + "id": 1328, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "4398:4:8", + "src": "4427:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3842,15 +3834,15 @@ }, "value": "true" }, - "src": "4387:15:8", + "src": "4416:15:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1171, + "id": 1330, "nodeType": "ExpressionStatement", - "src": "4387:15:8" + "src": "4416:15:5" } ] } @@ -3863,19 +3855,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1157, + "id": 1316, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1154, + "id": 1313, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4301:1:8", + "referencedDeclaration": 1310, + "src": "4330:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3887,18 +3879,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1155, + "id": 1314, "name": "_nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1135, - "src": "4305:16:8", + "referencedDeclaration": 1294, + "src": "4334:16:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", "typeString": "bytes32[] calldata" } }, - "id": 1156, + "id": 1315, "isConstant": false, "isLValue": false, "isPure": false, @@ -3906,31 +3898,31 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4305:23:8", + "src": "4334:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4301:27:8", + "src": "4330:27:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1175, + "id": 1334, "initializationExpression": { "assignments": [ - 1151 + 1310 ], "declarations": [ { "constant": false, - "id": 1151, + "id": 1310, "name": "i", "nodeType": "VariableDeclaration", - "scope": 1175, - "src": "4289:6:8", + "scope": 1334, + "src": "4318:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3938,10 +3930,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1150, + "id": 1309, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4289:4:8", + "src": "4318:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3951,18 +3943,18 @@ "visibility": "internal" } ], - "id": 1153, + "id": 1312, "initialValue": { "argumentTypes": null, "hexValue": "30", - "id": 1152, + "id": 1311, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4298:1:8", + "src": "4327:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3971,12 +3963,12 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "4289:10:8" + "src": "4318:10:5" }, "loopExpression": { "expression": { "argumentTypes": null, - "id": 1159, + "id": 1318, "isConstant": false, "isLValue": false, "isPure": false, @@ -3984,15 +3976,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "4330:3:8", + "src": "4359:3:5", "subExpression": { "argumentTypes": null, - "id": 1158, + "id": 1317, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4330:1:8", + "referencedDeclaration": 1310, + "src": "4359:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4003,33 +3995,33 @@ "typeString": "uint256" } }, - "id": 1160, + "id": 1319, "nodeType": "ExpressionStatement", - "src": "4330:3:8" + "src": "4359:3:5" }, "nodeType": "ForStatement", - "src": "4285:132:8" + "src": "4314:132:5" } ] }, "documentation": "@dev whether an array of notes is already spent ", - "id": 1177, + "id": 1336, "implemented": true, "kind": "function", "modifiers": [], "name": "isSpentArray", "nodeType": "FunctionDefinition", "parameters": { - "id": 1136, + "id": 1295, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1135, + "id": 1294, "name": "_nullifierHashes", "nodeType": "VariableDeclaration", - "scope": 1177, - "src": "4150:35:8", + "scope": 1336, + "src": "4179:35:5", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -4038,19 +4030,19 @@ }, "typeName": { "baseType": { - "id": 1133, + "id": 1292, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4150:7:8", + "src": "4179:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 1134, + "id": 1293, "length": null, "nodeType": "ArrayTypeName", - "src": "4150:9:8", + "src": "4179:9:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", "typeString": "bytes32[]" @@ -4060,19 +4052,19 @@ "visibility": "internal" } ], - "src": "4149:37:8" + "src": "4178:37:5" }, "returnParameters": { - "id": 1140, + "id": 1299, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1139, + "id": 1298, "name": "spent", "nodeType": "VariableDeclaration", - "scope": 1177, - "src": "4209:19:8", + "scope": 1336, + "src": "4238:19:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -4081,19 +4073,19 @@ }, "typeName": { "baseType": { - "id": 1137, + "id": 1296, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4209:4:8", + "src": "4238:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1138, + "id": 1297, "length": null, "nodeType": "ArrayTypeName", - "src": "4209:6:8", + "src": "4238:6:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr", "typeString": "bool[]" @@ -4103,38 +4095,38 @@ "visibility": "internal" } ], - "src": "4208:21:8" + "src": "4237:21:5" }, - "scope": 1204, - "src": "4128:293:8", + "scope": 1363, + "src": "4157:293:5", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1190, + "id": 1349, "nodeType": "Block", - "src": "4719:45:8", + "src": "4748:45:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1188, + "id": 1347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 1184, + "id": 1343, "name": "verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "4725:8:8", + "referencedDeclaration": 1068, + "src": "4754:8:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -4145,12 +4137,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1186, + "id": 1345, "name": "_newVerifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1179, - "src": "4746:12:8", + "referencedDeclaration": 1338, + "src": "4775:12:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4164,18 +4156,18 @@ "typeString": "address" } ], - "id": 1185, + "id": 1344, "name": "IVerifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 882, - "src": "4736:9:8", + "referencedDeclaration": 1041, + "src": "4765:9:5", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IVerifier_$882_$", + "typeIdentifier": "t_type$_t_contract$_IVerifier_$1041_$", "typeString": "type(contract IVerifier)" } }, - "id": 1187, + "id": 1346, "isConstant": false, "isLValue": false, "isPure": false, @@ -4183,62 +4175,62 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4736:23:8", + "src": "4765:23:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "src": "4725:34:8", + "src": "4754:34:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "id": 1189, + "id": 1348, "nodeType": "ExpressionStatement", - "src": "4725:34:8" + "src": "4754:34:5" } ] }, "documentation": "@dev allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held.\nAfter that operator rights are supposed to be transferred to zero address", - "id": 1191, + "id": 1350, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 1182, + "id": 1341, "modifierName": { "argumentTypes": null, - "id": 1181, + "id": 1340, "name": "onlyOperator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 920, - "src": "4706:12:8", + "referencedDeclaration": 1084, + "src": "4735:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "4706:12:8" + "src": "4735:12:5" } ], "name": "updateVerifier", "nodeType": "FunctionDefinition", "parameters": { - "id": 1180, + "id": 1339, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1179, + "id": 1338, "name": "_newVerifier", "nodeType": "VariableDeclaration", - "scope": 1191, - "src": "4675:20:8", + "scope": 1350, + "src": "4704:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4246,10 +4238,10 @@ "typeString": "address" }, "typeName": { - "id": 1178, + "id": 1337, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4675:7:8", + "src": "4704:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4260,42 +4252,42 @@ "visibility": "internal" } ], - "src": "4674:22:8" + "src": "4703:22:5" }, "returnParameters": { - "id": 1183, + "id": 1342, "nodeType": "ParameterList", "parameters": [], - "src": "4719:0:8" + "src": "4748:0:5" }, - "scope": 1204, - "src": "4651:113:8", + "scope": 1363, + "src": "4680:113:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1202, + "id": 1361, "nodeType": "Block", - "src": "4882:34:8", + "src": "4911:34:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1200, + "id": 1359, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 1198, + "id": 1357, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "4888:8:8", + "referencedDeclaration": 1072, + "src": "4917:8:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4305,67 +4297,67 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 1199, + "id": 1358, "name": "_newOperator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1193, - "src": "4899:12:8", + "referencedDeclaration": 1352, + "src": "4928:12:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4888:23:8", + "src": "4917:23:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1201, + "id": 1360, "nodeType": "ExpressionStatement", - "src": "4888:23:8" + "src": "4917:23:5" } ] }, "documentation": "@dev operator can change his address ", - "id": 1203, + "id": 1362, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 1196, + "id": 1355, "modifierName": { "argumentTypes": null, - "id": 1195, + "id": 1354, "name": "onlyOperator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 920, - "src": "4869:12:8", + "referencedDeclaration": 1084, + "src": "4898:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "4869:12:8" + "src": "4898:12:5" } ], "name": "changeOperator", "nodeType": "FunctionDefinition", "parameters": { - "id": 1194, + "id": 1353, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1193, + "id": 1352, "name": "_newOperator", "nodeType": "VariableDeclaration", - "scope": 1203, - "src": "4838:20:8", + "scope": 1362, + "src": "4867:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4373,10 +4365,10 @@ "typeString": "address" }, "typeName": { - "id": 1192, + "id": 1351, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4838:7:8", + "src": "4867:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4387,39 +4379,39 @@ "visibility": "internal" } ], - "src": "4837:22:8" + "src": "4866:22:5" }, "returnParameters": { - "id": 1197, + "id": 1356, "nodeType": "ParameterList", "parameters": [], - "src": "4882:0:8" + "src": "4911:0:5" }, - "scope": 1204, - "src": "4814:102:8", + "scope": 1363, + "src": "4843:102:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], - "scope": 1205, - "src": "318:4600:8" + "scope": 1364, + "src": "383:4564:5" } ], - "src": "0:4919:8" + "src": "0:4948:5" }, "legacyAST": { "attributes": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "exportedSymbols": { "IFeeManager": [ - 888 + 1052 ], "IVerifier": [ - 882 + 1041 ], "Tornado": [ - 1204 + 1363 ] } }, @@ -4432,39 +4424,39 @@ ".17" ] }, - "id": 868, + "id": 1027, "name": "PragmaDirective", - "src": "0:23:8" + "src": "0:23:5" }, { "attributes": { - "SourceUnit": 686, + "SourceUnit": 839, "absolutePath": "/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol", "file": "./MerkleTreeWithHistory.sol", - "scope": 1205, + "scope": 1364, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 869, + "id": 1028, "name": "ImportDirective", - "src": "25:37:8" + "src": "25:37:5" }, { "attributes": { - "SourceUnit": 3256, + "SourceUnit": 1394, "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "scope": 1205, + "scope": 1364, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 870, + "id": 1029, "name": "ImportDirective", - "src": "63:59:8" + "src": "63:59:5" }, { "attributes": { @@ -4478,10 +4470,10 @@ "documentation": null, "fullyImplemented": false, "linearizedBaseContracts": [ - 882 + 1041 ], "name": "IVerifier", - "scope": 1205 + "scope": 1364 }, "children": [ { @@ -4495,7 +4487,7 @@ null ], "name": "verifyProof", - "scope": 882, + "scope": 1041, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -4507,7 +4499,7 @@ "attributes": { "constant": false, "name": "_proof", - "scope": 881, + "scope": 1040, "stateVariable": false, "storageLocation": "memory", "type": "bytes", @@ -4520,20 +4512,20 @@ "name": "bytes", "type": "bytes" }, - "id": 871, + "id": 1030, "name": "ElementaryTypeName", - "src": "168:5:8" + "src": "168:5:5" } ], - "id": 872, + "id": 1031, "name": "VariableDeclaration", - "src": "168:19:8" + "src": "168:19:5" }, { "attributes": { "constant": false, "name": "_input", - "scope": 881, + "scope": 1040, "stateVariable": false, "storageLocation": "memory", "type": "uint256[6]", @@ -4551,9 +4543,9 @@ "name": "uint256", "type": "uint256" }, - "id": 873, + "id": 1032, "name": "ElementaryTypeName", - "src": "189:7:8" + "src": "189:7:5" }, { "attributes": { @@ -4568,24 +4560,24 @@ "type": "int_const 6", "value": "6" }, - "id": 874, + "id": 1033, "name": "Literal", - "src": "197:1:8" + "src": "197:1:5" } ], - "id": 875, + "id": 1034, "name": "ArrayTypeName", - "src": "189:10:8" + "src": "189:10:5" } ], - "id": 876, + "id": 1035, "name": "VariableDeclaration", - "src": "189:24:8" + "src": "189:24:5" } ], - "id": 877, + "id": 1036, "name": "ParameterList", - "src": "167:47:8" + "src": "167:47:5" }, { "children": [ @@ -4593,7 +4585,7 @@ "attributes": { "constant": false, "name": "", - "scope": 881, + "scope": 1040, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -4606,29 +4598,29 @@ "name": "bool", "type": "bool" }, - "id": 878, + "id": 1037, "name": "ElementaryTypeName", - "src": "230:4:8" + "src": "230:4:5" } ], - "id": 879, + "id": 1038, "name": "VariableDeclaration", - "src": "230:4:8" + "src": "230:4:5" } ], - "id": 880, + "id": 1039, "name": "ParameterList", - "src": "229:6:8" + "src": "229:6:5" } ], - "id": 881, + "id": 1040, "name": "FunctionDefinition", - "src": "147:89:8" + "src": "147:89:5" } ], - "id": 882, + "id": 1041, "name": "ContractDefinition", - "src": "124:114:8" + "src": "124:114:5" }, { "attributes": { @@ -4642,10 +4634,10 @@ "documentation": null, "fullyImplemented": false, "linearizedBaseContracts": [ - 888 + 1052 ], "name": "IFeeManager", - "scope": 1205 + "scope": 1364 }, "children": [ { @@ -4659,7 +4651,7 @@ null ], "name": "feeTo", - "scope": 888, + "scope": 1052, "stateMutability": "view", "superFunction": null, "visibility": "external" @@ -4672,9 +4664,9 @@ ] }, "children": [], - "id": 883, + "id": 1042, "name": "ParameterList", - "src": "279:2:8" + "src": "279:2:5" }, { "children": [ @@ -4682,7 +4674,7 @@ "attributes": { "constant": false, "name": "", - "scope": 887, + "scope": 1046, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -4696,46 +4688,112 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 884, + "id": 1043, "name": "ElementaryTypeName", - "src": "305:7:8" + "src": "305:7:5" } ], - "id": 885, + "id": 1044, "name": "VariableDeclaration", - "src": "305:7:8" + "src": "305:7:5" } ], - "id": 886, + "id": 1045, "name": "ParameterList", - "src": "304:9:8" + "src": "304:9:5" } ], - "id": 887, + "id": 1046, "name": "FunctionDefinition", - "src": "265:49:8" + "src": "265:49:5" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "protocolFeeDivisor", + "scope": 1052, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1047, + "name": "ParameterList", + "src": "344:2:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1051, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1048, + "name": "ElementaryTypeName", + "src": "370:7:5" + } + ], + "id": 1049, + "name": "VariableDeclaration", + "src": "370:7:5" + } + ], + "id": 1050, + "name": "ParameterList", + "src": "369:9:5" + } + ], + "id": 1051, + "name": "FunctionDefinition", + "src": "317:62:5" } ], - "id": 888, + "id": 1052, "name": "ContractDefinition", - "src": "240:76:8" + "src": "240:141:5" }, { "attributes": { "contractDependencies": [ - 685, - 3255 + 838, + 1393 ], "contractKind": "contract", "documentation": null, "fullyImplemented": false, "linearizedBaseContracts": [ - 1204, - 3255, - 685 + 1363, + 1393, + 838 ], "name": "Tornado", - "scope": 1205 + "scope": 1364 }, "children": [ { @@ -4747,17 +4805,17 @@ "attributes": { "contractScope": null, "name": "MerkleTreeWithHistory", - "referencedDeclaration": 685, + "referencedDeclaration": 838, "type": "contract MerkleTreeWithHistory" }, - "id": 889, + "id": 1053, "name": "UserDefinedTypeName", - "src": "338:21:8" + "src": "403:21:5" } ], - "id": 890, + "id": 1054, "name": "InheritanceSpecifier", - "src": "338:21:8" + "src": "403:21:5" }, { "attributes": { @@ -4768,23 +4826,23 @@ "attributes": { "contractScope": null, "name": "ReentrancyGuard", - "referencedDeclaration": 3255, + "referencedDeclaration": 1393, "type": "contract ReentrancyGuard" }, - "id": 891, + "id": 1055, "name": "UserDefinedTypeName", - "src": "361:15:8" + "src": "426:15:5" } ], - "id": 892, + "id": 1056, "name": "InheritanceSpecifier", - "src": "361:15:8" + "src": "426:15:5" }, { "attributes": { "constant": false, "name": "denomination", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -4797,20 +4855,20 @@ "name": "uint256", "type": "uint256" }, - "id": 893, + "id": 1057, "name": "ElementaryTypeName", - "src": "381:7:8" + "src": "446:7:5" } ], - "id": 894, + "id": 1058, "name": "VariableDeclaration", - "src": "381:27:8" + "src": "446:27:5" }, { "attributes": { "constant": false, "name": "nullifierHashes", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => bool)", @@ -4828,34 +4886,34 @@ "name": "bytes32", "type": "bytes32" }, - "id": 895, + "id": 1059, "name": "ElementaryTypeName", - "src": "420:7:8" + "src": "485:7:5" }, { "attributes": { "name": "bool", "type": "bool" }, - "id": 896, + "id": 1060, "name": "ElementaryTypeName", - "src": "431:4:8" + "src": "496:4:5" } ], - "id": 897, + "id": 1061, "name": "Mapping", - "src": "412:24:8" + "src": "477:24:5" } ], - "id": 898, + "id": 1062, "name": "VariableDeclaration", - "src": "412:47:8" + "src": "477:47:5" }, { "attributes": { "constant": false, "name": "commitments", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => bool)", @@ -4873,34 +4931,34 @@ "name": "bytes32", "type": "bytes32" }, - "id": 899, + "id": 1063, "name": "ElementaryTypeName", - "src": "562:7:8" + "src": "627:7:5" }, { "attributes": { "name": "bool", "type": "bool" }, - "id": 900, + "id": 1064, "name": "ElementaryTypeName", - "src": "573:4:8" + "src": "638:4:5" } ], - "id": 901, + "id": 1065, "name": "Mapping", - "src": "554:24:8" + "src": "619:24:5" } ], - "id": 902, + "id": 1066, "name": "VariableDeclaration", - "src": "554:43:8" + "src": "619:43:5" }, { "attributes": { "constant": false, "name": "verifier", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "contract IVerifier", @@ -4912,23 +4970,23 @@ "attributes": { "contractScope": null, "name": "IVerifier", - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "contract IVerifier" }, - "id": 903, + "id": 1067, "name": "UserDefinedTypeName", - "src": "601:9:8" + "src": "666:9:5" } ], - "id": 904, + "id": 1068, "name": "VariableDeclaration", - "src": "601:25:8" + "src": "666:25:5" }, { "attributes": { "constant": false, "name": "feeManager", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "contract IFeeManager", @@ -4940,23 +4998,23 @@ "attributes": { "contractScope": null, "name": "IFeeManager", - "referencedDeclaration": 888, + "referencedDeclaration": 1052, "type": "contract IFeeManager" }, - "id": 905, + "id": 1069, "name": "UserDefinedTypeName", - "src": "630:11:8" + "src": "695:11:5" } ], - "id": 906, + "id": 1070, "name": "VariableDeclaration", - "src": "630:29:8" + "src": "695:29:5" }, { "attributes": { "constant": false, "name": "operator", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -4970,14 +5028,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 907, + "id": 1071, "name": "ElementaryTypeName", - "src": "819:7:8" + "src": "884:7:5" } ], - "id": 908, + "id": 1072, "name": "VariableDeclaration", - "src": "819:23:8" + "src": "884:23:5" }, { "attributes": { @@ -4993,9 +5051,9 @@ ] }, "children": [], - "id": 909, + "id": 1073, "name": "ParameterList", - "src": "868:0:8" + "src": "933:0:5" }, { "children": [ @@ -5029,16 +5087,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 910, + "id": 1074, "name": "Identifier", - "src": "874:7:8" + "src": "939:7:5" }, { "attributes": { @@ -5073,18 +5131,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3270, + "referencedDeclaration": 1408, "type": "msg", "value": "msg" }, - "id": 911, + "id": 1075, "name": "Identifier", - "src": "882:3:8" + "src": "947:3:5" } ], - "id": 912, + "id": 1076, "name": "MemberAccess", - "src": "882:10:8" + "src": "947:10:5" }, { "attributes": { @@ -5092,18 +5150,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 908, + "referencedDeclaration": 1072, "type": "address", "value": "operator" }, - "id": 913, + "id": 1077, "name": "Identifier", - "src": "896:8:8" + "src": "961:8:5" } ], - "id": 914, + "id": 1078, "name": "BinaryOperation", - "src": "882:22:8" + "src": "947:22:5" }, { "attributes": { @@ -5118,34 +5176,34 @@ "type": "literal_string \"Only operator can call this function.\"", "value": "Only operator can call this function." }, - "id": 915, + "id": 1079, "name": "Literal", - "src": "906:39:8" + "src": "971:39:5" } ], - "id": 916, + "id": 1080, "name": "FunctionCall", - "src": "874:72:8" + "src": "939:72:5" } ], - "id": 917, + "id": 1081, "name": "ExpressionStatement", - "src": "874:72:8" + "src": "939:72:5" }, { - "id": 918, + "id": 1082, "name": "PlaceholderStatement", - "src": "952:1:8" + "src": "1017:1:5" } ], - "id": 919, + "id": 1083, "name": "Block", - "src": "868:90:8" + "src": "933:90:5" } ], - "id": 920, + "id": 1084, "name": "ModifierDefinition", - "src": "846:112:8" + "src": "911:112:5" }, { "attributes": { @@ -5161,7 +5219,7 @@ "constant": false, "indexed": true, "name": "commitment", - "scope": 928, + "scope": 1092, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5174,21 +5232,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 921, + "id": 1085, "name": "ElementaryTypeName", - "src": "976:7:8" + "src": "1041:7:5" } ], - "id": 922, + "id": 1086, "name": "VariableDeclaration", - "src": "976:26:8" + "src": "1041:26:5" }, { "attributes": { "constant": false, "indexed": false, "name": "leafIndex", - "scope": 928, + "scope": 1092, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -5201,21 +5259,21 @@ "name": "uint32", "type": "uint32" }, - "id": 923, + "id": 1087, "name": "ElementaryTypeName", - "src": "1004:6:8" + "src": "1069:6:5" } ], - "id": 924, + "id": 1088, "name": "VariableDeclaration", - "src": "1004:16:8" + "src": "1069:16:5" }, { "attributes": { "constant": false, "indexed": false, "name": "timestamp", - "scope": 928, + "scope": 1092, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5228,24 +5286,24 @@ "name": "uint256", "type": "uint256" }, - "id": 925, + "id": 1089, "name": "ElementaryTypeName", - "src": "1022:7:8" + "src": "1087:7:5" } ], - "id": 926, + "id": 1090, "name": "VariableDeclaration", - "src": "1022:17:8" + "src": "1087:17:5" } ], - "id": 927, + "id": 1091, "name": "ParameterList", - "src": "975:65:8" + "src": "1040:65:5" } ], - "id": 928, + "id": 1092, "name": "EventDefinition", - "src": "962:79:8" + "src": "1027:79:5" }, { "attributes": { @@ -5261,7 +5319,7 @@ "constant": false, "indexed": false, "name": "to", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5275,21 +5333,21 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 929, + "id": 1093, "name": "ElementaryTypeName", - "src": "1061:7:8" + "src": "1126:7:5" } ], - "id": 930, + "id": 1094, "name": "VariableDeclaration", - "src": "1061:10:8" + "src": "1126:10:5" }, { "attributes": { "constant": false, "indexed": false, "name": "nullifierHash", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5302,21 +5360,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 931, + "id": 1095, "name": "ElementaryTypeName", - "src": "1073:7:8" + "src": "1138:7:5" } ], - "id": 932, + "id": 1096, "name": "VariableDeclaration", - "src": "1073:21:8" + "src": "1138:21:5" }, { "attributes": { "constant": false, "indexed": true, "name": "relayer", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5330,21 +5388,21 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 933, + "id": 1097, "name": "ElementaryTypeName", - "src": "1096:7:8" + "src": "1161:7:5" } ], - "id": 934, + "id": 1098, "name": "VariableDeclaration", - "src": "1096:23:8" + "src": "1161:23:5" }, { "attributes": { "constant": false, "indexed": false, "name": "fee", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5357,24 +5415,24 @@ "name": "uint256", "type": "uint256" }, - "id": 935, + "id": 1099, "name": "ElementaryTypeName", - "src": "1121:7:8" + "src": "1186:7:5" } ], - "id": 936, + "id": 1100, "name": "VariableDeclaration", - "src": "1121:11:8" + "src": "1186:11:5" } ], - "id": 937, + "id": 1101, "name": "ParameterList", - "src": "1060:73:8" + "src": "1125:73:5" } ], - "id": 938, + "id": 1102, "name": "EventDefinition", - "src": "1044:90:8" + "src": "1109:90:5" }, { "attributes": { @@ -5383,7 +5441,7 @@ "isConstructor": true, "kind": "constructor", "name": "", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -5395,7 +5453,7 @@ "attributes": { "constant": false, "name": "_verifier", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "contract IVerifier", @@ -5407,23 +5465,23 @@ "attributes": { "contractScope": null, "name": "IVerifier", - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "contract IVerifier" }, - "id": 939, + "id": 1103, "name": "UserDefinedTypeName", - "src": "1450:9:8" + "src": "1515:9:5" } ], - "id": 940, + "id": 1104, "name": "VariableDeclaration", - "src": "1450:19:8" + "src": "1515:19:5" }, { "attributes": { "constant": false, "name": "_feeManager", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "contract IFeeManager", @@ -5435,23 +5493,23 @@ "attributes": { "contractScope": null, "name": "IFeeManager", - "referencedDeclaration": 888, + "referencedDeclaration": 1052, "type": "contract IFeeManager" }, - "id": 941, + "id": 1105, "name": "UserDefinedTypeName", - "src": "1475:11:8" + "src": "1540:11:5" } ], - "id": 942, + "id": 1106, "name": "VariableDeclaration", - "src": "1475:23:8" + "src": "1540:23:5" }, { "attributes": { "constant": false, "name": "_denomination", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5464,20 +5522,20 @@ "name": "uint256", "type": "uint256" }, - "id": 943, + "id": 1107, "name": "ElementaryTypeName", - "src": "1504:7:8" + "src": "1569:7:5" } ], - "id": 944, + "id": 1108, "name": "VariableDeclaration", - "src": "1504:21:8" + "src": "1569:21:5" }, { "attributes": { "constant": false, "name": "_merkleTreeHeight", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -5490,20 +5548,20 @@ "name": "uint32", "type": "uint32" }, - "id": 945, + "id": 1109, "name": "ElementaryTypeName", - "src": "1531:6:8" + "src": "1596:6:5" } ], - "id": 946, + "id": 1110, "name": "VariableDeclaration", - "src": "1531:24:8" + "src": "1596:24:5" }, { "attributes": { "constant": false, "name": "_operator", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5517,19 +5575,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 947, + "id": 1111, "name": "ElementaryTypeName", - "src": "1561:7:8" + "src": "1626:7:5" } ], - "id": 948, + "id": 1112, "name": "VariableDeclaration", - "src": "1561:17:8" + "src": "1626:17:5" } ], - "id": 949, + "id": 1113, "name": "ParameterList", - "src": "1444:138:8" + "src": "1509:138:5" }, { "attributes": { @@ -5538,9 +5596,9 @@ ] }, "children": [], - "id": 953, + "id": 1117, "name": "ParameterList", - "src": "1631:0:8" + "src": "1696:0:5" }, { "children": [ @@ -5550,13 +5608,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 685, + "referencedDeclaration": 838, "type": "type(contract MerkleTreeWithHistory)", "value": "MerkleTreeWithHistory" }, - "id": 950, + "id": 1114, "name": "Identifier", - "src": "1583:21:8" + "src": "1648:21:5" }, { "attributes": { @@ -5564,18 +5622,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 946, + "referencedDeclaration": 1110, "type": "uint32", "value": "_merkleTreeHeight" }, - "id": 951, + "id": 1115, "name": "Identifier", - "src": "1605:17:8" + "src": "1670:17:5" } ], - "id": 952, + "id": 1116, "name": "ModifierInvocation", - "src": "1583:40:8" + "src": "1648:40:5" }, { "children": [ @@ -5609,16 +5667,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 954, + "id": 1118, "name": "Identifier", - "src": "1637:7:8" + "src": "1702:7:5" }, { "attributes": { @@ -5641,13 +5699,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 944, + "referencedDeclaration": 1108, "type": "uint256", "value": "_denomination" }, - "id": 955, + "id": 1119, "name": "Identifier", - "src": "1645:13:8" + "src": "1710:13:5" }, { "attributes": { @@ -5662,14 +5720,14 @@ "type": "int_const 0", "value": "0" }, - "id": 956, + "id": 1120, "name": "Literal", - "src": "1661:1:8" + "src": "1726:1:5" } ], - "id": 957, + "id": 1121, "name": "BinaryOperation", - "src": "1645:17:8" + "src": "1710:17:5" }, { "attributes": { @@ -5684,19 +5742,19 @@ "type": "literal_string \"denomination should be greater than 0\"", "value": "denomination should be greater than 0" }, - "id": 958, + "id": 1122, "name": "Literal", - "src": "1664:39:8" + "src": "1729:39:5" } ], - "id": 959, + "id": 1123, "name": "FunctionCall", - "src": "1637:67:8" + "src": "1702:67:5" } ], - "id": 960, + "id": 1124, "name": "ExpressionStatement", - "src": "1637:67:8" + "src": "1702:67:5" }, { "children": [ @@ -5717,13 +5775,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 904, + "referencedDeclaration": 1068, "type": "contract IVerifier", "value": "verifier" }, - "id": 961, + "id": 1125, "name": "Identifier", - "src": "1710:8:8" + "src": "1775:8:5" }, { "attributes": { @@ -5731,23 +5789,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 940, + "referencedDeclaration": 1104, "type": "contract IVerifier", "value": "_verifier" }, - "id": 962, + "id": 1126, "name": "Identifier", - "src": "1721:9:8" + "src": "1786:9:5" } ], - "id": 963, + "id": 1127, "name": "Assignment", - "src": "1710:20:8" + "src": "1775:20:5" } ], - "id": 964, + "id": 1128, "name": "ExpressionStatement", - "src": "1710:20:8" + "src": "1775:20:5" }, { "children": [ @@ -5768,13 +5826,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 906, + "referencedDeclaration": 1070, "type": "contract IFeeManager", "value": "feeManager" }, - "id": 965, + "id": 1129, "name": "Identifier", - "src": "1736:10:8" + "src": "1801:10:5" }, { "attributes": { @@ -5782,23 +5840,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 942, + "referencedDeclaration": 1106, "type": "contract IFeeManager", "value": "_feeManager" }, - "id": 966, + "id": 1130, "name": "Identifier", - "src": "1749:11:8" + "src": "1814:11:5" } ], - "id": 967, + "id": 1131, "name": "Assignment", - "src": "1736:24:8" + "src": "1801:24:5" } ], - "id": 968, + "id": 1132, "name": "ExpressionStatement", - "src": "1736:24:8" + "src": "1801:24:5" }, { "children": [ @@ -5819,13 +5877,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 908, + "referencedDeclaration": 1072, "type": "address", "value": "operator" }, - "id": 969, + "id": 1133, "name": "Identifier", - "src": "1766:8:8" + "src": "1831:8:5" }, { "attributes": { @@ -5833,23 +5891,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 948, + "referencedDeclaration": 1112, "type": "address", "value": "_operator" }, - "id": 970, + "id": 1134, "name": "Identifier", - "src": "1777:9:8" + "src": "1842:9:5" } ], - "id": 971, + "id": 1135, "name": "Assignment", - "src": "1766:20:8" + "src": "1831:20:5" } ], - "id": 972, + "id": 1136, "name": "ExpressionStatement", - "src": "1766:20:8" + "src": "1831:20:5" }, { "children": [ @@ -5870,13 +5928,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 894, + "referencedDeclaration": 1058, "type": "uint256", "value": "denomination" }, - "id": 973, + "id": 1137, "name": "Identifier", - "src": "1792:12:8" + "src": "1857:12:5" }, { "attributes": { @@ -5884,33 +5942,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 944, + "referencedDeclaration": 1108, "type": "uint256", "value": "_denomination" }, - "id": 974, + "id": 1138, "name": "Identifier", - "src": "1807:13:8" + "src": "1872:13:5" } ], - "id": 975, + "id": 1139, "name": "Assignment", - "src": "1792:28:8" + "src": "1857:28:5" } ], - "id": 976, + "id": 1140, "name": "ExpressionStatement", - "src": "1792:28:8" + "src": "1857:28:5" } ], - "id": 977, + "id": 1141, "name": "Block", - "src": "1631:194:8" + "src": "1696:194:5" } ], - "id": 978, + "id": 1142, "name": "FunctionDefinition", - "src": "1433:392:8" + "src": "1498:392:5" }, { "attributes": { @@ -5919,7 +5977,7 @@ "isConstructor": false, "kind": "function", "name": "deposit", - "scope": 1204, + "scope": 1363, "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -5931,7 +5989,7 @@ "attributes": { "constant": false, "name": "_commitment", - "scope": 1016, + "scope": 1180, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5944,19 +6002,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 979, + "id": 1143, "name": "ElementaryTypeName", - "src": "2090:7:8" + "src": "2155:7:5" } ], - "id": 980, + "id": 1144, "name": "VariableDeclaration", - "src": "2090:19:8" + "src": "2155:19:5" } ], - "id": 981, + "id": 1145, "name": "ParameterList", - "src": "2089:21:8" + "src": "2154:21:5" }, { "attributes": { @@ -5965,9 +6023,9 @@ ] }, "children": [], - "id": 984, + "id": 1148, "name": "ParameterList", - "src": "2141:0:8" + "src": "2206:0:5" }, { "attributes": { @@ -5980,18 +6038,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3254, + "referencedDeclaration": 1392, "type": "modifier ()", "value": "nonReentrant" }, - "id": 982, + "id": 1146, "name": "Identifier", - "src": "2128:12:8" + "src": "2193:12:5" } ], - "id": 983, + "id": 1147, "name": "ModifierInvocation", - "src": "2128:12:8" + "src": "2193:12:5" }, { "children": [ @@ -6025,16 +6083,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 985, + "id": 1149, "name": "Identifier", - "src": "2147:7:8" + "src": "2212:7:5" }, { "attributes": { @@ -6064,13 +6122,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 902, + "referencedDeclaration": 1066, "type": "mapping(bytes32 => bool)", "value": "commitments" }, - "id": 986, + "id": 1150, "name": "Identifier", - "src": "2156:11:8" + "src": "2221:11:5" }, { "attributes": { @@ -6078,23 +6136,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 987, + "id": 1151, "name": "Identifier", - "src": "2168:11:8" + "src": "2233:11:5" } ], - "id": 988, + "id": 1152, "name": "IndexAccess", - "src": "2156:24:8" + "src": "2221:24:5" } ], - "id": 989, + "id": 1153, "name": "UnaryOperation", - "src": "2155:25:8" + "src": "2220:25:5" }, { "attributes": { @@ -6109,24 +6167,24 @@ "type": "literal_string \"The commitment has been submitted\"", "value": "The commitment has been submitted" }, - "id": 990, + "id": 1154, "name": "Literal", - "src": "2182:35:8" + "src": "2247:35:5" } ], - "id": 991, + "id": 1155, "name": "FunctionCall", - "src": "2147:71:8" + "src": "2212:71:5" } ], - "id": 992, + "id": 1156, "name": "ExpressionStatement", - "src": "2147:71:8" + "src": "2212:71:5" }, { "attributes": { "assignments": [ - 994 + 1158 ] }, "children": [ @@ -6134,7 +6192,7 @@ "attributes": { "constant": false, "name": "insertedIndex", - "scope": 1015, + "scope": 1179, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -6147,14 +6205,14 @@ "name": "uint32", "type": "uint32" }, - "id": 993, + "id": 1157, "name": "ElementaryTypeName", - "src": "2225:6:8" + "src": "2290:6:5" } ], - "id": 994, + "id": 1158, "name": "VariableDeclaration", - "src": "2225:20:8" + "src": "2290:20:5" }, { "attributes": { @@ -6182,13 +6240,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 627, + "referencedDeclaration": 780, "type": "function (bytes32) returns (uint32)", "value": "_insert" }, - "id": 995, + "id": 1159, "name": "Identifier", - "src": "2248:7:8" + "src": "2313:7:5" }, { "attributes": { @@ -6196,23 +6254,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 996, + "id": 1160, "name": "Identifier", - "src": "2256:11:8" + "src": "2321:11:5" } ], - "id": 997, + "id": 1161, "name": "FunctionCall", - "src": "2248:20:8" + "src": "2313:20:5" } ], - "id": 998, + "id": 1162, "name": "VariableDeclarationStatement", - "src": "2225:43:8" + "src": "2290:43:5" }, { "children": [ @@ -6243,13 +6301,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 902, + "referencedDeclaration": 1066, "type": "mapping(bytes32 => bool)", "value": "commitments" }, - "id": 999, + "id": 1163, "name": "Identifier", - "src": "2274:11:8" + "src": "2339:11:5" }, { "attributes": { @@ -6257,18 +6315,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 1000, + "id": 1164, "name": "Identifier", - "src": "2286:11:8" + "src": "2351:11:5" } ], - "id": 1001, + "id": 1165, "name": "IndexAccess", - "src": "2274:24:8" + "src": "2339:24:5" }, { "attributes": { @@ -6283,19 +6341,19 @@ "type": "bool", "value": "true" }, - "id": 1002, + "id": 1166, "name": "Literal", - "src": "2301:4:8" + "src": "2366:4:5" } ], - "id": 1003, + "id": 1167, "name": "Assignment", - "src": "2274:31:8" + "src": "2339:31:5" } ], - "id": 1004, + "id": 1168, "name": "ExpressionStatement", - "src": "2274:31:8" + "src": "2339:31:5" }, { "children": [ @@ -6325,23 +6383,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1019, + "referencedDeclaration": 1183, "type": "function ()", "value": "_processDeposit" }, - "id": 1005, + "id": 1169, "name": "Identifier", - "src": "2311:15:8" + "src": "2376:15:5" } ], - "id": 1006, + "id": 1170, "name": "FunctionCall", - "src": "2311:17:8" + "src": "2376:17:5" } ], - "id": 1007, + "id": 1171, "name": "ExpressionStatement", - "src": "2311:17:8" + "src": "2376:17:5" }, { "children": [ @@ -6379,13 +6437,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 928, + "referencedDeclaration": 1092, "type": "function (bytes32,uint32,uint256)", "value": "Deposit" }, - "id": 1008, + "id": 1172, "name": "Identifier", - "src": "2340:7:8" + "src": "2405:7:5" }, { "attributes": { @@ -6393,13 +6451,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 1009, + "id": 1173, "name": "Identifier", - "src": "2348:11:8" + "src": "2413:11:5" }, { "attributes": { @@ -6407,13 +6465,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 994, + "referencedDeclaration": 1158, "type": "uint32", "value": "insertedIndex" }, - "id": 1010, + "id": 1174, "name": "Identifier", - "src": "2361:13:8" + "src": "2426:13:5" }, { "attributes": { @@ -6433,38 +6491,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3260, + "referencedDeclaration": 1398, "type": "block", "value": "block" }, - "id": 1011, + "id": 1175, "name": "Identifier", - "src": "2376:5:8" + "src": "2441:5:5" } ], - "id": 1012, + "id": 1176, "name": "MemberAccess", - "src": "2376:15:8" + "src": "2441:15:5" } ], - "id": 1013, + "id": 1177, "name": "FunctionCall", - "src": "2340:52:8" + "src": "2405:52:5" } ], - "id": 1014, + "id": 1178, "name": "EmitStatement", - "src": "2335:57:8" + "src": "2400:57:5" } ], - "id": 1015, + "id": 1179, "name": "Block", - "src": "2141:256:8" + "src": "2206:256:5" } ], - "id": 1016, + "id": 1180, "name": "FunctionDefinition", - "src": "2073:324:8" + "src": "2138:324:5" }, { "attributes": { @@ -6477,7 +6535,7 @@ null ], "name": "_processDeposit", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" @@ -6490,9 +6548,9 @@ ] }, "children": [], - "id": 1017, + "id": 1181, "name": "ParameterList", - "src": "2484:2:8" + "src": "2549:2:5" }, { "attributes": { @@ -6501,14 +6559,14 @@ ] }, "children": [], - "id": 1018, + "id": 1182, "name": "ParameterList", - "src": "2495:0:8" + "src": "2560:0:5" } ], - "id": 1019, + "id": 1183, "name": "FunctionDefinition", - "src": "2460:36:8" + "src": "2525:36:5" }, { "attributes": { @@ -6517,7 +6575,7 @@ "isConstructor": false, "kind": "function", "name": "withdraw", - "scope": 1204, + "scope": 1363, "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -6529,7 +6587,7 @@ "attributes": { "constant": false, "name": "_proof", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "calldata", "type": "bytes", @@ -6542,20 +6600,20 @@ "name": "bytes", "type": "bytes" }, - "id": 1020, + "id": 1184, "name": "ElementaryTypeName", - "src": "2911:5:8" + "src": "2976:5:5" } ], - "id": 1021, + "id": 1185, "name": "VariableDeclaration", - "src": "2911:21:8" + "src": "2976:21:5" }, { "attributes": { "constant": false, "name": "_root", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -6568,20 +6626,20 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1022, + "id": 1186, "name": "ElementaryTypeName", - "src": "2934:7:8" + "src": "2999:7:5" } ], - "id": 1023, + "id": 1187, "name": "VariableDeclaration", - "src": "2934:13:8" + "src": "2999:13:5" }, { "attributes": { "constant": false, "name": "_nullifierHash", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -6594,20 +6652,20 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1024, + "id": 1188, "name": "ElementaryTypeName", - "src": "2949:7:8" + "src": "3014:7:5" } ], - "id": 1025, + "id": 1189, "name": "VariableDeclaration", - "src": "2949:22:8" + "src": "3014:22:5" }, { "attributes": { "constant": false, "name": "_recipient", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -6621,20 +6679,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1026, + "id": 1190, "name": "ElementaryTypeName", - "src": "2973:15:8" + "src": "3038:15:5" } ], - "id": 1027, + "id": 1191, "name": "VariableDeclaration", - "src": "2973:26:8" + "src": "3038:26:5" }, { "attributes": { "constant": false, "name": "_relayer", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -6648,20 +6706,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1028, + "id": 1192, "name": "ElementaryTypeName", - "src": "3001:15:8" + "src": "3066:15:5" } ], - "id": 1029, + "id": 1193, "name": "VariableDeclaration", - "src": "3001:24:8" + "src": "3066:24:5" }, { "attributes": { "constant": false, "name": "_fee", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -6674,20 +6732,20 @@ "name": "uint256", "type": "uint256" }, - "id": 1030, + "id": 1194, "name": "ElementaryTypeName", - "src": "3027:7:8" + "src": "3092:7:5" } ], - "id": 1031, + "id": 1195, "name": "VariableDeclaration", - "src": "3027:12:8" + "src": "3092:12:5" }, { "attributes": { "constant": false, "name": "_refund", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -6700,19 +6758,19 @@ "name": "uint256", "type": "uint256" }, - "id": 1032, + "id": 1196, "name": "ElementaryTypeName", - "src": "3041:7:8" + "src": "3106:7:5" } ], - "id": 1033, + "id": 1197, "name": "VariableDeclaration", - "src": "3041:15:8" + "src": "3106:15:5" } ], - "id": 1034, + "id": 1198, "name": "ParameterList", - "src": "2910:147:8" + "src": "2975:147:5" }, { "attributes": { @@ -6721,9 +6779,9 @@ ] }, "children": [], - "id": 1037, + "id": 1201, "name": "ParameterList", - "src": "3088:0:8" + "src": "3153:0:5" }, { "attributes": { @@ -6736,18 +6794,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3254, + "referencedDeclaration": 1392, "type": "modifier ()", "value": "nonReentrant" }, - "id": 1035, + "id": 1199, "name": "Identifier", - "src": "3075:12:8" + "src": "3140:12:5" } ], - "id": 1036, + "id": 1200, "name": "ModifierInvocation", - "src": "3075:12:8" + "src": "3140:12:5" }, { "children": [ @@ -6781,16 +6839,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1038, + "id": 1202, "name": "Identifier", - "src": "3094:7:8" + "src": "3159:7:5" }, { "attributes": { @@ -6813,13 +6871,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1039, + "id": 1203, "name": "Identifier", - "src": "3102:4:8" + "src": "3167:4:5" }, { "attributes": { @@ -6827,18 +6885,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 894, + "referencedDeclaration": 1058, "type": "uint256", "value": "denomination" }, - "id": 1040, + "id": 1204, "name": "Identifier", - "src": "3110:12:8" + "src": "3175:12:5" } ], - "id": 1041, + "id": 1205, "name": "BinaryOperation", - "src": "3102:20:8" + "src": "3167:20:5" }, { "attributes": { @@ -6853,19 +6911,19 @@ "type": "literal_string \"Fee exceeds transfer value\"", "value": "Fee exceeds transfer value" }, - "id": 1042, + "id": 1206, "name": "Literal", - "src": "3124:28:8" + "src": "3189:28:5" } ], - "id": 1043, + "id": 1207, "name": "FunctionCall", - "src": "3094:59:8" + "src": "3159:59:5" } ], - "id": 1044, + "id": 1208, "name": "ExpressionStatement", - "src": "3094:59:8" + "src": "3159:59:5" }, { "children": [ @@ -6897,16 +6955,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1045, + "id": 1209, "name": "Identifier", - "src": "3159:7:8" + "src": "3224:7:5" }, { "attributes": { @@ -6936,13 +6994,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 898, + "referencedDeclaration": 1062, "type": "mapping(bytes32 => bool)", "value": "nullifierHashes" }, - "id": 1046, + "id": 1210, "name": "Identifier", - "src": "3168:15:8" + "src": "3233:15:5" }, { "attributes": { @@ -6950,23 +7008,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1047, + "id": 1211, "name": "Identifier", - "src": "3184:14:8" + "src": "3249:14:5" } ], - "id": 1048, + "id": 1212, "name": "IndexAccess", - "src": "3168:31:8" + "src": "3233:31:5" } ], - "id": 1049, + "id": 1213, "name": "UnaryOperation", - "src": "3167:32:8" + "src": "3232:32:5" }, { "attributes": { @@ -6981,19 +7039,19 @@ "type": "literal_string \"The note has been already spent\"", "value": "The note has been already spent" }, - "id": 1050, + "id": 1214, "name": "Literal", - "src": "3201:33:8" + "src": "3266:33:5" } ], - "id": 1051, + "id": 1215, "name": "FunctionCall", - "src": "3159:76:8" + "src": "3224:76:5" } ], - "id": 1052, + "id": 1216, "name": "ExpressionStatement", - "src": "3159:76:8" + "src": "3224:76:5" }, { "children": [ @@ -7025,16 +7083,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1053, + "id": 1217, "name": "Identifier", - "src": "3241:7:8" + "src": "3306:7:5" }, { "attributes": { @@ -7062,13 +7120,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 674, + "referencedDeclaration": 827, "type": "function (bytes32) view returns (bool)", "value": "isKnownRoot" }, - "id": 1054, + "id": 1218, "name": "Identifier", - "src": "3249:11:8" + "src": "3314:11:5" }, { "attributes": { @@ -7076,18 +7134,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1023, + "referencedDeclaration": 1187, "type": "bytes32", "value": "_root" }, - "id": 1055, + "id": 1219, "name": "Identifier", - "src": "3261:5:8" + "src": "3326:5:5" } ], - "id": 1056, + "id": 1220, "name": "FunctionCall", - "src": "3249:18:8" + "src": "3314:18:5" }, { "attributes": { @@ -7102,19 +7160,19 @@ "type": "literal_string \"Cannot find your merkle root\"", "value": "Cannot find your merkle root" }, - "id": 1057, + "id": 1221, "name": "Literal", - "src": "3269:30:8" + "src": "3334:30:5" } ], - "id": 1058, + "id": 1222, "name": "FunctionCall", - "src": "3241:59:8" + "src": "3306:59:5" } ], - "id": 1059, + "id": 1223, "name": "ExpressionStatement", - "src": "3241:59:8" + "src": "3306:59:5" }, { "children": [ @@ -7146,16 +7204,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1060, + "id": 1224, "name": "Identifier", - "src": "3339:7:8" + "src": "3404:7:5" }, { "attributes": { @@ -7189,7 +7247,7 @@ "isPure": false, "lValueRequested": false, "member_name": "verifyProof", - "referencedDeclaration": 881, + "referencedDeclaration": 1040, "type": "function (bytes memory,uint256[6] memory) external returns (bool)" }, "children": [ @@ -7199,18 +7257,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 904, + "referencedDeclaration": 1068, "type": "contract IVerifier", "value": "verifier" }, - "id": 1061, + "id": 1225, "name": "Identifier", - "src": "3347:8:8" + "src": "3412:8:5" } ], - "id": 1062, + "id": 1226, "name": "MemberAccess", - "src": "3347:20:8" + "src": "3412:20:5" }, { "attributes": { @@ -7218,13 +7276,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1021, + "referencedDeclaration": 1185, "type": "bytes calldata", "value": "_proof" }, - "id": 1063, + "id": 1227, "name": "Identifier", - "src": "3368:6:8" + "src": "3433:6:5" }, { "attributes": { @@ -7267,9 +7325,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1064, + "id": 1228, "name": "ElementaryTypeNameExpression", - "src": "3377:7:8" + "src": "3442:7:5" }, { "attributes": { @@ -7277,18 +7335,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1023, + "referencedDeclaration": 1187, "type": "bytes32", "value": "_root" }, - "id": 1065, + "id": 1229, "name": "Identifier", - "src": "3385:5:8" + "src": "3450:5:5" } ], - "id": 1066, + "id": 1230, "name": "FunctionCall", - "src": "3377:14:8" + "src": "3442:14:5" }, { "attributes": { @@ -7320,9 +7378,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1067, + "id": 1231, "name": "ElementaryTypeNameExpression", - "src": "3393:7:8" + "src": "3458:7:5" }, { "attributes": { @@ -7330,18 +7388,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1068, + "id": 1232, "name": "Identifier", - "src": "3401:14:8" + "src": "3466:14:5" } ], - "id": 1069, + "id": 1233, "name": "FunctionCall", - "src": "3393:23:8" + "src": "3458:23:5" }, { "attributes": { @@ -7373,9 +7431,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1070, + "id": 1234, "name": "ElementaryTypeNameExpression", - "src": "3418:7:8" + "src": "3483:7:5" }, { "attributes": { @@ -7383,18 +7441,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1027, + "referencedDeclaration": 1191, "type": "address payable", "value": "_recipient" }, - "id": 1071, + "id": 1235, "name": "Identifier", - "src": "3426:10:8" + "src": "3491:10:5" } ], - "id": 1072, + "id": 1236, "name": "FunctionCall", - "src": "3418:19:8" + "src": "3483:19:5" }, { "attributes": { @@ -7426,9 +7484,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1073, + "id": 1237, "name": "ElementaryTypeNameExpression", - "src": "3439:7:8" + "src": "3504:7:5" }, { "attributes": { @@ -7436,18 +7494,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1029, + "referencedDeclaration": 1193, "type": "address payable", "value": "_relayer" }, - "id": 1074, + "id": 1238, "name": "Identifier", - "src": "3447:8:8" + "src": "3512:8:5" } ], - "id": 1075, + "id": 1239, "name": "FunctionCall", - "src": "3439:17:8" + "src": "3504:17:5" }, { "attributes": { @@ -7455,13 +7513,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1076, + "id": 1240, "name": "Identifier", - "src": "3458:4:8" + "src": "3523:4:5" }, { "attributes": { @@ -7469,23 +7527,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1033, + "referencedDeclaration": 1197, "type": "uint256", "value": "_refund" }, - "id": 1077, + "id": 1241, "name": "Identifier", - "src": "3464:7:8" + "src": "3529:7:5" } ], - "id": 1078, + "id": 1242, "name": "TupleExpression", - "src": "3376:96:8" + "src": "3441:96:5" } ], - "id": 1079, + "id": 1243, "name": "FunctionCall", - "src": "3347:126:8" + "src": "3412:126:5" }, { "attributes": { @@ -7500,19 +7558,19 @@ "type": "literal_string \"Invalid withdraw proof\"", "value": "Invalid withdraw proof" }, - "id": 1080, + "id": 1244, "name": "Literal", - "src": "3475:24:8" + "src": "3540:24:5" } ], - "id": 1081, + "id": 1245, "name": "FunctionCall", - "src": "3339:161:8" + "src": "3404:161:5" } ], - "id": 1082, + "id": 1246, "name": "ExpressionStatement", - "src": "3339:161:8" + "src": "3404:161:5" }, { "children": [ @@ -7543,13 +7601,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 898, + "referencedDeclaration": 1062, "type": "mapping(bytes32 => bool)", "value": "nullifierHashes" }, - "id": 1083, + "id": 1247, "name": "Identifier", - "src": "3507:15:8" + "src": "3572:15:5" }, { "attributes": { @@ -7557,18 +7615,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1084, + "id": 1248, "name": "Identifier", - "src": "3523:14:8" + "src": "3588:14:5" } ], - "id": 1085, + "id": 1249, "name": "IndexAccess", - "src": "3507:31:8" + "src": "3572:31:5" }, { "attributes": { @@ -7583,19 +7641,19 @@ "type": "bool", "value": "true" }, - "id": 1086, + "id": 1250, "name": "Literal", - "src": "3541:4:8" + "src": "3606:4:5" } ], - "id": 1087, + "id": 1251, "name": "Assignment", - "src": "3507:38:8" + "src": "3572:38:5" } ], - "id": 1088, + "id": 1252, "name": "ExpressionStatement", - "src": "3507:38:8" + "src": "3572:38:5" }, { "children": [ @@ -7632,22 +7690,18 @@ { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" } ], "overloadedDeclarations": [ null ], - "referencedDeclaration": 1120, - "type": "function (address payable,address payable,uint256,uint256,address)", + "referencedDeclaration": 1279, + "type": "function (address payable,address payable,uint256,uint256)", "value": "_processWithdraw" }, - "id": 1089, + "id": 1253, "name": "Identifier", - "src": "3551:16:8" + "src": "3616:16:5" }, { "attributes": { @@ -7655,13 +7709,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1027, + "referencedDeclaration": 1191, "type": "address payable", "value": "_recipient" }, - "id": 1090, + "id": 1254, "name": "Identifier", - "src": "3568:10:8" + "src": "3633:10:5" }, { "attributes": { @@ -7669,13 +7723,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1029, + "referencedDeclaration": 1193, "type": "address payable", "value": "_relayer" }, - "id": 1091, + "id": 1255, "name": "Identifier", - "src": "3580:8:8" + "src": "3645:8:5" }, { "attributes": { @@ -7683,13 +7737,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1092, + "id": 1256, "name": "Identifier", - "src": "3590:4:8" + "src": "3655:4:5" }, { "attributes": { @@ -7697,79 +7751,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1033, + "referencedDeclaration": 1197, "type": "uint256", "value": "_refund" }, - "id": 1093, + "id": 1257, "name": "Identifier", - "src": "3596:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "feeTo", - "referencedDeclaration": 887, - "type": "function () view external returns (address)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 906, - "type": "contract IFeeManager", - "value": "feeManager" - }, - "id": 1094, - "name": "Identifier", - "src": "3605:10:8" - } - ], - "id": 1095, - "name": "MemberAccess", - "src": "3605:16:8" - } - ], - "id": 1096, - "name": "FunctionCall", - "src": "3605:18:8" + "src": "3661:7:5" } ], - "id": 1097, + "id": 1258, "name": "FunctionCall", - "src": "3551:73:8" + "src": "3616:53:5" } ], - "id": 1098, + "id": 1259, "name": "ExpressionStatement", - "src": "3551:73:8" + "src": "3616:53:5" }, { "children": [ @@ -7811,13 +7809,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 938, + "referencedDeclaration": 1102, "type": "function (address,bytes32,address,uint256)", "value": "Withdrawal" }, - "id": 1099, + "id": 1260, "name": "Identifier", - "src": "3635:10:8" + "src": "3680:10:5" }, { "attributes": { @@ -7825,13 +7823,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1027, + "referencedDeclaration": 1191, "type": "address payable", "value": "_recipient" }, - "id": 1100, + "id": 1261, "name": "Identifier", - "src": "3646:10:8" + "src": "3691:10:5" }, { "attributes": { @@ -7839,13 +7837,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1101, + "id": 1262, "name": "Identifier", - "src": "3658:14:8" + "src": "3703:14:5" }, { "attributes": { @@ -7853,13 +7851,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1029, + "referencedDeclaration": 1193, "type": "address payable", "value": "_relayer" }, - "id": 1102, + "id": 1263, "name": "Identifier", - "src": "3674:8:8" + "src": "3719:8:5" }, { "attributes": { @@ -7867,33 +7865,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1103, + "id": 1264, "name": "Identifier", - "src": "3684:4:8" + "src": "3729:4:5" } ], - "id": 1104, + "id": 1265, "name": "FunctionCall", - "src": "3635:54:8" + "src": "3680:54:5" } ], - "id": 1105, + "id": 1266, "name": "EmitStatement", - "src": "3630:59:8" + "src": "3675:59:5" } ], - "id": 1106, + "id": 1267, "name": "Block", - "src": "3088:606:8" + "src": "3153:586:5" } ], - "id": 1107, + "id": 1268, "name": "FunctionDefinition", - "src": "2893:801:8" + "src": "2958:781:5" }, { "attributes": { @@ -7906,7 +7904,7 @@ null ], "name": "_processWithdraw", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" @@ -7918,7 +7916,7 @@ "attributes": { "constant": false, "name": "_recipient", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -7932,20 +7930,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1108, + "id": 1269, "name": "ElementaryTypeName", - "src": "3783:15:8" + "src": "3828:15:5" } ], - "id": 1109, + "id": 1270, "name": "VariableDeclaration", - "src": "3783:26:8" + "src": "3828:26:5" }, { "attributes": { "constant": false, "name": "_relayer", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -7959,20 +7957,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1110, + "id": 1271, "name": "ElementaryTypeName", - "src": "3811:15:8" + "src": "3856:15:5" } ], - "id": 1111, + "id": 1272, "name": "VariableDeclaration", - "src": "3811:24:8" + "src": "3856:24:5" }, { "attributes": { "constant": false, "name": "_relayer_fee", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -7985,20 +7983,20 @@ "name": "uint256", "type": "uint256" }, - "id": 1112, + "id": 1273, "name": "ElementaryTypeName", - "src": "3837:7:8" + "src": "3882:7:5" } ], - "id": 1113, + "id": 1274, "name": "VariableDeclaration", - "src": "3837:20:8" + "src": "3882:20:5" }, { "attributes": { "constant": false, "name": "_refund", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8011,46 +8009,19 @@ "name": "uint256", "type": "uint256" }, - "id": 1114, + "id": 1275, "name": "ElementaryTypeName", - "src": "3859:7:8" + "src": "3904:7:5" } ], - "id": 1115, + "id": 1276, "name": "VariableDeclaration", - "src": "3859:15:8" - }, - { - "attributes": { - "constant": false, - "name": "_feeTo", - "scope": 1120, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1116, - "name": "ElementaryTypeName", - "src": "3876:7:8" - } - ], - "id": 1117, - "name": "VariableDeclaration", - "src": "3876:14:8" + "src": "3904:15:5" } ], - "id": 1118, + "id": 1277, "name": "ParameterList", - "src": "3782:109:8" + "src": "3827:93:5" }, { "attributes": { @@ -8059,14 +8030,14 @@ ] }, "children": [], - "id": 1119, + "id": 1278, "name": "ParameterList", - "src": "3900:0:8" + "src": "3929:0:5" } ], - "id": 1120, + "id": 1279, "name": "FunctionDefinition", - "src": "3757:144:8" + "src": "3802:128:5" }, { "attributes": { @@ -8078,7 +8049,7 @@ null ], "name": "isSpent", - "scope": 1204, + "scope": 1363, "stateMutability": "view", "superFunction": null, "visibility": "public" @@ -8090,7 +8061,7 @@ "attributes": { "constant": false, "name": "_nullifierHash", - "scope": 1132, + "scope": 1291, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8103,19 +8074,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1121, + "id": 1280, "name": "ElementaryTypeName", - "src": "3968:7:8" + "src": "3997:7:5" } ], - "id": 1122, + "id": 1281, "name": "VariableDeclaration", - "src": "3968:22:8" + "src": "3997:22:5" } ], - "id": 1123, + "id": 1282, "name": "ParameterList", - "src": "3967:24:8" + "src": "3996:24:5" }, { "children": [ @@ -8123,7 +8094,7 @@ "attributes": { "constant": false, "name": "", - "scope": 1132, + "scope": 1291, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -8136,25 +8107,25 @@ "name": "bool", "type": "bool" }, - "id": 1124, + "id": 1283, "name": "ElementaryTypeName", - "src": "4012:4:8" + "src": "4041:4:5" } ], - "id": 1125, + "id": 1284, "name": "VariableDeclaration", - "src": "4012:4:8" + "src": "4041:4:5" } ], - "id": 1126, + "id": 1285, "name": "ParameterList", - "src": "4011:6:8" + "src": "4040:6:5" }, { "children": [ { "attributes": { - "functionReturnParameters": 1126 + "functionReturnParameters": 1285 }, "children": [ { @@ -8173,13 +8144,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 898, + "referencedDeclaration": 1062, "type": "mapping(bytes32 => bool)", "value": "nullifierHashes" }, - "id": 1127, + "id": 1286, "name": "Identifier", - "src": "4031:15:8" + "src": "4060:15:5" }, { "attributes": { @@ -8187,33 +8158,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1122, + "referencedDeclaration": 1281, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1128, + "id": 1287, "name": "Identifier", - "src": "4047:14:8" + "src": "4076:14:5" } ], - "id": 1129, + "id": 1288, "name": "IndexAccess", - "src": "4031:31:8" + "src": "4060:31:5" } ], - "id": 1130, + "id": 1289, "name": "Return", - "src": "4024:38:8" + "src": "4053:38:5" } ], - "id": 1131, + "id": 1290, "name": "Block", - "src": "4018:49:8" + "src": "4047:49:5" } ], - "id": 1132, + "id": 1291, "name": "FunctionDefinition", - "src": "3951:116:8" + "src": "3980:116:5" }, { "attributes": { @@ -8225,7 +8196,7 @@ null ], "name": "isSpentArray", - "scope": 1204, + "scope": 1363, "stateMutability": "view", "superFunction": null, "visibility": "external" @@ -8237,7 +8208,7 @@ "attributes": { "constant": false, "name": "_nullifierHashes", - "scope": 1177, + "scope": 1336, "stateVariable": false, "storageLocation": "calldata", "type": "bytes32[]", @@ -8256,24 +8227,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1133, + "id": 1292, "name": "ElementaryTypeName", - "src": "4150:7:8" + "src": "4179:7:5" } ], - "id": 1134, + "id": 1293, "name": "ArrayTypeName", - "src": "4150:9:8" + "src": "4179:9:5" } ], - "id": 1135, + "id": 1294, "name": "VariableDeclaration", - "src": "4150:35:8" + "src": "4179:35:5" } ], - "id": 1136, + "id": 1295, "name": "ParameterList", - "src": "4149:37:8" + "src": "4178:37:5" }, { "children": [ @@ -8281,7 +8252,7 @@ "attributes": { "constant": false, "name": "spent", - "scope": 1177, + "scope": 1336, "stateVariable": false, "storageLocation": "memory", "type": "bool[]", @@ -8300,24 +8271,24 @@ "name": "bool", "type": "bool" }, - "id": 1137, + "id": 1296, "name": "ElementaryTypeName", - "src": "4209:4:8" + "src": "4238:4:5" } ], - "id": 1138, + "id": 1297, "name": "ArrayTypeName", - "src": "4209:6:8" + "src": "4238:6:5" } ], - "id": 1139, + "id": 1298, "name": "VariableDeclaration", - "src": "4209:19:8" + "src": "4238:19:5" } ], - "id": 1140, + "id": 1299, "name": "ParameterList", - "src": "4208:21:8" + "src": "4237:21:5" }, { "children": [ @@ -8340,13 +8311,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1139, + "referencedDeclaration": 1298, "type": "bool[] memory", "value": "spent" }, - "id": 1141, + "id": 1300, "name": "Identifier", - "src": "4236:5:8" + "src": "4265:5:5" }, { "attributes": { @@ -8389,19 +8360,19 @@ "name": "bool", "type": "bool" }, - "id": 1142, + "id": 1301, "name": "ElementaryTypeName", - "src": "4248:4:8" + "src": "4277:4:5" } ], - "id": 1143, + "id": 1302, "name": "ArrayTypeName", - "src": "4248:6:8" + "src": "4277:6:5" } ], - "id": 1144, + "id": 1303, "name": "NewExpression", - "src": "4244:10:8" + "src": "4273:10:5" }, { "attributes": { @@ -8421,40 +8392,40 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1135, + "referencedDeclaration": 1294, "type": "bytes32[] calldata", "value": "_nullifierHashes" }, - "id": 1145, + "id": 1304, "name": "Identifier", - "src": "4255:16:8" + "src": "4284:16:5" } ], - "id": 1146, + "id": 1305, "name": "MemberAccess", - "src": "4255:23:8" + "src": "4284:23:5" } ], - "id": 1147, + "id": 1306, "name": "FunctionCall", - "src": "4244:35:8" + "src": "4273:35:5" } ], - "id": 1148, + "id": 1307, "name": "Assignment", - "src": "4236:43:8" + "src": "4265:43:5" } ], - "id": 1149, + "id": 1308, "name": "ExpressionStatement", - "src": "4236:43:8" + "src": "4265:43:5" }, { "children": [ { "attributes": { "assignments": [ - 1151 + 1310 ] }, "children": [ @@ -8462,7 +8433,7 @@ "attributes": { "constant": false, "name": "i", - "scope": 1175, + "scope": 1334, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8475,14 +8446,14 @@ "name": "uint", "type": "uint256" }, - "id": 1150, + "id": 1309, "name": "ElementaryTypeName", - "src": "4289:4:8" + "src": "4318:4:5" } ], - "id": 1151, + "id": 1310, "name": "VariableDeclaration", - "src": "4289:6:8" + "src": "4318:6:5" }, { "attributes": { @@ -8497,14 +8468,14 @@ "type": "int_const 0", "value": "0" }, - "id": 1152, + "id": 1311, "name": "Literal", - "src": "4298:1:8" + "src": "4327:1:5" } ], - "id": 1153, + "id": 1312, "name": "VariableDeclarationStatement", - "src": "4289:10:8" + "src": "4318:10:5" }, { "attributes": { @@ -8527,13 +8498,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1154, + "id": 1313, "name": "Identifier", - "src": "4301:1:8" + "src": "4330:1:5" }, { "attributes": { @@ -8553,23 +8524,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1135, + "referencedDeclaration": 1294, "type": "bytes32[] calldata", "value": "_nullifierHashes" }, - "id": 1155, + "id": 1314, "name": "Identifier", - "src": "4305:16:8" + "src": "4334:16:5" } ], - "id": 1156, + "id": 1315, "name": "MemberAccess", - "src": "4305:23:8" + "src": "4334:23:5" } ], - "id": 1157, + "id": 1316, "name": "BinaryOperation", - "src": "4301:27:8" + "src": "4330:27:5" }, { "children": [ @@ -8591,23 +8562,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1158, + "id": 1317, "name": "Identifier", - "src": "4330:1:8" + "src": "4359:1:5" } ], - "id": 1159, + "id": 1318, "name": "UnaryOperation", - "src": "4330:3:8" + "src": "4359:3:5" } ], - "id": 1160, + "id": 1319, "name": "ExpressionStatement", - "src": "4330:3:8" + "src": "4359:3:5" }, { "children": [ @@ -8642,13 +8613,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1132, + "referencedDeclaration": 1291, "type": "function (bytes32) view returns (bool)", "value": "isSpent" }, - "id": 1161, + "id": 1320, "name": "Identifier", - "src": "4347:7:8" + "src": "4376:7:5" }, { "attributes": { @@ -8666,13 +8637,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1135, + "referencedDeclaration": 1294, "type": "bytes32[] calldata", "value": "_nullifierHashes" }, - "id": 1162, + "id": 1321, "name": "Identifier", - "src": "4355:16:8" + "src": "4384:16:5" }, { "attributes": { @@ -8680,23 +8651,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1163, + "id": 1322, "name": "Identifier", - "src": "4372:1:8" + "src": "4401:1:5" } ], - "id": 1164, + "id": 1323, "name": "IndexAccess", - "src": "4355:19:8" + "src": "4384:19:5" } ], - "id": 1165, + "id": 1324, "name": "FunctionCall", - "src": "4347:28:8" + "src": "4376:28:5" }, { "children": [ @@ -8729,13 +8700,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1139, + "referencedDeclaration": 1298, "type": "bool[] memory", "value": "spent" }, - "id": 1166, + "id": 1325, "name": "Identifier", - "src": "4387:5:8" + "src": "4416:5:5" }, { "attributes": { @@ -8743,18 +8714,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1167, + "id": 1326, "name": "Identifier", - "src": "4393:1:8" + "src": "4422:1:5" } ], - "id": 1168, + "id": 1327, "name": "IndexAccess", - "src": "4387:8:8" + "src": "4416:8:5" }, { "attributes": { @@ -8769,49 +8740,49 @@ "type": "bool", "value": "true" }, - "id": 1169, + "id": 1328, "name": "Literal", - "src": "4398:4:8" + "src": "4427:4:5" } ], - "id": 1170, + "id": 1329, "name": "Assignment", - "src": "4387:15:8" + "src": "4416:15:5" } ], - "id": 1171, + "id": 1330, "name": "ExpressionStatement", - "src": "4387:15:8" + "src": "4416:15:5" } ], - "id": 1172, + "id": 1331, "name": "Block", - "src": "4377:34:8" + "src": "4406:34:5" } ], - "id": 1173, + "id": 1332, "name": "IfStatement", - "src": "4343:68:8" + "src": "4372:68:5" } ], - "id": 1174, + "id": 1333, "name": "Block", - "src": "4335:82:8" + "src": "4364:82:5" } ], - "id": 1175, + "id": 1334, "name": "ForStatement", - "src": "4285:132:8" + "src": "4314:132:5" } ], - "id": 1176, + "id": 1335, "name": "Block", - "src": "4230:191:8" + "src": "4259:191:5" } ], - "id": 1177, + "id": 1336, "name": "FunctionDefinition", - "src": "4128:293:8" + "src": "4157:293:5" }, { "attributes": { @@ -8820,7 +8791,7 @@ "isConstructor": false, "kind": "function", "name": "updateVerifier", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" @@ -8832,7 +8803,7 @@ "attributes": { "constant": false, "name": "_newVerifier", - "scope": 1191, + "scope": 1350, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -8846,19 +8817,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1178, + "id": 1337, "name": "ElementaryTypeName", - "src": "4675:7:8" + "src": "4704:7:5" } ], - "id": 1179, + "id": 1338, "name": "VariableDeclaration", - "src": "4675:20:8" + "src": "4704:20:5" } ], - "id": 1180, + "id": 1339, "name": "ParameterList", - "src": "4674:22:8" + "src": "4703:22:5" }, { "attributes": { @@ -8867,9 +8838,9 @@ ] }, "children": [], - "id": 1183, + "id": 1342, "name": "ParameterList", - "src": "4719:0:8" + "src": "4748:0:5" }, { "attributes": { @@ -8882,18 +8853,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 920, + "referencedDeclaration": 1084, "type": "modifier ()", "value": "onlyOperator" }, - "id": 1181, + "id": 1340, "name": "Identifier", - "src": "4706:12:8" + "src": "4735:12:5" } ], - "id": 1182, + "id": 1341, "name": "ModifierInvocation", - "src": "4706:12:8" + "src": "4735:12:5" }, { "children": [ @@ -8916,13 +8887,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 904, + "referencedDeclaration": 1068, "type": "contract IVerifier", "value": "verifier" }, - "id": 1184, + "id": 1343, "name": "Identifier", - "src": "4725:8:8" + "src": "4754:8:5" }, { "attributes": { @@ -8950,13 +8921,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "type(contract IVerifier)", "value": "IVerifier" }, - "id": 1185, + "id": 1344, "name": "Identifier", - "src": "4736:9:8" + "src": "4765:9:5" }, { "attributes": { @@ -8964,38 +8935,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1179, + "referencedDeclaration": 1338, "type": "address", "value": "_newVerifier" }, - "id": 1186, + "id": 1345, "name": "Identifier", - "src": "4746:12:8" + "src": "4775:12:5" } ], - "id": 1187, + "id": 1346, "name": "FunctionCall", - "src": "4736:23:8" + "src": "4765:23:5" } ], - "id": 1188, + "id": 1347, "name": "Assignment", - "src": "4725:34:8" + "src": "4754:34:5" } ], - "id": 1189, + "id": 1348, "name": "ExpressionStatement", - "src": "4725:34:8" + "src": "4754:34:5" } ], - "id": 1190, + "id": 1349, "name": "Block", - "src": "4719:45:8" + "src": "4748:45:5" } ], - "id": 1191, + "id": 1350, "name": "FunctionDefinition", - "src": "4651:113:8" + "src": "4680:113:5" }, { "attributes": { @@ -9004,7 +8975,7 @@ "isConstructor": false, "kind": "function", "name": "changeOperator", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" @@ -9016,7 +8987,7 @@ "attributes": { "constant": false, "name": "_newOperator", - "scope": 1203, + "scope": 1362, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -9030,19 +9001,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1192, + "id": 1351, "name": "ElementaryTypeName", - "src": "4838:7:8" + "src": "4867:7:5" } ], - "id": 1193, + "id": 1352, "name": "VariableDeclaration", - "src": "4838:20:8" + "src": "4867:20:5" } ], - "id": 1194, + "id": 1353, "name": "ParameterList", - "src": "4837:22:8" + "src": "4866:22:5" }, { "attributes": { @@ -9051,9 +9022,9 @@ ] }, "children": [], - "id": 1197, + "id": 1356, "name": "ParameterList", - "src": "4882:0:8" + "src": "4911:0:5" }, { "attributes": { @@ -9066,18 +9037,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 920, + "referencedDeclaration": 1084, "type": "modifier ()", "value": "onlyOperator" }, - "id": 1195, + "id": 1354, "name": "Identifier", - "src": "4869:12:8" + "src": "4898:12:5" } ], - "id": 1196, + "id": 1355, "name": "ModifierInvocation", - "src": "4869:12:8" + "src": "4898:12:5" }, { "children": [ @@ -9100,13 +9071,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 908, + "referencedDeclaration": 1072, "type": "address", "value": "operator" }, - "id": 1198, + "id": 1357, "name": "Identifier", - "src": "4888:8:8" + "src": "4917:8:5" }, { "attributes": { @@ -9114,43 +9085,43 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1193, + "referencedDeclaration": 1352, "type": "address", "value": "_newOperator" }, - "id": 1199, + "id": 1358, "name": "Identifier", - "src": "4899:12:8" + "src": "4928:12:5" } ], - "id": 1200, + "id": 1359, "name": "Assignment", - "src": "4888:23:8" + "src": "4917:23:5" } ], - "id": 1201, + "id": 1360, "name": "ExpressionStatement", - "src": "4888:23:8" + "src": "4917:23:5" } ], - "id": 1202, + "id": 1361, "name": "Block", - "src": "4882:34:8" + "src": "4911:34:5" } ], - "id": 1203, + "id": 1362, "name": "FunctionDefinition", - "src": "4814:102:8" + "src": "4843:102:5" } ], - "id": 1204, + "id": 1363, "name": "ContractDefinition", - "src": "318:4600:8" + "src": "383:4564:5" } ], - "id": 1205, + "id": 1364, "name": "SourceUnit", - "src": "0:4919:8" + "src": "0:4948:5" }, "compiler": { "name": "solc", @@ -9158,7 +9129,7 @@ }, "networks": {}, "schemaVersion": "3.3.4", - "updatedAt": "2021-04-04T20:21:29.868Z", + "updatedAt": "2021-04-12T00:15:10.062Z", "devdoc": { "methods": {} }, diff --git a/client/contracts/IVerifier.json b/client/contracts/IVerifier.json index cb8b681..ecdfbcd 100644 --- a/client/contracts/IVerifier.json +++ b/client/contracts/IVerifier.json @@ -28,58 +28,58 @@ "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"},{\"internalType\":\"uint256[6]\",\"name\":\"_input\",\"type\":\"uint256[6]\"}],\"name\":\"verifyProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":\"IVerifier\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0xe7db8acb3efcecf95c7364f447ed1764c571dbf5090fd4641fe4668a965332eb\",\"urls\":[\"bzz-raw://45e790c247c38ed8ae473e3165c1148ea10a753cf6e9f9c8742394019be2aef6\",\"dweb:/ipfs/QmaGfk1ndvqur2NvCY3TWoKuorfBVShXeykKei18GDY582\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"},{\"internalType\":\"uint256[6]\",\"name\":\"_input\",\"type\":\"uint256[6]\"}],\"name\":\"verifyProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":\"IVerifier\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x7269c9361452a555e6f29e924e70d4478a8a5bd86c7b33ea3731470a52c235b5\",\"urls\":[\"bzz-raw://eddd542888565cb84d4dac710511b0f02afbed2e0e1a7d25e0425e6d69b7712f\",\"dweb:/ipfs/Qma1KWoX8nZYK1d1PAfRiZH4prYqM347dMkWM6DjJzTqYY\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", - "source": "pragma solidity 0.5.17;\n\nimport \"./MerkleTreeWithHistory.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\ncontract IVerifier {\n function verifyProof(bytes memory _proof, uint256[6] memory _input) public returns(bool);\n}\n\ncontract IFeeManager {\n function feeTo() external view returns (address);\n}\n\ncontract Tornado is MerkleTreeWithHistory, ReentrancyGuard {\n uint256 public denomination;\n mapping(bytes32 => bool) public nullifierHashes;\n // we store all commitments just to prevent accidental deposits with the same commitment\n mapping(bytes32 => bool) public commitments;\n IVerifier public verifier;\n IFeeManager public feeManager;\n\n // operator can update snark verification key\n // after the final trusted setup ceremony operator rights are supposed to be transferred to zero address\n address public operator;\n modifier onlyOperator {\n require(msg.sender == operator, \"Only operator can call this function.\");\n _;\n }\n\n event Deposit(bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp);\n event Withdrawal(address to, bytes32 nullifierHash, address indexed relayer, uint256 fee);\n\n /**\n @dev The constructor\n @param _verifier the address of SNARK verifier for this contract\n @param _denomination transfer amount for each deposit\n @param _merkleTreeHeight the height of deposits' Merkle Tree\n @param _operator operator address (see operator comment above)\n */\n constructor(\n IVerifier _verifier,\n IFeeManager _feeManager,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator\n ) MerkleTreeWithHistory(_merkleTreeHeight) public {\n require(_denomination > 0, \"denomination should be greater than 0\");\n verifier = _verifier;\n feeManager = _feeManager;\n operator = _operator;\n denomination = _denomination;\n }\n\n /**\n @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\n @param _commitment the note commitment, which is PedersenHash(nullifier + secret)\n */\n function deposit(bytes32 _commitment) external payable nonReentrant {\n require(!commitments[_commitment], \"The commitment has been submitted\");\n\n uint32 insertedIndex = _insert(_commitment);\n commitments[_commitment] = true;\n _processDeposit();\n\n emit Deposit(_commitment, insertedIndex, block.timestamp);\n }\n\n /** @dev this function is defined in a child contract */\n function _processDeposit() internal;\n\n /**\n @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs\n `input` array consists of:\n - merkle root of all deposits in the contract\n - hash of unique deposit nullifier to prevent double spends\n - the recipient of funds\n - optional fee that goes to the transaction sender (usually a relay)\n */\n function withdraw(bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund) external payable nonReentrant {\n require(_fee <= denomination, \"Fee exceeds transfer value\");\n require(!nullifierHashes[_nullifierHash], \"The note has been already spent\");\n require(isKnownRoot(_root), \"Cannot find your merkle root\"); // Make sure to use a recent one\n require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(_recipient), uint256(_relayer), _fee, _refund]), \"Invalid withdraw proof\");\n\n nullifierHashes[_nullifierHash] = true;\n _processWithdraw(_recipient, _relayer, _fee, _refund, feeManager.feeTo());\n emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee);\n }\n\n /** @dev this function is defined in a child contract */\n function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund, address _feeTo) internal;\n\n /** @dev whether a note is already spent */\n function isSpent(bytes32 _nullifierHash) public view returns(bool) {\n return nullifierHashes[_nullifierHash];\n }\n\n /** @dev whether an array of notes is already spent */\n function isSpentArray(bytes32[] calldata _nullifierHashes) external view returns(bool[] memory spent) {\n spent = new bool[](_nullifierHashes.length);\n for(uint i = 0; i < _nullifierHashes.length; i++) {\n if (isSpent(_nullifierHashes[i])) {\n spent[i] = true;\n }\n }\n }\n\n /**\n @dev allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held.\n After that operator rights are supposed to be transferred to zero address\n */\n function updateVerifier(address _newVerifier) external onlyOperator {\n verifier = IVerifier(_newVerifier);\n }\n\n /** @dev operator can change his address */\n function changeOperator(address _newOperator) external onlyOperator {\n operator = _newOperator;\n }\n}\n", + "source": "pragma solidity 0.5.17;\n\nimport \"./MerkleTreeWithHistory.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\ncontract IVerifier {\n function verifyProof(bytes memory _proof, uint256[6] memory _input) public returns(bool);\n}\n\ncontract IFeeManager {\n function feeTo() external view returns (address);\n function protocolFeeDivisor() external view returns (uint256);\n}\n\ncontract Tornado is MerkleTreeWithHistory, ReentrancyGuard {\n uint256 public denomination;\n mapping(bytes32 => bool) public nullifierHashes;\n // we store all commitments just to prevent accidental deposits with the same commitment\n mapping(bytes32 => bool) public commitments;\n IVerifier public verifier;\n IFeeManager public feeManager;\n\n // operator can update snark verification key\n // after the final trusted setup ceremony operator rights are supposed to be transferred to zero address\n address public operator;\n modifier onlyOperator {\n require(msg.sender == operator, \"Only operator can call this function.\");\n _;\n }\n\n event Deposit(bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp);\n event Withdrawal(address to, bytes32 nullifierHash, address indexed relayer, uint256 fee);\n\n /**\n @dev The constructor\n @param _verifier the address of SNARK verifier for this contract\n @param _denomination transfer amount for each deposit\n @param _merkleTreeHeight the height of deposits' Merkle Tree\n @param _operator operator address (see operator comment above)\n */\n constructor(\n IVerifier _verifier,\n IFeeManager _feeManager,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator\n ) MerkleTreeWithHistory(_merkleTreeHeight) public {\n require(_denomination > 0, \"denomination should be greater than 0\");\n verifier = _verifier;\n feeManager = _feeManager;\n operator = _operator;\n denomination = _denomination;\n }\n\n /**\n @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\n @param _commitment the note commitment, which is PedersenHash(nullifier + secret)\n */\n function deposit(bytes32 _commitment) external payable nonReentrant {\n require(!commitments[_commitment], \"The commitment has been submitted\");\n\n uint32 insertedIndex = _insert(_commitment);\n commitments[_commitment] = true;\n _processDeposit();\n\n emit Deposit(_commitment, insertedIndex, block.timestamp);\n }\n\n /** @dev this function is defined in a child contract */\n function _processDeposit() internal;\n\n /**\n @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs\n `input` array consists of:\n - merkle root of all deposits in the contract\n - hash of unique deposit nullifier to prevent double spends\n - the recipient of funds\n - optional fee that goes to the transaction sender (usually a relay)\n */\n function withdraw(bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund) external payable nonReentrant {\n require(_fee <= denomination, \"Fee exceeds transfer value\");\n require(!nullifierHashes[_nullifierHash], \"The note has been already spent\");\n require(isKnownRoot(_root), \"Cannot find your merkle root\"); // Make sure to use a recent one\n require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(_recipient), uint256(_relayer), _fee, _refund]), \"Invalid withdraw proof\");\n\n nullifierHashes[_nullifierHash] = true;\n _processWithdraw(_recipient, _relayer, _fee, _refund);\n emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee);\n }\n\n /** @dev this function is defined in a child contract */\n function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund) internal;\n\n /** @dev whether a note is already spent */\n function isSpent(bytes32 _nullifierHash) public view returns(bool) {\n return nullifierHashes[_nullifierHash];\n }\n\n /** @dev whether an array of notes is already spent */\n function isSpentArray(bytes32[] calldata _nullifierHashes) external view returns(bool[] memory spent) {\n spent = new bool[](_nullifierHashes.length);\n for(uint i = 0; i < _nullifierHashes.length; i++) {\n if (isSpent(_nullifierHashes[i])) {\n spent[i] = true;\n }\n }\n }\n\n /**\n @dev allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held.\n After that operator rights are supposed to be transferred to zero address\n */\n function updateVerifier(address _newVerifier) external onlyOperator {\n verifier = IVerifier(_newVerifier);\n }\n\n /** @dev operator can change his address */\n function changeOperator(address _newOperator) external onlyOperator {\n operator = _newOperator;\n }\n}\n", "sourcePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "ast": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "exportedSymbols": { "IFeeManager": [ - 888 + 1052 ], "IVerifier": [ - 882 + 1041 ], "Tornado": [ - 1204 + 1363 ] }, - "id": 1205, + "id": 1364, "nodeType": "SourceUnit", "nodes": [ { - "id": 868, + "id": 1027, "literals": [ "solidity", "0.5", ".17" ], "nodeType": "PragmaDirective", - "src": "0:23:8" + "src": "0:23:5" }, { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol", "file": "./MerkleTreeWithHistory.sol", - "id": 869, + "id": 1028, "nodeType": "ImportDirective", - "scope": 1205, - "sourceUnit": 686, - "src": "25:37:8", + "scope": 1364, + "sourceUnit": 839, + "src": "25:37:5", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "id": 870, + "id": 1029, "nodeType": "ImportDirective", - "scope": 1205, - "sourceUnit": 3256, - "src": "63:59:8", + "scope": 1364, + "sourceUnit": 1394, + "src": "63:59:5", "symbolAliases": [], "unitAlias": "" }, @@ -89,9 +89,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": false, - "id": 882, + "id": 1041, "linearizedBaseContracts": [ - 882 + 1041 ], "name": "IVerifier", "nodeType": "ContractDefinition", @@ -99,23 +99,23 @@ { "body": null, "documentation": null, - "id": 881, + "id": 1040, "implemented": false, "kind": "function", "modifiers": [], "name": "verifyProof", "nodeType": "FunctionDefinition", "parameters": { - "id": 877, + "id": 1036, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 872, + "id": 1031, "name": "_proof", "nodeType": "VariableDeclaration", - "scope": 881, - "src": "168:19:8", + "scope": 1040, + "src": "168:19:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -123,10 +123,10 @@ "typeString": "bytes" }, "typeName": { - "id": 871, + "id": 1030, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "168:5:8", + "src": "168:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -137,11 +137,11 @@ }, { "constant": false, - "id": 876, + "id": 1035, "name": "_input", "nodeType": "VariableDeclaration", - "scope": 881, - "src": "189:24:8", + "scope": 1040, + "src": "189:24:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -150,27 +150,27 @@ }, "typeName": { "baseType": { - "id": 873, + "id": 1032, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "189:7:8", + "src": "189:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 875, + "id": 1034, "length": { "argumentTypes": null, "hexValue": "36", - "id": 874, + "id": 1033, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "197:1:8", + "src": "197:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_6_by_1", @@ -179,7 +179,7 @@ "value": "6" }, "nodeType": "ArrayTypeName", - "src": "189:10:8", + "src": "189:10:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$6_storage_ptr", "typeString": "uint256[6]" @@ -189,19 +189,19 @@ "visibility": "internal" } ], - "src": "167:47:8" + "src": "167:47:5" }, "returnParameters": { - "id": 880, + "id": 1039, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 879, + "id": 1038, "name": "", "nodeType": "VariableDeclaration", - "scope": 881, - "src": "230:4:8", + "scope": 1040, + "src": "230:4:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -209,10 +209,10 @@ "typeString": "bool" }, "typeName": { - "id": 878, + "id": 1037, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "230:4:8", + "src": "230:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -222,17 +222,17 @@ "visibility": "internal" } ], - "src": "229:6:8" + "src": "229:6:5" }, - "scope": 882, - "src": "147:89:8", + "scope": 1041, + "src": "147:89:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 1205, - "src": "124:114:8" + "scope": 1364, + "src": "124:114:5" }, { "baseContracts": [], @@ -240,9 +240,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": false, - "id": 888, + "id": 1052, "linearizedBaseContracts": [ - 888 + 1052 ], "name": "IFeeManager", "nodeType": "ContractDefinition", @@ -250,29 +250,29 @@ { "body": null, "documentation": null, - "id": 887, + "id": 1046, "implemented": false, "kind": "function", "modifiers": [], "name": "feeTo", "nodeType": "FunctionDefinition", "parameters": { - "id": 883, + "id": 1042, "nodeType": "ParameterList", "parameters": [], - "src": "279:2:8" + "src": "279:2:5" }, "returnParameters": { - "id": 886, + "id": 1045, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 885, + "id": 1044, "name": "", "nodeType": "VariableDeclaration", - "scope": 887, - "src": "305:7:8", + "scope": 1046, + "src": "305:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -280,10 +280,10 @@ "typeString": "address" }, "typeName": { - "id": 884, + "id": 1043, "name": "address", "nodeType": "ElementaryTypeName", - "src": "305:7:8", + "src": "305:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -294,17 +294,71 @@ "visibility": "internal" } ], - "src": "304:9:8" + "src": "304:9:5" }, - "scope": 888, - "src": "265:49:8", + "scope": 1052, + "src": "265:49:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1051, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "protocolFeeDivisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1047, + "nodeType": "ParameterList", + "parameters": [], + "src": "344:2:5" + }, + "returnParameters": { + "id": 1050, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1049, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "370:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1048, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "370:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "369:9:5" + }, + "scope": 1052, + "src": "317:62:5", "stateMutability": "view", "superFunction": null, "visibility": "external" } ], - "scope": 1205, - "src": "240:76:8" + "scope": 1364, + "src": "240:141:5" }, { "baseContracts": [ @@ -312,62 +366,62 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 889, + "id": 1053, "name": "MerkleTreeWithHistory", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 685, - "src": "338:21:8", + "referencedDeclaration": 838, + "src": "403:21:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_MerkleTreeWithHistory_$685", + "typeIdentifier": "t_contract$_MerkleTreeWithHistory_$838", "typeString": "contract MerkleTreeWithHistory" } }, - "id": 890, + "id": 1054, "nodeType": "InheritanceSpecifier", - "src": "338:21:8" + "src": "403:21:5" }, { "arguments": null, "baseName": { "contractScope": null, - "id": 891, + "id": 1055, "name": "ReentrancyGuard", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3255, - "src": "361:15:8", + "referencedDeclaration": 1393, + "src": "426:15:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_ReentrancyGuard_$3255", + "typeIdentifier": "t_contract$_ReentrancyGuard_$1393", "typeString": "contract ReentrancyGuard" } }, - "id": 892, + "id": 1056, "nodeType": "InheritanceSpecifier", - "src": "361:15:8" + "src": "426:15:5" } ], "contractDependencies": [ - 685, - 3255 + 838, + 1393 ], "contractKind": "contract", "documentation": null, "fullyImplemented": false, - "id": 1204, + "id": 1363, "linearizedBaseContracts": [ - 1204, - 3255, - 685 + 1363, + 1393, + 838 ], "name": "Tornado", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 894, + "id": 1058, "name": "denomination", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "381:27:8", + "scope": 1363, + "src": "446:27:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -375,10 +429,10 @@ "typeString": "uint256" }, "typeName": { - "id": 893, + "id": 1057, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "381:7:8", + "src": "446:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -389,11 +443,11 @@ }, { "constant": false, - "id": 898, + "id": 1062, "name": "nullifierHashes", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "412:47:8", + "scope": 1363, + "src": "477:47:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -401,28 +455,28 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 897, + "id": 1061, "keyType": { - "id": 895, + "id": 1059, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "420:7:8", + "src": "485:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "412:24:8", + "src": "477:24:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 896, + "id": 1060, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "431:4:8", + "src": "496:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -434,11 +488,11 @@ }, { "constant": false, - "id": 902, + "id": 1066, "name": "commitments", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "554:43:8", + "scope": 1363, + "src": "619:43:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -446,28 +500,28 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 901, + "id": 1065, "keyType": { - "id": 899, + "id": 1063, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "562:7:8", + "src": "627:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "554:24:8", + "src": "619:24:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 900, + "id": 1064, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "573:4:8", + "src": "638:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -479,26 +533,26 @@ }, { "constant": false, - "id": 904, + "id": 1068, "name": "verifier", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "601:25:8", + "scope": 1363, + "src": "666:25:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" }, "typeName": { "contractScope": null, - "id": 903, + "id": 1067, "name": "IVerifier", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 882, - "src": "601:9:8", + "referencedDeclaration": 1041, + "src": "666:9:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -507,26 +561,26 @@ }, { "constant": false, - "id": 906, + "id": 1070, "name": "feeManager", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "630:29:8", + "scope": 1363, + "src": "695:29:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" }, "typeName": { "contractScope": null, - "id": 905, + "id": 1069, "name": "IFeeManager", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 888, - "src": "630:11:8", + "referencedDeclaration": 1052, + "src": "695:11:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -535,11 +589,11 @@ }, { "constant": false, - "id": 908, + "id": 1072, "name": "operator", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "819:23:8", + "scope": 1363, + "src": "884:23:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -547,10 +601,10 @@ "typeString": "address" }, "typeName": { - "id": 907, + "id": 1071, "name": "address", "nodeType": "ElementaryTypeName", - "src": "819:7:8", + "src": "884:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -562,9 +616,9 @@ }, { "body": { - "id": 919, + "id": 1083, "nodeType": "Block", - "src": "868:90:8", + "src": "933:90:5", "statements": [ { "expression": { @@ -576,7 +630,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 914, + "id": 1078, "isConstant": false, "isLValue": false, "isPure": false, @@ -585,18 +639,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 911, + "id": 1075, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "882:3:8", + "referencedDeclaration": 1408, + "src": "947:3:5", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 912, + "id": 1076, "isConstant": false, "isLValue": false, "isPure": false, @@ -604,7 +658,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "882:10:8", + "src": "947:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -614,18 +668,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 913, + "id": 1077, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "896:8:8", + "referencedDeclaration": 1072, + "src": "961:8:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "882:22:8", + "src": "947:22:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -634,14 +688,14 @@ { "argumentTypes": null, "hexValue": "4f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2e", - "id": 915, + "id": 1079, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "906:39:8", + "src": "971:39:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e8393660073679be7a6133571fe2ca8983a31a683c72e9055f401ac33a2efffc", @@ -661,21 +715,21 @@ "typeString": "literal_string \"Only operator can call this function.\"" } ], - "id": 910, + "id": 1074, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "874:7:8", + "referencedDeclaration": 1412, + "src": "939:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 916, + "id": 1080, "isConstant": false, "isLValue": false, "isPure": false, @@ -683,54 +737,54 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "874:72:8", + "src": "939:72:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 917, + "id": 1081, "nodeType": "ExpressionStatement", - "src": "874:72:8" + "src": "939:72:5" }, { - "id": 918, + "id": 1082, "nodeType": "PlaceholderStatement", - "src": "952:1:8" + "src": "1017:1:5" } ] }, "documentation": null, - "id": 920, + "id": 1084, "name": "onlyOperator", "nodeType": "ModifierDefinition", "parameters": { - "id": 909, + "id": 1073, "nodeType": "ParameterList", "parameters": [], - "src": "868:0:8" + "src": "933:0:5" }, - "src": "846:112:8", + "src": "911:112:5", "visibility": "internal" }, { "anonymous": false, "documentation": null, - "id": 928, + "id": 1092, "name": "Deposit", "nodeType": "EventDefinition", "parameters": { - "id": 927, + "id": 1091, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 922, + "id": 1086, "indexed": true, "name": "commitment", "nodeType": "VariableDeclaration", - "scope": 928, - "src": "976:26:8", + "scope": 1092, + "src": "1041:26:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -738,10 +792,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 921, + "id": 1085, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "976:7:8", + "src": "1041:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -752,12 +806,12 @@ }, { "constant": false, - "id": 924, + "id": 1088, "indexed": false, "name": "leafIndex", "nodeType": "VariableDeclaration", - "scope": 928, - "src": "1004:16:8", + "scope": 1092, + "src": "1069:16:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -765,10 +819,10 @@ "typeString": "uint32" }, "typeName": { - "id": 923, + "id": 1087, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "1004:6:8", + "src": "1069:6:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -779,12 +833,12 @@ }, { "constant": false, - "id": 926, + "id": 1090, "indexed": false, "name": "timestamp", "nodeType": "VariableDeclaration", - "scope": 928, - "src": "1022:17:8", + "scope": 1092, + "src": "1087:17:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -792,10 +846,10 @@ "typeString": "uint256" }, "typeName": { - "id": 925, + "id": 1089, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1022:7:8", + "src": "1087:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -805,28 +859,28 @@ "visibility": "internal" } ], - "src": "975:65:8" + "src": "1040:65:5" }, - "src": "962:79:8" + "src": "1027:79:5" }, { "anonymous": false, "documentation": null, - "id": 938, + "id": 1102, "name": "Withdrawal", "nodeType": "EventDefinition", "parameters": { - "id": 937, + "id": 1101, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 930, + "id": 1094, "indexed": false, "name": "to", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1061:10:8", + "scope": 1102, + "src": "1126:10:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -834,10 +888,10 @@ "typeString": "address" }, "typeName": { - "id": 929, + "id": 1093, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1061:7:8", + "src": "1126:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -849,12 +903,12 @@ }, { "constant": false, - "id": 932, + "id": 1096, "indexed": false, "name": "nullifierHash", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1073:21:8", + "scope": 1102, + "src": "1138:21:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -862,10 +916,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 931, + "id": 1095, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1073:7:8", + "src": "1138:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -876,12 +930,12 @@ }, { "constant": false, - "id": 934, + "id": 1098, "indexed": true, "name": "relayer", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1096:23:8", + "scope": 1102, + "src": "1161:23:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -889,10 +943,10 @@ "typeString": "address" }, "typeName": { - "id": 933, + "id": 1097, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1096:7:8", + "src": "1161:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -904,12 +958,12 @@ }, { "constant": false, - "id": 936, + "id": 1100, "indexed": false, "name": "fee", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1121:11:8", + "scope": 1102, + "src": "1186:11:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -917,10 +971,10 @@ "typeString": "uint256" }, "typeName": { - "id": 935, + "id": 1099, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1121:7:8", + "src": "1186:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -930,15 +984,15 @@ "visibility": "internal" } ], - "src": "1060:73:8" + "src": "1125:73:5" }, - "src": "1044:90:8" + "src": "1109:90:5" }, { "body": { - "id": 977, + "id": 1141, "nodeType": "Block", - "src": "1631:194:8", + "src": "1696:194:5", "statements": [ { "expression": { @@ -950,19 +1004,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 957, + "id": 1121, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 955, + "id": 1119, "name": "_denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "1645:13:8", + "referencedDeclaration": 1108, + "src": "1710:13:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -973,14 +1027,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 956, + "id": 1120, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1661:1:8", + "src": "1726:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -988,7 +1042,7 @@ }, "value": "0" }, - "src": "1645:17:8", + "src": "1710:17:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -997,14 +1051,14 @@ { "argumentTypes": null, "hexValue": "64656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030", - "id": 958, + "id": 1122, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1664:39:8", + "src": "1729:39:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_04818fb803bf7e7ff6c9059d97eae335b77b108931ead0a529924d35ccaf3fc8", @@ -1024,21 +1078,21 @@ "typeString": "literal_string \"denomination should be greater than 0\"" } ], - "id": 954, + "id": 1118, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "1637:7:8", + "referencedDeclaration": 1412, + "src": "1702:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 959, + "id": 1123, "isConstant": false, "isLValue": false, "isPure": false, @@ -1046,34 +1100,34 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1637:67:8", + "src": "1702:67:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 960, + "id": 1124, "nodeType": "ExpressionStatement", - "src": "1637:67:8" + "src": "1702:67:5" }, { "expression": { "argumentTypes": null, - "id": 963, + "id": 1127, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 961, + "id": 1125, "name": "verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "1710:8:8", + "referencedDeclaration": 1068, + "src": "1775:8:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -1081,45 +1135,45 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 962, + "id": 1126, "name": "_verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 940, - "src": "1721:9:8", + "referencedDeclaration": 1104, + "src": "1786:9:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "src": "1710:20:8", + "src": "1775:20:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "id": 964, + "id": 1128, "nodeType": "ExpressionStatement", - "src": "1710:20:8" + "src": "1775:20:5" }, { "expression": { "argumentTypes": null, - "id": 967, + "id": 1131, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 965, + "id": 1129, "name": "feeManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "1736:10:8", + "referencedDeclaration": 1070, + "src": "1801:10:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -1127,43 +1181,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 966, + "id": 1130, "name": "_feeManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 942, - "src": "1749:11:8", + "referencedDeclaration": 1106, + "src": "1814:11:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, - "src": "1736:24:8", + "src": "1801:24:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, - "id": 968, + "id": 1132, "nodeType": "ExpressionStatement", - "src": "1736:24:8" + "src": "1801:24:5" }, { "expression": { "argumentTypes": null, - "id": 971, + "id": 1135, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 969, + "id": 1133, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "1766:8:8", + "referencedDeclaration": 1072, + "src": "1831:8:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1173,43 +1227,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 970, + "id": 1134, "name": "_operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 948, - "src": "1777:9:8", + "referencedDeclaration": 1112, + "src": "1842:9:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1766:20:8", + "src": "1831:20:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 972, + "id": 1136, "nodeType": "ExpressionStatement", - "src": "1766:20:8" + "src": "1831:20:5" }, { "expression": { "argumentTypes": null, - "id": 975, + "id": 1139, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 973, + "id": 1137, "name": "denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 894, - "src": "1792:12:8", + "referencedDeclaration": 1058, + "src": "1857:12:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1219,31 +1273,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 974, + "id": 1138, "name": "_denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "1807:13:8", + "referencedDeclaration": 1108, + "src": "1872:13:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1792:28:8", + "src": "1857:28:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 976, + "id": 1140, "nodeType": "ExpressionStatement", - "src": "1792:28:8" + "src": "1857:28:5" } ] }, "documentation": "@dev The constructor\n@param _verifier the address of SNARK verifier for this contract\n@param _denomination transfer amount for each deposit\n@param _merkleTreeHeight the height of deposits' Merkle Tree\n@param _operator operator address (see operator comment above)", - "id": 978, + "id": 1142, "implemented": true, "kind": "constructor", "modifiers": [ @@ -1251,64 +1305,64 @@ "arguments": [ { "argumentTypes": null, - "id": 951, + "id": 1115, "name": "_merkleTreeHeight", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 946, - "src": "1605:17:8", + "referencedDeclaration": 1110, + "src": "1670:17:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } } ], - "id": 952, + "id": 1116, "modifierName": { "argumentTypes": null, - "id": 950, + "id": 1114, "name": "MerkleTreeWithHistory", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 685, - "src": "1583:21:8", + "referencedDeclaration": 838, + "src": "1648:21:5", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MerkleTreeWithHistory_$685_$", + "typeIdentifier": "t_type$_t_contract$_MerkleTreeWithHistory_$838_$", "typeString": "type(contract MerkleTreeWithHistory)" } }, "nodeType": "ModifierInvocation", - "src": "1583:40:8" + "src": "1648:40:5" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 949, + "id": 1113, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 940, + "id": 1104, "name": "_verifier", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1450:19:8", + "scope": 1142, + "src": "1515:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" }, "typeName": { "contractScope": null, - "id": 939, + "id": 1103, "name": "IVerifier", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 882, - "src": "1450:9:8", + "referencedDeclaration": 1041, + "src": "1515:9:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -1317,26 +1371,26 @@ }, { "constant": false, - "id": 942, + "id": 1106, "name": "_feeManager", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1475:23:8", + "scope": 1142, + "src": "1540:23:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" }, "typeName": { "contractScope": null, - "id": 941, + "id": 1105, "name": "IFeeManager", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 888, - "src": "1475:11:8", + "referencedDeclaration": 1052, + "src": "1540:11:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -1345,11 +1399,11 @@ }, { "constant": false, - "id": 944, + "id": 1108, "name": "_denomination", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1504:21:8", + "scope": 1142, + "src": "1569:21:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1357,10 +1411,10 @@ "typeString": "uint256" }, "typeName": { - "id": 943, + "id": 1107, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1504:7:8", + "src": "1569:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1371,11 +1425,11 @@ }, { "constant": false, - "id": 946, + "id": 1110, "name": "_merkleTreeHeight", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1531:24:8", + "scope": 1142, + "src": "1596:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1383,10 +1437,10 @@ "typeString": "uint32" }, "typeName": { - "id": 945, + "id": 1109, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "1531:6:8", + "src": "1596:6:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1397,11 +1451,11 @@ }, { "constant": false, - "id": 948, + "id": 1112, "name": "_operator", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1561:17:8", + "scope": 1142, + "src": "1626:17:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1409,10 +1463,10 @@ "typeString": "address" }, "typeName": { - "id": 947, + "id": 1111, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1561:7:8", + "src": "1626:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1423,25 +1477,25 @@ "visibility": "internal" } ], - "src": "1444:138:8" + "src": "1509:138:5" }, "returnParameters": { - "id": 953, + "id": 1117, "nodeType": "ParameterList", "parameters": [], - "src": "1631:0:8" + "src": "1696:0:5" }, - "scope": 1204, - "src": "1433:392:8", + "scope": 1363, + "src": "1498:392:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 1015, + "id": 1179, "nodeType": "Block", - "src": "2141:256:8", + "src": "2206:256:5", "statements": [ { "expression": { @@ -1449,7 +1503,7 @@ "arguments": [ { "argumentTypes": null, - "id": 989, + "id": 1153, "isConstant": false, "isLValue": false, "isPure": false, @@ -1457,31 +1511,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "2155:25:8", + "src": "2220:25:5", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 986, + "id": 1150, "name": "commitments", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "2156:11:8", + "referencedDeclaration": 1066, + "src": "2221:11:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 988, + "id": 1152, "indexExpression": { "argumentTypes": null, - "id": 987, + "id": 1151, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2168:11:8", + "referencedDeclaration": 1144, + "src": "2233:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1492,7 +1546,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2156:24:8", + "src": "2221:24:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1506,14 +1560,14 @@ { "argumentTypes": null, "hexValue": "54686520636f6d6d69746d656e7420686173206265656e207375626d6974746564", - "id": 990, + "id": 1154, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2182:35:8", + "src": "2247:35:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ae5f231636554c1cb3bf839359e4dfbb338ccb221c7c5dbdf2da91ddc6e2ee6b", @@ -1533,21 +1587,21 @@ "typeString": "literal_string \"The commitment has been submitted\"" } ], - "id": 985, + "id": 1149, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "2147:7:8", + "referencedDeclaration": 1412, + "src": "2212:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 991, + "id": 1155, "isConstant": false, "isLValue": false, "isPure": false, @@ -1555,28 +1609,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2147:71:8", + "src": "2212:71:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 992, + "id": 1156, "nodeType": "ExpressionStatement", - "src": "2147:71:8" + "src": "2212:71:5" }, { "assignments": [ - 994 + 1158 ], "declarations": [ { "constant": false, - "id": 994, + "id": 1158, "name": "insertedIndex", "nodeType": "VariableDeclaration", - "scope": 1015, - "src": "2225:20:8", + "scope": 1179, + "src": "2290:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1584,10 +1638,10 @@ "typeString": "uint32" }, "typeName": { - "id": 993, + "id": 1157, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "2225:6:8", + "src": "2290:6:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1597,18 +1651,18 @@ "visibility": "internal" } ], - "id": 998, + "id": 1162, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 996, + "id": 1160, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2256:11:8", + "referencedDeclaration": 1144, + "src": "2321:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1622,18 +1676,18 @@ "typeString": "bytes32" } ], - "id": 995, + "id": 1159, "name": "_insert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 627, - "src": "2248:7:8", + "referencedDeclaration": 780, + "src": "2313:7:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_uint32_$", "typeString": "function (bytes32) returns (uint32)" } }, - "id": 997, + "id": 1161, "isConstant": false, "isLValue": false, "isPure": false, @@ -1641,19 +1695,19 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2248:20:8", + "src": "2313:20:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "VariableDeclarationStatement", - "src": "2225:43:8" + "src": "2290:43:5" }, { "expression": { "argumentTypes": null, - "id": 1003, + "id": 1167, "isConstant": false, "isLValue": false, "isPure": false, @@ -1662,26 +1716,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 999, + "id": 1163, "name": "commitments", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "2274:11:8", + "referencedDeclaration": 1066, + "src": "2339:11:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1001, + "id": 1165, "indexExpression": { "argumentTypes": null, - "id": 1000, + "id": 1164, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2286:11:8", + "referencedDeclaration": 1144, + "src": "2351:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1692,7 +1746,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2274:24:8", + "src": "2339:24:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1703,14 +1757,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1002, + "id": 1166, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "2301:4:8", + "src": "2366:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -1718,15 +1772,15 @@ }, "value": "true" }, - "src": "2274:31:8", + "src": "2339:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1004, + "id": 1168, "nodeType": "ExpressionStatement", - "src": "2274:31:8" + "src": "2339:31:5" }, { "expression": { @@ -1734,18 +1788,18 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 1005, + "id": 1169, "name": "_processDeposit", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1019, - "src": "2311:15:8", + "referencedDeclaration": 1183, + "src": "2376:15:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, - "id": 1006, + "id": 1170, "isConstant": false, "isLValue": false, "isPure": false, @@ -1753,15 +1807,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2311:17:8", + "src": "2376:17:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1007, + "id": 1171, "nodeType": "ExpressionStatement", - "src": "2311:17:8" + "src": "2376:17:5" }, { "eventCall": { @@ -1769,12 +1823,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1009, + "id": 1173, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2348:11:8", + "referencedDeclaration": 1144, + "src": "2413:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1782,12 +1836,12 @@ }, { "argumentTypes": null, - "id": 1010, + "id": 1174, "name": "insertedIndex", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 994, - "src": "2361:13:8", + "referencedDeclaration": 1158, + "src": "2426:13:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1797,18 +1851,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1011, + "id": 1175, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3260, - "src": "2376:5:8", + "referencedDeclaration": 1398, + "src": "2441:5:5", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 1012, + "id": 1176, "isConstant": false, "isLValue": false, "isPure": false, @@ -1816,7 +1870,7 @@ "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2376:15:8", + "src": "2441:15:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1838,18 +1892,18 @@ "typeString": "uint256" } ], - "id": 1008, + "id": 1172, "name": "Deposit", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "2340:7:8", + "referencedDeclaration": 1092, + "src": "2405:7:5", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint32_$_t_uint256_$returns$__$", "typeString": "function (bytes32,uint32,uint256)" } }, - "id": 1013, + "id": 1177, "isConstant": false, "isLValue": false, "isPure": false, @@ -1857,56 +1911,56 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2340:52:8", + "src": "2405:52:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1014, + "id": 1178, "nodeType": "EmitStatement", - "src": "2335:57:8" + "src": "2400:57:5" } ] }, "documentation": "@dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\n@param _commitment the note commitment, which is PedersenHash(nullifier + secret)", - "id": 1016, + "id": 1180, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 983, + "id": 1147, "modifierName": { "argumentTypes": null, - "id": 982, + "id": 1146, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "2128:12:8", + "referencedDeclaration": 1392, + "src": "2193:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "2128:12:8" + "src": "2193:12:5" } ], "name": "deposit", "nodeType": "FunctionDefinition", "parameters": { - "id": 981, + "id": 1145, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 980, + "id": 1144, "name": "_commitment", "nodeType": "VariableDeclaration", - "scope": 1016, - "src": "2090:19:8", + "scope": 1180, + "src": "2155:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1914,10 +1968,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 979, + "id": 1143, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2090:7:8", + "src": "2155:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1927,16 +1981,16 @@ "visibility": "internal" } ], - "src": "2089:21:8" + "src": "2154:21:5" }, "returnParameters": { - "id": 984, + "id": 1148, "nodeType": "ParameterList", "parameters": [], - "src": "2141:0:8" + "src": "2206:0:5" }, - "scope": 1204, - "src": "2073:324:8", + "scope": 1363, + "src": "2138:324:5", "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -1944,35 +1998,35 @@ { "body": null, "documentation": "@dev this function is defined in a child contract ", - "id": 1019, + "id": 1183, "implemented": false, "kind": "function", "modifiers": [], "name": "_processDeposit", "nodeType": "FunctionDefinition", "parameters": { - "id": 1017, + "id": 1181, "nodeType": "ParameterList", "parameters": [], - "src": "2484:2:8" + "src": "2549:2:5" }, "returnParameters": { - "id": 1018, + "id": 1182, "nodeType": "ParameterList", "parameters": [], - "src": "2495:0:8" + "src": "2560:0:5" }, - "scope": 1204, - "src": "2460:36:8", + "scope": 1363, + "src": "2525:36:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1106, + "id": 1267, "nodeType": "Block", - "src": "3088:606:8", + "src": "3153:586:5", "statements": [ { "expression": { @@ -1984,19 +2038,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1041, + "id": 1205, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1039, + "id": 1203, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3102:4:8", + "referencedDeclaration": 1195, + "src": "3167:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2006,18 +2060,18 @@ "operator": "<=", "rightExpression": { "argumentTypes": null, - "id": 1040, + "id": 1204, "name": "denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 894, - "src": "3110:12:8", + "referencedDeclaration": 1058, + "src": "3175:12:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3102:20:8", + "src": "3167:20:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2026,14 +2080,14 @@ { "argumentTypes": null, "hexValue": "4665652065786365656473207472616e736665722076616c7565", - "id": 1042, + "id": 1206, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3124:28:8", + "src": "3189:28:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2ce218df547d416f80ea8a5deadaf9453d23523ffa5f2e880a48adfdb4053a9c", @@ -2053,21 +2107,21 @@ "typeString": "literal_string \"Fee exceeds transfer value\"" } ], - "id": 1038, + "id": 1202, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3094:7:8", + "referencedDeclaration": 1412, + "src": "3159:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1043, + "id": 1207, "isConstant": false, "isLValue": false, "isPure": false, @@ -2075,15 +2129,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3094:59:8", + "src": "3159:59:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1044, + "id": 1208, "nodeType": "ExpressionStatement", - "src": "3094:59:8" + "src": "3159:59:5" }, { "expression": { @@ -2091,7 +2145,7 @@ "arguments": [ { "argumentTypes": null, - "id": 1049, + "id": 1213, "isConstant": false, "isLValue": false, "isPure": false, @@ -2099,31 +2153,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "3167:32:8", + "src": "3232:32:5", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1046, + "id": 1210, "name": "nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 898, - "src": "3168:15:8", + "referencedDeclaration": 1062, + "src": "3233:15:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1048, + "id": 1212, "indexExpression": { "argumentTypes": null, - "id": 1047, + "id": 1211, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3184:14:8", + "referencedDeclaration": 1189, + "src": "3249:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2134,7 +2188,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3168:31:8", + "src": "3233:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2148,14 +2202,14 @@ { "argumentTypes": null, "hexValue": "546865206e6f746520686173206265656e20616c7265616479207370656e74", - "id": 1050, + "id": 1214, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3201:33:8", + "src": "3266:33:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_a1bef92d7a18b1c6975dc8de68df6140a52afea05a2c6c91da2b1562c617e896", @@ -2175,21 +2229,21 @@ "typeString": "literal_string \"The note has been already spent\"" } ], - "id": 1045, + "id": 1209, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3159:7:8", + "referencedDeclaration": 1412, + "src": "3224:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1051, + "id": 1215, "isConstant": false, "isLValue": false, "isPure": false, @@ -2197,15 +2251,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3159:76:8", + "src": "3224:76:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1052, + "id": 1216, "nodeType": "ExpressionStatement", - "src": "3159:76:8" + "src": "3224:76:5" }, { "expression": { @@ -2216,12 +2270,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1055, + "id": 1219, "name": "_root", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "3261:5:8", + "referencedDeclaration": 1187, + "src": "3326:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2235,18 +2289,18 @@ "typeString": "bytes32" } ], - "id": 1054, + "id": 1218, "name": "isKnownRoot", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 674, - "src": "3249:11:8", + "referencedDeclaration": 827, + "src": "3314:11:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$", "typeString": "function (bytes32) view returns (bool)" } }, - "id": 1056, + "id": 1220, "isConstant": false, "isLValue": false, "isPure": false, @@ -2254,7 +2308,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3249:18:8", + "src": "3314:18:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2263,14 +2317,14 @@ { "argumentTypes": null, "hexValue": "43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f74", - "id": 1057, + "id": 1221, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3269:30:8", + "src": "3334:30:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2a69086763073955418d2fd7dfee3d2f1fbc5b21047a216b7855d3f313d8e204", @@ -2290,21 +2344,21 @@ "typeString": "literal_string \"Cannot find your merkle root\"" } ], - "id": 1053, + "id": 1217, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3241:7:8", + "referencedDeclaration": 1412, + "src": "3306:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1058, + "id": 1222, "isConstant": false, "isLValue": false, "isPure": false, @@ -2312,15 +2366,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3241:59:8", + "src": "3306:59:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1059, + "id": 1223, "nodeType": "ExpressionStatement", - "src": "3241:59:8" + "src": "3306:59:5" }, { "expression": { @@ -2331,12 +2385,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1063, + "id": 1227, "name": "_proof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "3368:6:8", + "referencedDeclaration": 1185, + "src": "3433:6:5", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" @@ -2350,12 +2404,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1065, + "id": 1229, "name": "_root", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "3385:5:8", + "referencedDeclaration": 1187, + "src": "3450:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2369,20 +2423,20 @@ "typeString": "bytes32" } ], - "id": 1064, + "id": 1228, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3377:7:8", + "src": "3442:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1066, + "id": 1230, "isConstant": false, "isLValue": false, "isPure": false, @@ -2390,7 +2444,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3377:14:8", + "src": "3442:14:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2401,12 +2455,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1068, + "id": 1232, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3401:14:8", + "referencedDeclaration": 1189, + "src": "3466:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2420,20 +2474,20 @@ "typeString": "bytes32" } ], - "id": 1067, + "id": 1231, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3393:7:8", + "src": "3458:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1069, + "id": 1233, "isConstant": false, "isLValue": false, "isPure": false, @@ -2441,7 +2495,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3393:23:8", + "src": "3458:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2452,12 +2506,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1071, + "id": 1235, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "3426:10:8", + "referencedDeclaration": 1191, + "src": "3491:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2471,20 +2525,20 @@ "typeString": "address payable" } ], - "id": 1070, + "id": 1234, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3418:7:8", + "src": "3483:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1072, + "id": 1236, "isConstant": false, "isLValue": false, "isPure": false, @@ -2492,7 +2546,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3418:19:8", + "src": "3483:19:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2503,12 +2557,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1074, + "id": 1238, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "3447:8:8", + "referencedDeclaration": 1193, + "src": "3512:8:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2522,20 +2576,20 @@ "typeString": "address payable" } ], - "id": 1073, + "id": 1237, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3439:7:8", + "src": "3504:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1075, + "id": 1239, "isConstant": false, "isLValue": false, "isPure": false, @@ -2543,7 +2597,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3439:17:8", + "src": "3504:17:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2551,12 +2605,12 @@ }, { "argumentTypes": null, - "id": 1076, + "id": 1240, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3458:4:8", + "referencedDeclaration": 1195, + "src": "3523:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2564,26 +2618,26 @@ }, { "argumentTypes": null, - "id": 1077, + "id": 1241, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1033, - "src": "3464:7:8", + "referencedDeclaration": 1197, + "src": "3529:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 1078, + "id": 1242, "isConstant": false, "isInlineArray": true, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "3376:96:8", + "src": "3441:96:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", "typeString": "uint256[6] memory" @@ -2603,32 +2657,32 @@ ], "expression": { "argumentTypes": null, - "id": 1061, + "id": 1225, "name": "verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "3347:8:8", + "referencedDeclaration": 1068, + "src": "3412:8:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "id": 1062, + "id": 1226, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "verifyProof", "nodeType": "MemberAccess", - "referencedDeclaration": 881, - "src": "3347:20:8", + "referencedDeclaration": 1040, + "src": "3412:20:5", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_bytes_memory_ptr_$_t_array$_t_uint256_$6_memory_ptr_$returns$_t_bool_$", "typeString": "function (bytes memory,uint256[6] memory) external returns (bool)" } }, - "id": 1079, + "id": 1243, "isConstant": false, "isLValue": false, "isPure": false, @@ -2636,7 +2690,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3347:126:8", + "src": "3412:126:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2645,14 +2699,14 @@ { "argumentTypes": null, "hexValue": "496e76616c69642077697468647261772070726f6f66", - "id": 1080, + "id": 1244, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3475:24:8", + "src": "3540:24:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_7021ea58137dba96e572e94936410b0b0e4cbc344e1ab2ee7f47660768b81ff4", @@ -2672,21 +2726,21 @@ "typeString": "literal_string \"Invalid withdraw proof\"" } ], - "id": 1060, + "id": 1224, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3339:7:8", + "referencedDeclaration": 1412, + "src": "3404:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1081, + "id": 1245, "isConstant": false, "isLValue": false, "isPure": false, @@ -2694,20 +2748,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3339:161:8", + "src": "3404:161:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1082, + "id": 1246, "nodeType": "ExpressionStatement", - "src": "3339:161:8" + "src": "3404:161:5" }, { "expression": { "argumentTypes": null, - "id": 1087, + "id": 1251, "isConstant": false, "isLValue": false, "isPure": false, @@ -2716,26 +2770,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1083, + "id": 1247, "name": "nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 898, - "src": "3507:15:8", + "referencedDeclaration": 1062, + "src": "3572:15:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1085, + "id": 1249, "indexExpression": { "argumentTypes": null, - "id": 1084, + "id": 1248, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3523:14:8", + "referencedDeclaration": 1189, + "src": "3588:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2746,7 +2800,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3507:31:8", + "src": "3572:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2757,14 +2811,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1086, + "id": 1250, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3541:4:8", + "src": "3606:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -2772,15 +2826,15 @@ }, "value": "true" }, - "src": "3507:38:8", + "src": "3572:38:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1088, + "id": 1252, "nodeType": "ExpressionStatement", - "src": "3507:38:8" + "src": "3572:38:5" }, { "expression": { @@ -2788,12 +2842,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1090, + "id": 1254, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "3568:10:8", + "referencedDeclaration": 1191, + "src": "3633:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2801,12 +2855,12 @@ }, { "argumentTypes": null, - "id": 1091, + "id": 1255, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "3580:8:8", + "referencedDeclaration": 1193, + "src": "3645:8:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2814,12 +2868,12 @@ }, { "argumentTypes": null, - "id": 1092, + "id": 1256, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3590:4:8", + "referencedDeclaration": 1195, + "src": "3655:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2827,62 +2881,16 @@ }, { "argumentTypes": null, - "id": 1093, + "id": 1257, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1033, - "src": "3596:7:8", + "referencedDeclaration": 1197, + "src": "3661:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 1094, - "name": "feeManager", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "3605:10:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", - "typeString": "contract IFeeManager" - } - }, - "id": 1095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "feeTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 887, - "src": "3605:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", - "typeString": "function () view external returns (address)" - } - }, - "id": 1096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3605:18:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } } ], "expression": { @@ -2902,24 +2910,20 @@ { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" } ], - "id": 1089, + "id": 1253, "name": "_processWithdraw", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1120, - "src": "3551:16:8", + "referencedDeclaration": 1279, + "src": "3616:16:5", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_address_payable_$_t_uint256_$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (address payable,address payable,uint256,uint256,address)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_address_payable_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address payable,address payable,uint256,uint256)" } }, - "id": 1097, + "id": 1258, "isConstant": false, "isLValue": false, "isPure": false, @@ -2927,15 +2931,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3551:73:8", + "src": "3616:53:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1098, + "id": 1259, "nodeType": "ExpressionStatement", - "src": "3551:73:8" + "src": "3616:53:5" }, { "eventCall": { @@ -2943,12 +2947,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1100, + "id": 1261, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "3646:10:8", + "referencedDeclaration": 1191, + "src": "3691:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2956,12 +2960,12 @@ }, { "argumentTypes": null, - "id": 1101, + "id": 1262, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3658:14:8", + "referencedDeclaration": 1189, + "src": "3703:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2969,12 +2973,12 @@ }, { "argumentTypes": null, - "id": 1102, + "id": 1263, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "3674:8:8", + "referencedDeclaration": 1193, + "src": "3719:8:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2982,12 +2986,12 @@ }, { "argumentTypes": null, - "id": 1103, + "id": 1264, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3684:4:8", + "referencedDeclaration": 1195, + "src": "3729:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3013,18 +3017,18 @@ "typeString": "uint256" } ], - "id": 1099, + "id": 1260, "name": "Withdrawal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 938, - "src": "3635:10:8", + "referencedDeclaration": 1102, + "src": "3680:10:5", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,bytes32,address,uint256)" } }, - "id": 1104, + "id": 1265, "isConstant": false, "isLValue": false, "isPure": false, @@ -3032,56 +3036,56 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3635:54:8", + "src": "3680:54:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1105, + "id": 1266, "nodeType": "EmitStatement", - "src": "3630:59:8" + "src": "3675:59:5" } ] }, "documentation": "@dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs\n`input` array consists of:\n- merkle root of all deposits in the contract\n- hash of unique deposit nullifier to prevent double spends\n- the recipient of funds\n- optional fee that goes to the transaction sender (usually a relay)", - "id": 1107, + "id": 1268, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 1036, + "id": 1200, "modifierName": { "argumentTypes": null, - "id": 1035, + "id": 1199, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "3075:12:8", + "referencedDeclaration": 1392, + "src": "3140:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "3075:12:8" + "src": "3140:12:5" } ], "name": "withdraw", "nodeType": "FunctionDefinition", "parameters": { - "id": 1034, + "id": 1198, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1021, + "id": 1185, "name": "_proof", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2911:21:8", + "scope": 1268, + "src": "2976:21:5", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -3089,10 +3093,10 @@ "typeString": "bytes" }, "typeName": { - "id": 1020, + "id": 1184, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2911:5:8", + "src": "2976:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -3103,11 +3107,11 @@ }, { "constant": false, - "id": 1023, + "id": 1187, "name": "_root", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2934:13:8", + "scope": 1268, + "src": "2999:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3115,10 +3119,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1022, + "id": 1186, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2934:7:8", + "src": "2999:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3129,11 +3133,11 @@ }, { "constant": false, - "id": 1025, + "id": 1189, "name": "_nullifierHash", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2949:22:8", + "scope": 1268, + "src": "3014:22:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3141,10 +3145,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1024, + "id": 1188, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2949:7:8", + "src": "3014:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3155,11 +3159,11 @@ }, { "constant": false, - "id": 1027, + "id": 1191, "name": "_recipient", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2973:26:8", + "scope": 1268, + "src": "3038:26:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3167,10 +3171,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1026, + "id": 1190, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2973:15:8", + "src": "3038:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3182,11 +3186,11 @@ }, { "constant": false, - "id": 1029, + "id": 1193, "name": "_relayer", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "3001:24:8", + "scope": 1268, + "src": "3066:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3194,10 +3198,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1028, + "id": 1192, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3001:15:8", + "src": "3066:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3209,11 +3213,11 @@ }, { "constant": false, - "id": 1031, + "id": 1195, "name": "_fee", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "3027:12:8", + "scope": 1268, + "src": "3092:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3221,10 +3225,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1030, + "id": 1194, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3027:7:8", + "src": "3092:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3235,11 +3239,11 @@ }, { "constant": false, - "id": 1033, + "id": 1197, "name": "_refund", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "3041:15:8", + "scope": 1268, + "src": "3106:15:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3247,10 +3251,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1032, + "id": 1196, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3041:7:8", + "src": "3106:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3260,16 +3264,16 @@ "visibility": "internal" } ], - "src": "2910:147:8" + "src": "2975:147:5" }, "returnParameters": { - "id": 1037, + "id": 1201, "nodeType": "ParameterList", "parameters": [], - "src": "3088:0:8" + "src": "3153:0:5" }, - "scope": 1204, - "src": "2893:801:8", + "scope": 1363, + "src": "2958:781:5", "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -3277,23 +3281,23 @@ { "body": null, "documentation": "@dev this function is defined in a child contract ", - "id": 1120, + "id": 1279, "implemented": false, "kind": "function", "modifiers": [], "name": "_processWithdraw", "nodeType": "FunctionDefinition", "parameters": { - "id": 1118, + "id": 1277, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1109, + "id": 1270, "name": "_recipient", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3783:26:8", + "scope": 1279, + "src": "3828:26:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3301,10 +3305,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1108, + "id": 1269, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3783:15:8", + "src": "3828:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3316,11 +3320,11 @@ }, { "constant": false, - "id": 1111, + "id": 1272, "name": "_relayer", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3811:24:8", + "scope": 1279, + "src": "3856:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3328,10 +3332,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1110, + "id": 1271, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3811:15:8", + "src": "3856:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3343,11 +3347,11 @@ }, { "constant": false, - "id": 1113, + "id": 1274, "name": "_relayer_fee", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3837:20:8", + "scope": 1279, + "src": "3882:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3355,10 +3359,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1112, + "id": 1273, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3837:7:8", + "src": "3882:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3369,11 +3373,11 @@ }, { "constant": false, - "id": 1115, + "id": 1276, "name": "_refund", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3859:15:8", + "scope": 1279, + "src": "3904:15:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3381,10 +3385,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1114, + "id": 1275, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3859:7:8", + "src": "3904:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3392,80 +3396,53 @@ }, "value": null, "visibility": "internal" - }, - { - "constant": false, - "id": 1117, - "name": "_feeTo", - "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3876:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1116, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3876:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" } ], - "src": "3782:109:8" + "src": "3827:93:5" }, "returnParameters": { - "id": 1119, + "id": 1278, "nodeType": "ParameterList", "parameters": [], - "src": "3900:0:8" + "src": "3929:0:5" }, - "scope": 1204, - "src": "3757:144:8", + "scope": 1363, + "src": "3802:128:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1131, + "id": 1290, "nodeType": "Block", - "src": "4018:49:8", + "src": "4047:49:5", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1127, + "id": 1286, "name": "nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 898, - "src": "4031:15:8", + "referencedDeclaration": 1062, + "src": "4060:15:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1129, + "id": 1288, "indexExpression": { "argumentTypes": null, - "id": 1128, + "id": 1287, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1122, - "src": "4047:14:8", + "referencedDeclaration": 1281, + "src": "4076:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3476,37 +3453,37 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4031:31:8", + "src": "4060:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 1126, - "id": 1130, + "functionReturnParameters": 1285, + "id": 1289, "nodeType": "Return", - "src": "4024:38:8" + "src": "4053:38:5" } ] }, "documentation": "@dev whether a note is already spent ", - "id": 1132, + "id": 1291, "implemented": true, "kind": "function", "modifiers": [], "name": "isSpent", "nodeType": "FunctionDefinition", "parameters": { - "id": 1123, + "id": 1282, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1122, + "id": 1281, "name": "_nullifierHash", "nodeType": "VariableDeclaration", - "scope": 1132, - "src": "3968:22:8", + "scope": 1291, + "src": "3997:22:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3514,10 +3491,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1121, + "id": 1280, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3968:7:8", + "src": "3997:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3527,19 +3504,19 @@ "visibility": "internal" } ], - "src": "3967:24:8" + "src": "3996:24:5" }, "returnParameters": { - "id": 1126, + "id": 1285, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1125, + "id": 1284, "name": "", "nodeType": "VariableDeclaration", - "scope": 1132, - "src": "4012:4:8", + "scope": 1291, + "src": "4041:4:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3547,10 +3524,10 @@ "typeString": "bool" }, "typeName": { - "id": 1124, + "id": 1283, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4012:4:8", + "src": "4041:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3560,36 +3537,36 @@ "visibility": "internal" } ], - "src": "4011:6:8" + "src": "4040:6:5" }, - "scope": 1204, - "src": "3951:116:8", + "scope": 1363, + "src": "3980:116:5", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 1176, + "id": 1335, "nodeType": "Block", - "src": "4230:191:8", + "src": "4259:191:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1148, + "id": 1307, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 1141, + "id": 1300, "name": "spent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1139, - "src": "4236:5:8", + "referencedDeclaration": 1298, + "src": "4265:5:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", "typeString": "bool[] memory" @@ -3604,18 +3581,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1145, + "id": 1304, "name": "_nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1135, - "src": "4255:16:8", + "referencedDeclaration": 1294, + "src": "4284:16:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", "typeString": "bytes32[] calldata" } }, - "id": 1146, + "id": 1305, "isConstant": false, "isLValue": false, "isPure": false, @@ -3623,7 +3600,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4255:23:8", + "src": "4284:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3637,39 +3614,39 @@ "typeString": "uint256" } ], - "id": 1144, + "id": 1303, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", - "src": "4244:10:8", + "src": "4273:10:5", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bool_$dyn_memory_$", "typeString": "function (uint256) pure returns (bool[] memory)" }, "typeName": { "baseType": { - "id": 1142, + "id": 1301, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4248:4:8", + "src": "4277:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1143, + "id": 1302, "length": null, "nodeType": "ArrayTypeName", - "src": "4248:6:8", + "src": "4277:6:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr", "typeString": "bool[]" } } }, - "id": 1147, + "id": 1306, "isConstant": false, "isLValue": false, "isPure": false, @@ -3677,27 +3654,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4244:35:8", + "src": "4273:35:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory", "typeString": "bool[] memory" } }, - "src": "4236:43:8", + "src": "4265:43:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", "typeString": "bool[] memory" } }, - "id": 1149, + "id": 1308, "nodeType": "ExpressionStatement", - "src": "4236:43:8" + "src": "4265:43:5" }, { "body": { - "id": 1174, + "id": 1333, "nodeType": "Block", - "src": "4335:82:8", + "src": "4364:82:5", "statements": [ { "condition": { @@ -3707,26 +3684,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1162, + "id": 1321, "name": "_nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1135, - "src": "4355:16:8", + "referencedDeclaration": 1294, + "src": "4384:16:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", "typeString": "bytes32[] calldata" } }, - "id": 1164, + "id": 1323, "indexExpression": { "argumentTypes": null, - "id": 1163, + "id": 1322, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4372:1:8", + "referencedDeclaration": 1310, + "src": "4401:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3737,7 +3714,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4355:19:8", + "src": "4384:19:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3751,18 +3728,18 @@ "typeString": "bytes32" } ], - "id": 1161, + "id": 1320, "name": "isSpent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1132, - "src": "4347:7:8", + "referencedDeclaration": 1291, + "src": "4376:7:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$", "typeString": "function (bytes32) view returns (bool)" } }, - "id": 1165, + "id": 1324, "isConstant": false, "isLValue": false, "isPure": false, @@ -3770,25 +3747,25 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4347:28:8", + "src": "4376:28:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 1173, + "id": 1332, "nodeType": "IfStatement", - "src": "4343:68:8", + "src": "4372:68:5", "trueBody": { - "id": 1172, + "id": 1331, "nodeType": "Block", - "src": "4377:34:8", + "src": "4406:34:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1170, + "id": 1329, "isConstant": false, "isLValue": false, "isPure": false, @@ -3797,26 +3774,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1166, + "id": 1325, "name": "spent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1139, - "src": "4387:5:8", + "referencedDeclaration": 1298, + "src": "4416:5:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", "typeString": "bool[] memory" } }, - "id": 1168, + "id": 1327, "indexExpression": { "argumentTypes": null, - "id": 1167, + "id": 1326, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4393:1:8", + "referencedDeclaration": 1310, + "src": "4422:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3827,7 +3804,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4387:8:8", + "src": "4416:8:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3838,14 +3815,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1169, + "id": 1328, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "4398:4:8", + "src": "4427:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3853,15 +3830,15 @@ }, "value": "true" }, - "src": "4387:15:8", + "src": "4416:15:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1171, + "id": 1330, "nodeType": "ExpressionStatement", - "src": "4387:15:8" + "src": "4416:15:5" } ] } @@ -3874,19 +3851,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1157, + "id": 1316, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1154, + "id": 1313, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4301:1:8", + "referencedDeclaration": 1310, + "src": "4330:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3898,18 +3875,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1155, + "id": 1314, "name": "_nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1135, - "src": "4305:16:8", + "referencedDeclaration": 1294, + "src": "4334:16:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", "typeString": "bytes32[] calldata" } }, - "id": 1156, + "id": 1315, "isConstant": false, "isLValue": false, "isPure": false, @@ -3917,31 +3894,31 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4305:23:8", + "src": "4334:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4301:27:8", + "src": "4330:27:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1175, + "id": 1334, "initializationExpression": { "assignments": [ - 1151 + 1310 ], "declarations": [ { "constant": false, - "id": 1151, + "id": 1310, "name": "i", "nodeType": "VariableDeclaration", - "scope": 1175, - "src": "4289:6:8", + "scope": 1334, + "src": "4318:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3949,10 +3926,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1150, + "id": 1309, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4289:4:8", + "src": "4318:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3962,18 +3939,18 @@ "visibility": "internal" } ], - "id": 1153, + "id": 1312, "initialValue": { "argumentTypes": null, "hexValue": "30", - "id": 1152, + "id": 1311, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4298:1:8", + "src": "4327:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3982,12 +3959,12 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "4289:10:8" + "src": "4318:10:5" }, "loopExpression": { "expression": { "argumentTypes": null, - "id": 1159, + "id": 1318, "isConstant": false, "isLValue": false, "isPure": false, @@ -3995,15 +3972,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "4330:3:8", + "src": "4359:3:5", "subExpression": { "argumentTypes": null, - "id": 1158, + "id": 1317, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4330:1:8", + "referencedDeclaration": 1310, + "src": "4359:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4014,33 +3991,33 @@ "typeString": "uint256" } }, - "id": 1160, + "id": 1319, "nodeType": "ExpressionStatement", - "src": "4330:3:8" + "src": "4359:3:5" }, "nodeType": "ForStatement", - "src": "4285:132:8" + "src": "4314:132:5" } ] }, "documentation": "@dev whether an array of notes is already spent ", - "id": 1177, + "id": 1336, "implemented": true, "kind": "function", "modifiers": [], "name": "isSpentArray", "nodeType": "FunctionDefinition", "parameters": { - "id": 1136, + "id": 1295, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1135, + "id": 1294, "name": "_nullifierHashes", "nodeType": "VariableDeclaration", - "scope": 1177, - "src": "4150:35:8", + "scope": 1336, + "src": "4179:35:5", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -4049,19 +4026,19 @@ }, "typeName": { "baseType": { - "id": 1133, + "id": 1292, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4150:7:8", + "src": "4179:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 1134, + "id": 1293, "length": null, "nodeType": "ArrayTypeName", - "src": "4150:9:8", + "src": "4179:9:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", "typeString": "bytes32[]" @@ -4071,19 +4048,19 @@ "visibility": "internal" } ], - "src": "4149:37:8" + "src": "4178:37:5" }, "returnParameters": { - "id": 1140, + "id": 1299, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1139, + "id": 1298, "name": "spent", "nodeType": "VariableDeclaration", - "scope": 1177, - "src": "4209:19:8", + "scope": 1336, + "src": "4238:19:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -4092,19 +4069,19 @@ }, "typeName": { "baseType": { - "id": 1137, + "id": 1296, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4209:4:8", + "src": "4238:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1138, + "id": 1297, "length": null, "nodeType": "ArrayTypeName", - "src": "4209:6:8", + "src": "4238:6:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr", "typeString": "bool[]" @@ -4114,38 +4091,38 @@ "visibility": "internal" } ], - "src": "4208:21:8" + "src": "4237:21:5" }, - "scope": 1204, - "src": "4128:293:8", + "scope": 1363, + "src": "4157:293:5", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1190, + "id": 1349, "nodeType": "Block", - "src": "4719:45:8", + "src": "4748:45:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1188, + "id": 1347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 1184, + "id": 1343, "name": "verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "4725:8:8", + "referencedDeclaration": 1068, + "src": "4754:8:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -4156,12 +4133,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1186, + "id": 1345, "name": "_newVerifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1179, - "src": "4746:12:8", + "referencedDeclaration": 1338, + "src": "4775:12:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4175,18 +4152,18 @@ "typeString": "address" } ], - "id": 1185, + "id": 1344, "name": "IVerifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 882, - "src": "4736:9:8", + "referencedDeclaration": 1041, + "src": "4765:9:5", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IVerifier_$882_$", + "typeIdentifier": "t_type$_t_contract$_IVerifier_$1041_$", "typeString": "type(contract IVerifier)" } }, - "id": 1187, + "id": 1346, "isConstant": false, "isLValue": false, "isPure": false, @@ -4194,62 +4171,62 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4736:23:8", + "src": "4765:23:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "src": "4725:34:8", + "src": "4754:34:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "id": 1189, + "id": 1348, "nodeType": "ExpressionStatement", - "src": "4725:34:8" + "src": "4754:34:5" } ] }, "documentation": "@dev allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held.\nAfter that operator rights are supposed to be transferred to zero address", - "id": 1191, + "id": 1350, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 1182, + "id": 1341, "modifierName": { "argumentTypes": null, - "id": 1181, + "id": 1340, "name": "onlyOperator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 920, - "src": "4706:12:8", + "referencedDeclaration": 1084, + "src": "4735:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "4706:12:8" + "src": "4735:12:5" } ], "name": "updateVerifier", "nodeType": "FunctionDefinition", "parameters": { - "id": 1180, + "id": 1339, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1179, + "id": 1338, "name": "_newVerifier", "nodeType": "VariableDeclaration", - "scope": 1191, - "src": "4675:20:8", + "scope": 1350, + "src": "4704:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4257,10 +4234,10 @@ "typeString": "address" }, "typeName": { - "id": 1178, + "id": 1337, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4675:7:8", + "src": "4704:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4271,42 +4248,42 @@ "visibility": "internal" } ], - "src": "4674:22:8" + "src": "4703:22:5" }, "returnParameters": { - "id": 1183, + "id": 1342, "nodeType": "ParameterList", "parameters": [], - "src": "4719:0:8" + "src": "4748:0:5" }, - "scope": 1204, - "src": "4651:113:8", + "scope": 1363, + "src": "4680:113:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1202, + "id": 1361, "nodeType": "Block", - "src": "4882:34:8", + "src": "4911:34:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1200, + "id": 1359, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 1198, + "id": 1357, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "4888:8:8", + "referencedDeclaration": 1072, + "src": "4917:8:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4316,67 +4293,67 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 1199, + "id": 1358, "name": "_newOperator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1193, - "src": "4899:12:8", + "referencedDeclaration": 1352, + "src": "4928:12:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4888:23:8", + "src": "4917:23:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1201, + "id": 1360, "nodeType": "ExpressionStatement", - "src": "4888:23:8" + "src": "4917:23:5" } ] }, "documentation": "@dev operator can change his address ", - "id": 1203, + "id": 1362, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 1196, + "id": 1355, "modifierName": { "argumentTypes": null, - "id": 1195, + "id": 1354, "name": "onlyOperator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 920, - "src": "4869:12:8", + "referencedDeclaration": 1084, + "src": "4898:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "4869:12:8" + "src": "4898:12:5" } ], "name": "changeOperator", "nodeType": "FunctionDefinition", "parameters": { - "id": 1194, + "id": 1353, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1193, + "id": 1352, "name": "_newOperator", "nodeType": "VariableDeclaration", - "scope": 1203, - "src": "4838:20:8", + "scope": 1362, + "src": "4867:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4384,10 +4361,10 @@ "typeString": "address" }, "typeName": { - "id": 1192, + "id": 1351, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4838:7:8", + "src": "4867:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4398,39 +4375,39 @@ "visibility": "internal" } ], - "src": "4837:22:8" + "src": "4866:22:5" }, "returnParameters": { - "id": 1197, + "id": 1356, "nodeType": "ParameterList", "parameters": [], - "src": "4882:0:8" + "src": "4911:0:5" }, - "scope": 1204, - "src": "4814:102:8", + "scope": 1363, + "src": "4843:102:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], - "scope": 1205, - "src": "318:4600:8" + "scope": 1364, + "src": "383:4564:5" } ], - "src": "0:4919:8" + "src": "0:4948:5" }, "legacyAST": { "attributes": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "exportedSymbols": { "IFeeManager": [ - 888 + 1052 ], "IVerifier": [ - 882 + 1041 ], "Tornado": [ - 1204 + 1363 ] } }, @@ -4443,39 +4420,39 @@ ".17" ] }, - "id": 868, + "id": 1027, "name": "PragmaDirective", - "src": "0:23:8" + "src": "0:23:5" }, { "attributes": { - "SourceUnit": 686, + "SourceUnit": 839, "absolutePath": "/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol", "file": "./MerkleTreeWithHistory.sol", - "scope": 1205, + "scope": 1364, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 869, + "id": 1028, "name": "ImportDirective", - "src": "25:37:8" + "src": "25:37:5" }, { "attributes": { - "SourceUnit": 3256, + "SourceUnit": 1394, "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "scope": 1205, + "scope": 1364, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 870, + "id": 1029, "name": "ImportDirective", - "src": "63:59:8" + "src": "63:59:5" }, { "attributes": { @@ -4489,10 +4466,10 @@ "documentation": null, "fullyImplemented": false, "linearizedBaseContracts": [ - 882 + 1041 ], "name": "IVerifier", - "scope": 1205 + "scope": 1364 }, "children": [ { @@ -4506,7 +4483,7 @@ null ], "name": "verifyProof", - "scope": 882, + "scope": 1041, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -4518,7 +4495,7 @@ "attributes": { "constant": false, "name": "_proof", - "scope": 881, + "scope": 1040, "stateVariable": false, "storageLocation": "memory", "type": "bytes", @@ -4531,20 +4508,20 @@ "name": "bytes", "type": "bytes" }, - "id": 871, + "id": 1030, "name": "ElementaryTypeName", - "src": "168:5:8" + "src": "168:5:5" } ], - "id": 872, + "id": 1031, "name": "VariableDeclaration", - "src": "168:19:8" + "src": "168:19:5" }, { "attributes": { "constant": false, "name": "_input", - "scope": 881, + "scope": 1040, "stateVariable": false, "storageLocation": "memory", "type": "uint256[6]", @@ -4562,9 +4539,9 @@ "name": "uint256", "type": "uint256" }, - "id": 873, + "id": 1032, "name": "ElementaryTypeName", - "src": "189:7:8" + "src": "189:7:5" }, { "attributes": { @@ -4579,24 +4556,24 @@ "type": "int_const 6", "value": "6" }, - "id": 874, + "id": 1033, "name": "Literal", - "src": "197:1:8" + "src": "197:1:5" } ], - "id": 875, + "id": 1034, "name": "ArrayTypeName", - "src": "189:10:8" + "src": "189:10:5" } ], - "id": 876, + "id": 1035, "name": "VariableDeclaration", - "src": "189:24:8" + "src": "189:24:5" } ], - "id": 877, + "id": 1036, "name": "ParameterList", - "src": "167:47:8" + "src": "167:47:5" }, { "children": [ @@ -4604,7 +4581,7 @@ "attributes": { "constant": false, "name": "", - "scope": 881, + "scope": 1040, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -4617,29 +4594,29 @@ "name": "bool", "type": "bool" }, - "id": 878, + "id": 1037, "name": "ElementaryTypeName", - "src": "230:4:8" + "src": "230:4:5" } ], - "id": 879, + "id": 1038, "name": "VariableDeclaration", - "src": "230:4:8" + "src": "230:4:5" } ], - "id": 880, + "id": 1039, "name": "ParameterList", - "src": "229:6:8" + "src": "229:6:5" } ], - "id": 881, + "id": 1040, "name": "FunctionDefinition", - "src": "147:89:8" + "src": "147:89:5" } ], - "id": 882, + "id": 1041, "name": "ContractDefinition", - "src": "124:114:8" + "src": "124:114:5" }, { "attributes": { @@ -4653,10 +4630,10 @@ "documentation": null, "fullyImplemented": false, "linearizedBaseContracts": [ - 888 + 1052 ], "name": "IFeeManager", - "scope": 1205 + "scope": 1364 }, "children": [ { @@ -4670,7 +4647,7 @@ null ], "name": "feeTo", - "scope": 888, + "scope": 1052, "stateMutability": "view", "superFunction": null, "visibility": "external" @@ -4683,9 +4660,9 @@ ] }, "children": [], - "id": 883, + "id": 1042, "name": "ParameterList", - "src": "279:2:8" + "src": "279:2:5" }, { "children": [ @@ -4693,7 +4670,7 @@ "attributes": { "constant": false, "name": "", - "scope": 887, + "scope": 1046, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -4707,46 +4684,112 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 884, + "id": 1043, "name": "ElementaryTypeName", - "src": "305:7:8" + "src": "305:7:5" } ], - "id": 885, + "id": 1044, "name": "VariableDeclaration", - "src": "305:7:8" + "src": "305:7:5" } ], - "id": 886, + "id": 1045, "name": "ParameterList", - "src": "304:9:8" + "src": "304:9:5" } ], - "id": 887, + "id": 1046, "name": "FunctionDefinition", - "src": "265:49:8" + "src": "265:49:5" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "protocolFeeDivisor", + "scope": 1052, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1047, + "name": "ParameterList", + "src": "344:2:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1051, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1048, + "name": "ElementaryTypeName", + "src": "370:7:5" + } + ], + "id": 1049, + "name": "VariableDeclaration", + "src": "370:7:5" + } + ], + "id": 1050, + "name": "ParameterList", + "src": "369:9:5" + } + ], + "id": 1051, + "name": "FunctionDefinition", + "src": "317:62:5" } ], - "id": 888, + "id": 1052, "name": "ContractDefinition", - "src": "240:76:8" + "src": "240:141:5" }, { "attributes": { "contractDependencies": [ - 685, - 3255 + 838, + 1393 ], "contractKind": "contract", "documentation": null, "fullyImplemented": false, "linearizedBaseContracts": [ - 1204, - 3255, - 685 + 1363, + 1393, + 838 ], "name": "Tornado", - "scope": 1205 + "scope": 1364 }, "children": [ { @@ -4758,17 +4801,17 @@ "attributes": { "contractScope": null, "name": "MerkleTreeWithHistory", - "referencedDeclaration": 685, + "referencedDeclaration": 838, "type": "contract MerkleTreeWithHistory" }, - "id": 889, + "id": 1053, "name": "UserDefinedTypeName", - "src": "338:21:8" + "src": "403:21:5" } ], - "id": 890, + "id": 1054, "name": "InheritanceSpecifier", - "src": "338:21:8" + "src": "403:21:5" }, { "attributes": { @@ -4779,23 +4822,23 @@ "attributes": { "contractScope": null, "name": "ReentrancyGuard", - "referencedDeclaration": 3255, + "referencedDeclaration": 1393, "type": "contract ReentrancyGuard" }, - "id": 891, + "id": 1055, "name": "UserDefinedTypeName", - "src": "361:15:8" + "src": "426:15:5" } ], - "id": 892, + "id": 1056, "name": "InheritanceSpecifier", - "src": "361:15:8" + "src": "426:15:5" }, { "attributes": { "constant": false, "name": "denomination", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -4808,20 +4851,20 @@ "name": "uint256", "type": "uint256" }, - "id": 893, + "id": 1057, "name": "ElementaryTypeName", - "src": "381:7:8" + "src": "446:7:5" } ], - "id": 894, + "id": 1058, "name": "VariableDeclaration", - "src": "381:27:8" + "src": "446:27:5" }, { "attributes": { "constant": false, "name": "nullifierHashes", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => bool)", @@ -4839,34 +4882,34 @@ "name": "bytes32", "type": "bytes32" }, - "id": 895, + "id": 1059, "name": "ElementaryTypeName", - "src": "420:7:8" + "src": "485:7:5" }, { "attributes": { "name": "bool", "type": "bool" }, - "id": 896, + "id": 1060, "name": "ElementaryTypeName", - "src": "431:4:8" + "src": "496:4:5" } ], - "id": 897, + "id": 1061, "name": "Mapping", - "src": "412:24:8" + "src": "477:24:5" } ], - "id": 898, + "id": 1062, "name": "VariableDeclaration", - "src": "412:47:8" + "src": "477:47:5" }, { "attributes": { "constant": false, "name": "commitments", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => bool)", @@ -4884,34 +4927,34 @@ "name": "bytes32", "type": "bytes32" }, - "id": 899, + "id": 1063, "name": "ElementaryTypeName", - "src": "562:7:8" + "src": "627:7:5" }, { "attributes": { "name": "bool", "type": "bool" }, - "id": 900, + "id": 1064, "name": "ElementaryTypeName", - "src": "573:4:8" + "src": "638:4:5" } ], - "id": 901, + "id": 1065, "name": "Mapping", - "src": "554:24:8" + "src": "619:24:5" } ], - "id": 902, + "id": 1066, "name": "VariableDeclaration", - "src": "554:43:8" + "src": "619:43:5" }, { "attributes": { "constant": false, "name": "verifier", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "contract IVerifier", @@ -4923,23 +4966,23 @@ "attributes": { "contractScope": null, "name": "IVerifier", - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "contract IVerifier" }, - "id": 903, + "id": 1067, "name": "UserDefinedTypeName", - "src": "601:9:8" + "src": "666:9:5" } ], - "id": 904, + "id": 1068, "name": "VariableDeclaration", - "src": "601:25:8" + "src": "666:25:5" }, { "attributes": { "constant": false, "name": "feeManager", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "contract IFeeManager", @@ -4951,23 +4994,23 @@ "attributes": { "contractScope": null, "name": "IFeeManager", - "referencedDeclaration": 888, + "referencedDeclaration": 1052, "type": "contract IFeeManager" }, - "id": 905, + "id": 1069, "name": "UserDefinedTypeName", - "src": "630:11:8" + "src": "695:11:5" } ], - "id": 906, + "id": 1070, "name": "VariableDeclaration", - "src": "630:29:8" + "src": "695:29:5" }, { "attributes": { "constant": false, "name": "operator", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -4981,14 +5024,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 907, + "id": 1071, "name": "ElementaryTypeName", - "src": "819:7:8" + "src": "884:7:5" } ], - "id": 908, + "id": 1072, "name": "VariableDeclaration", - "src": "819:23:8" + "src": "884:23:5" }, { "attributes": { @@ -5004,9 +5047,9 @@ ] }, "children": [], - "id": 909, + "id": 1073, "name": "ParameterList", - "src": "868:0:8" + "src": "933:0:5" }, { "children": [ @@ -5040,16 +5083,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 910, + "id": 1074, "name": "Identifier", - "src": "874:7:8" + "src": "939:7:5" }, { "attributes": { @@ -5084,18 +5127,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3270, + "referencedDeclaration": 1408, "type": "msg", "value": "msg" }, - "id": 911, + "id": 1075, "name": "Identifier", - "src": "882:3:8" + "src": "947:3:5" } ], - "id": 912, + "id": 1076, "name": "MemberAccess", - "src": "882:10:8" + "src": "947:10:5" }, { "attributes": { @@ -5103,18 +5146,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 908, + "referencedDeclaration": 1072, "type": "address", "value": "operator" }, - "id": 913, + "id": 1077, "name": "Identifier", - "src": "896:8:8" + "src": "961:8:5" } ], - "id": 914, + "id": 1078, "name": "BinaryOperation", - "src": "882:22:8" + "src": "947:22:5" }, { "attributes": { @@ -5129,34 +5172,34 @@ "type": "literal_string \"Only operator can call this function.\"", "value": "Only operator can call this function." }, - "id": 915, + "id": 1079, "name": "Literal", - "src": "906:39:8" + "src": "971:39:5" } ], - "id": 916, + "id": 1080, "name": "FunctionCall", - "src": "874:72:8" + "src": "939:72:5" } ], - "id": 917, + "id": 1081, "name": "ExpressionStatement", - "src": "874:72:8" + "src": "939:72:5" }, { - "id": 918, + "id": 1082, "name": "PlaceholderStatement", - "src": "952:1:8" + "src": "1017:1:5" } ], - "id": 919, + "id": 1083, "name": "Block", - "src": "868:90:8" + "src": "933:90:5" } ], - "id": 920, + "id": 1084, "name": "ModifierDefinition", - "src": "846:112:8" + "src": "911:112:5" }, { "attributes": { @@ -5172,7 +5215,7 @@ "constant": false, "indexed": true, "name": "commitment", - "scope": 928, + "scope": 1092, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5185,21 +5228,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 921, + "id": 1085, "name": "ElementaryTypeName", - "src": "976:7:8" + "src": "1041:7:5" } ], - "id": 922, + "id": 1086, "name": "VariableDeclaration", - "src": "976:26:8" + "src": "1041:26:5" }, { "attributes": { "constant": false, "indexed": false, "name": "leafIndex", - "scope": 928, + "scope": 1092, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -5212,21 +5255,21 @@ "name": "uint32", "type": "uint32" }, - "id": 923, + "id": 1087, "name": "ElementaryTypeName", - "src": "1004:6:8" + "src": "1069:6:5" } ], - "id": 924, + "id": 1088, "name": "VariableDeclaration", - "src": "1004:16:8" + "src": "1069:16:5" }, { "attributes": { "constant": false, "indexed": false, "name": "timestamp", - "scope": 928, + "scope": 1092, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5239,24 +5282,24 @@ "name": "uint256", "type": "uint256" }, - "id": 925, + "id": 1089, "name": "ElementaryTypeName", - "src": "1022:7:8" + "src": "1087:7:5" } ], - "id": 926, + "id": 1090, "name": "VariableDeclaration", - "src": "1022:17:8" + "src": "1087:17:5" } ], - "id": 927, + "id": 1091, "name": "ParameterList", - "src": "975:65:8" + "src": "1040:65:5" } ], - "id": 928, + "id": 1092, "name": "EventDefinition", - "src": "962:79:8" + "src": "1027:79:5" }, { "attributes": { @@ -5272,7 +5315,7 @@ "constant": false, "indexed": false, "name": "to", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5286,21 +5329,21 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 929, + "id": 1093, "name": "ElementaryTypeName", - "src": "1061:7:8" + "src": "1126:7:5" } ], - "id": 930, + "id": 1094, "name": "VariableDeclaration", - "src": "1061:10:8" + "src": "1126:10:5" }, { "attributes": { "constant": false, "indexed": false, "name": "nullifierHash", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5313,21 +5356,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 931, + "id": 1095, "name": "ElementaryTypeName", - "src": "1073:7:8" + "src": "1138:7:5" } ], - "id": 932, + "id": 1096, "name": "VariableDeclaration", - "src": "1073:21:8" + "src": "1138:21:5" }, { "attributes": { "constant": false, "indexed": true, "name": "relayer", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5341,21 +5384,21 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 933, + "id": 1097, "name": "ElementaryTypeName", - "src": "1096:7:8" + "src": "1161:7:5" } ], - "id": 934, + "id": 1098, "name": "VariableDeclaration", - "src": "1096:23:8" + "src": "1161:23:5" }, { "attributes": { "constant": false, "indexed": false, "name": "fee", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5368,24 +5411,24 @@ "name": "uint256", "type": "uint256" }, - "id": 935, + "id": 1099, "name": "ElementaryTypeName", - "src": "1121:7:8" + "src": "1186:7:5" } ], - "id": 936, + "id": 1100, "name": "VariableDeclaration", - "src": "1121:11:8" + "src": "1186:11:5" } ], - "id": 937, + "id": 1101, "name": "ParameterList", - "src": "1060:73:8" + "src": "1125:73:5" } ], - "id": 938, + "id": 1102, "name": "EventDefinition", - "src": "1044:90:8" + "src": "1109:90:5" }, { "attributes": { @@ -5394,7 +5437,7 @@ "isConstructor": true, "kind": "constructor", "name": "", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -5406,7 +5449,7 @@ "attributes": { "constant": false, "name": "_verifier", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "contract IVerifier", @@ -5418,23 +5461,23 @@ "attributes": { "contractScope": null, "name": "IVerifier", - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "contract IVerifier" }, - "id": 939, + "id": 1103, "name": "UserDefinedTypeName", - "src": "1450:9:8" + "src": "1515:9:5" } ], - "id": 940, + "id": 1104, "name": "VariableDeclaration", - "src": "1450:19:8" + "src": "1515:19:5" }, { "attributes": { "constant": false, "name": "_feeManager", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "contract IFeeManager", @@ -5446,23 +5489,23 @@ "attributes": { "contractScope": null, "name": "IFeeManager", - "referencedDeclaration": 888, + "referencedDeclaration": 1052, "type": "contract IFeeManager" }, - "id": 941, + "id": 1105, "name": "UserDefinedTypeName", - "src": "1475:11:8" + "src": "1540:11:5" } ], - "id": 942, + "id": 1106, "name": "VariableDeclaration", - "src": "1475:23:8" + "src": "1540:23:5" }, { "attributes": { "constant": false, "name": "_denomination", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5475,20 +5518,20 @@ "name": "uint256", "type": "uint256" }, - "id": 943, + "id": 1107, "name": "ElementaryTypeName", - "src": "1504:7:8" + "src": "1569:7:5" } ], - "id": 944, + "id": 1108, "name": "VariableDeclaration", - "src": "1504:21:8" + "src": "1569:21:5" }, { "attributes": { "constant": false, "name": "_merkleTreeHeight", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -5501,20 +5544,20 @@ "name": "uint32", "type": "uint32" }, - "id": 945, + "id": 1109, "name": "ElementaryTypeName", - "src": "1531:6:8" + "src": "1596:6:5" } ], - "id": 946, + "id": 1110, "name": "VariableDeclaration", - "src": "1531:24:8" + "src": "1596:24:5" }, { "attributes": { "constant": false, "name": "_operator", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5528,19 +5571,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 947, + "id": 1111, "name": "ElementaryTypeName", - "src": "1561:7:8" + "src": "1626:7:5" } ], - "id": 948, + "id": 1112, "name": "VariableDeclaration", - "src": "1561:17:8" + "src": "1626:17:5" } ], - "id": 949, + "id": 1113, "name": "ParameterList", - "src": "1444:138:8" + "src": "1509:138:5" }, { "attributes": { @@ -5549,9 +5592,9 @@ ] }, "children": [], - "id": 953, + "id": 1117, "name": "ParameterList", - "src": "1631:0:8" + "src": "1696:0:5" }, { "children": [ @@ -5561,13 +5604,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 685, + "referencedDeclaration": 838, "type": "type(contract MerkleTreeWithHistory)", "value": "MerkleTreeWithHistory" }, - "id": 950, + "id": 1114, "name": "Identifier", - "src": "1583:21:8" + "src": "1648:21:5" }, { "attributes": { @@ -5575,18 +5618,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 946, + "referencedDeclaration": 1110, "type": "uint32", "value": "_merkleTreeHeight" }, - "id": 951, + "id": 1115, "name": "Identifier", - "src": "1605:17:8" + "src": "1670:17:5" } ], - "id": 952, + "id": 1116, "name": "ModifierInvocation", - "src": "1583:40:8" + "src": "1648:40:5" }, { "children": [ @@ -5620,16 +5663,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 954, + "id": 1118, "name": "Identifier", - "src": "1637:7:8" + "src": "1702:7:5" }, { "attributes": { @@ -5652,13 +5695,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 944, + "referencedDeclaration": 1108, "type": "uint256", "value": "_denomination" }, - "id": 955, + "id": 1119, "name": "Identifier", - "src": "1645:13:8" + "src": "1710:13:5" }, { "attributes": { @@ -5673,14 +5716,14 @@ "type": "int_const 0", "value": "0" }, - "id": 956, + "id": 1120, "name": "Literal", - "src": "1661:1:8" + "src": "1726:1:5" } ], - "id": 957, + "id": 1121, "name": "BinaryOperation", - "src": "1645:17:8" + "src": "1710:17:5" }, { "attributes": { @@ -5695,19 +5738,19 @@ "type": "literal_string \"denomination should be greater than 0\"", "value": "denomination should be greater than 0" }, - "id": 958, + "id": 1122, "name": "Literal", - "src": "1664:39:8" + "src": "1729:39:5" } ], - "id": 959, + "id": 1123, "name": "FunctionCall", - "src": "1637:67:8" + "src": "1702:67:5" } ], - "id": 960, + "id": 1124, "name": "ExpressionStatement", - "src": "1637:67:8" + "src": "1702:67:5" }, { "children": [ @@ -5728,13 +5771,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 904, + "referencedDeclaration": 1068, "type": "contract IVerifier", "value": "verifier" }, - "id": 961, + "id": 1125, "name": "Identifier", - "src": "1710:8:8" + "src": "1775:8:5" }, { "attributes": { @@ -5742,23 +5785,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 940, + "referencedDeclaration": 1104, "type": "contract IVerifier", "value": "_verifier" }, - "id": 962, + "id": 1126, "name": "Identifier", - "src": "1721:9:8" + "src": "1786:9:5" } ], - "id": 963, + "id": 1127, "name": "Assignment", - "src": "1710:20:8" + "src": "1775:20:5" } ], - "id": 964, + "id": 1128, "name": "ExpressionStatement", - "src": "1710:20:8" + "src": "1775:20:5" }, { "children": [ @@ -5779,13 +5822,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 906, + "referencedDeclaration": 1070, "type": "contract IFeeManager", "value": "feeManager" }, - "id": 965, + "id": 1129, "name": "Identifier", - "src": "1736:10:8" + "src": "1801:10:5" }, { "attributes": { @@ -5793,23 +5836,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 942, + "referencedDeclaration": 1106, "type": "contract IFeeManager", "value": "_feeManager" }, - "id": 966, + "id": 1130, "name": "Identifier", - "src": "1749:11:8" + "src": "1814:11:5" } ], - "id": 967, + "id": 1131, "name": "Assignment", - "src": "1736:24:8" + "src": "1801:24:5" } ], - "id": 968, + "id": 1132, "name": "ExpressionStatement", - "src": "1736:24:8" + "src": "1801:24:5" }, { "children": [ @@ -5830,13 +5873,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 908, + "referencedDeclaration": 1072, "type": "address", "value": "operator" }, - "id": 969, + "id": 1133, "name": "Identifier", - "src": "1766:8:8" + "src": "1831:8:5" }, { "attributes": { @@ -5844,23 +5887,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 948, + "referencedDeclaration": 1112, "type": "address", "value": "_operator" }, - "id": 970, + "id": 1134, "name": "Identifier", - "src": "1777:9:8" + "src": "1842:9:5" } ], - "id": 971, + "id": 1135, "name": "Assignment", - "src": "1766:20:8" + "src": "1831:20:5" } ], - "id": 972, + "id": 1136, "name": "ExpressionStatement", - "src": "1766:20:8" + "src": "1831:20:5" }, { "children": [ @@ -5881,13 +5924,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 894, + "referencedDeclaration": 1058, "type": "uint256", "value": "denomination" }, - "id": 973, + "id": 1137, "name": "Identifier", - "src": "1792:12:8" + "src": "1857:12:5" }, { "attributes": { @@ -5895,33 +5938,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 944, + "referencedDeclaration": 1108, "type": "uint256", "value": "_denomination" }, - "id": 974, + "id": 1138, "name": "Identifier", - "src": "1807:13:8" + "src": "1872:13:5" } ], - "id": 975, + "id": 1139, "name": "Assignment", - "src": "1792:28:8" + "src": "1857:28:5" } ], - "id": 976, + "id": 1140, "name": "ExpressionStatement", - "src": "1792:28:8" + "src": "1857:28:5" } ], - "id": 977, + "id": 1141, "name": "Block", - "src": "1631:194:8" + "src": "1696:194:5" } ], - "id": 978, + "id": 1142, "name": "FunctionDefinition", - "src": "1433:392:8" + "src": "1498:392:5" }, { "attributes": { @@ -5930,7 +5973,7 @@ "isConstructor": false, "kind": "function", "name": "deposit", - "scope": 1204, + "scope": 1363, "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -5942,7 +5985,7 @@ "attributes": { "constant": false, "name": "_commitment", - "scope": 1016, + "scope": 1180, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5955,19 +5998,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 979, + "id": 1143, "name": "ElementaryTypeName", - "src": "2090:7:8" + "src": "2155:7:5" } ], - "id": 980, + "id": 1144, "name": "VariableDeclaration", - "src": "2090:19:8" + "src": "2155:19:5" } ], - "id": 981, + "id": 1145, "name": "ParameterList", - "src": "2089:21:8" + "src": "2154:21:5" }, { "attributes": { @@ -5976,9 +6019,9 @@ ] }, "children": [], - "id": 984, + "id": 1148, "name": "ParameterList", - "src": "2141:0:8" + "src": "2206:0:5" }, { "attributes": { @@ -5991,18 +6034,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3254, + "referencedDeclaration": 1392, "type": "modifier ()", "value": "nonReentrant" }, - "id": 982, + "id": 1146, "name": "Identifier", - "src": "2128:12:8" + "src": "2193:12:5" } ], - "id": 983, + "id": 1147, "name": "ModifierInvocation", - "src": "2128:12:8" + "src": "2193:12:5" }, { "children": [ @@ -6036,16 +6079,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 985, + "id": 1149, "name": "Identifier", - "src": "2147:7:8" + "src": "2212:7:5" }, { "attributes": { @@ -6075,13 +6118,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 902, + "referencedDeclaration": 1066, "type": "mapping(bytes32 => bool)", "value": "commitments" }, - "id": 986, + "id": 1150, "name": "Identifier", - "src": "2156:11:8" + "src": "2221:11:5" }, { "attributes": { @@ -6089,23 +6132,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 987, + "id": 1151, "name": "Identifier", - "src": "2168:11:8" + "src": "2233:11:5" } ], - "id": 988, + "id": 1152, "name": "IndexAccess", - "src": "2156:24:8" + "src": "2221:24:5" } ], - "id": 989, + "id": 1153, "name": "UnaryOperation", - "src": "2155:25:8" + "src": "2220:25:5" }, { "attributes": { @@ -6120,24 +6163,24 @@ "type": "literal_string \"The commitment has been submitted\"", "value": "The commitment has been submitted" }, - "id": 990, + "id": 1154, "name": "Literal", - "src": "2182:35:8" + "src": "2247:35:5" } ], - "id": 991, + "id": 1155, "name": "FunctionCall", - "src": "2147:71:8" + "src": "2212:71:5" } ], - "id": 992, + "id": 1156, "name": "ExpressionStatement", - "src": "2147:71:8" + "src": "2212:71:5" }, { "attributes": { "assignments": [ - 994 + 1158 ] }, "children": [ @@ -6145,7 +6188,7 @@ "attributes": { "constant": false, "name": "insertedIndex", - "scope": 1015, + "scope": 1179, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -6158,14 +6201,14 @@ "name": "uint32", "type": "uint32" }, - "id": 993, + "id": 1157, "name": "ElementaryTypeName", - "src": "2225:6:8" + "src": "2290:6:5" } ], - "id": 994, + "id": 1158, "name": "VariableDeclaration", - "src": "2225:20:8" + "src": "2290:20:5" }, { "attributes": { @@ -6193,13 +6236,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 627, + "referencedDeclaration": 780, "type": "function (bytes32) returns (uint32)", "value": "_insert" }, - "id": 995, + "id": 1159, "name": "Identifier", - "src": "2248:7:8" + "src": "2313:7:5" }, { "attributes": { @@ -6207,23 +6250,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 996, + "id": 1160, "name": "Identifier", - "src": "2256:11:8" + "src": "2321:11:5" } ], - "id": 997, + "id": 1161, "name": "FunctionCall", - "src": "2248:20:8" + "src": "2313:20:5" } ], - "id": 998, + "id": 1162, "name": "VariableDeclarationStatement", - "src": "2225:43:8" + "src": "2290:43:5" }, { "children": [ @@ -6254,13 +6297,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 902, + "referencedDeclaration": 1066, "type": "mapping(bytes32 => bool)", "value": "commitments" }, - "id": 999, + "id": 1163, "name": "Identifier", - "src": "2274:11:8" + "src": "2339:11:5" }, { "attributes": { @@ -6268,18 +6311,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 1000, + "id": 1164, "name": "Identifier", - "src": "2286:11:8" + "src": "2351:11:5" } ], - "id": 1001, + "id": 1165, "name": "IndexAccess", - "src": "2274:24:8" + "src": "2339:24:5" }, { "attributes": { @@ -6294,19 +6337,19 @@ "type": "bool", "value": "true" }, - "id": 1002, + "id": 1166, "name": "Literal", - "src": "2301:4:8" + "src": "2366:4:5" } ], - "id": 1003, + "id": 1167, "name": "Assignment", - "src": "2274:31:8" + "src": "2339:31:5" } ], - "id": 1004, + "id": 1168, "name": "ExpressionStatement", - "src": "2274:31:8" + "src": "2339:31:5" }, { "children": [ @@ -6336,23 +6379,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1019, + "referencedDeclaration": 1183, "type": "function ()", "value": "_processDeposit" }, - "id": 1005, + "id": 1169, "name": "Identifier", - "src": "2311:15:8" + "src": "2376:15:5" } ], - "id": 1006, + "id": 1170, "name": "FunctionCall", - "src": "2311:17:8" + "src": "2376:17:5" } ], - "id": 1007, + "id": 1171, "name": "ExpressionStatement", - "src": "2311:17:8" + "src": "2376:17:5" }, { "children": [ @@ -6390,13 +6433,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 928, + "referencedDeclaration": 1092, "type": "function (bytes32,uint32,uint256)", "value": "Deposit" }, - "id": 1008, + "id": 1172, "name": "Identifier", - "src": "2340:7:8" + "src": "2405:7:5" }, { "attributes": { @@ -6404,13 +6447,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 1009, + "id": 1173, "name": "Identifier", - "src": "2348:11:8" + "src": "2413:11:5" }, { "attributes": { @@ -6418,13 +6461,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 994, + "referencedDeclaration": 1158, "type": "uint32", "value": "insertedIndex" }, - "id": 1010, + "id": 1174, "name": "Identifier", - "src": "2361:13:8" + "src": "2426:13:5" }, { "attributes": { @@ -6444,38 +6487,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3260, + "referencedDeclaration": 1398, "type": "block", "value": "block" }, - "id": 1011, + "id": 1175, "name": "Identifier", - "src": "2376:5:8" + "src": "2441:5:5" } ], - "id": 1012, + "id": 1176, "name": "MemberAccess", - "src": "2376:15:8" + "src": "2441:15:5" } ], - "id": 1013, + "id": 1177, "name": "FunctionCall", - "src": "2340:52:8" + "src": "2405:52:5" } ], - "id": 1014, + "id": 1178, "name": "EmitStatement", - "src": "2335:57:8" + "src": "2400:57:5" } ], - "id": 1015, + "id": 1179, "name": "Block", - "src": "2141:256:8" + "src": "2206:256:5" } ], - "id": 1016, + "id": 1180, "name": "FunctionDefinition", - "src": "2073:324:8" + "src": "2138:324:5" }, { "attributes": { @@ -6488,7 +6531,7 @@ null ], "name": "_processDeposit", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" @@ -6501,9 +6544,9 @@ ] }, "children": [], - "id": 1017, + "id": 1181, "name": "ParameterList", - "src": "2484:2:8" + "src": "2549:2:5" }, { "attributes": { @@ -6512,14 +6555,14 @@ ] }, "children": [], - "id": 1018, + "id": 1182, "name": "ParameterList", - "src": "2495:0:8" + "src": "2560:0:5" } ], - "id": 1019, + "id": 1183, "name": "FunctionDefinition", - "src": "2460:36:8" + "src": "2525:36:5" }, { "attributes": { @@ -6528,7 +6571,7 @@ "isConstructor": false, "kind": "function", "name": "withdraw", - "scope": 1204, + "scope": 1363, "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -6540,7 +6583,7 @@ "attributes": { "constant": false, "name": "_proof", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "calldata", "type": "bytes", @@ -6553,20 +6596,20 @@ "name": "bytes", "type": "bytes" }, - "id": 1020, + "id": 1184, "name": "ElementaryTypeName", - "src": "2911:5:8" + "src": "2976:5:5" } ], - "id": 1021, + "id": 1185, "name": "VariableDeclaration", - "src": "2911:21:8" + "src": "2976:21:5" }, { "attributes": { "constant": false, "name": "_root", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -6579,20 +6622,20 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1022, + "id": 1186, "name": "ElementaryTypeName", - "src": "2934:7:8" + "src": "2999:7:5" } ], - "id": 1023, + "id": 1187, "name": "VariableDeclaration", - "src": "2934:13:8" + "src": "2999:13:5" }, { "attributes": { "constant": false, "name": "_nullifierHash", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -6605,20 +6648,20 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1024, + "id": 1188, "name": "ElementaryTypeName", - "src": "2949:7:8" + "src": "3014:7:5" } ], - "id": 1025, + "id": 1189, "name": "VariableDeclaration", - "src": "2949:22:8" + "src": "3014:22:5" }, { "attributes": { "constant": false, "name": "_recipient", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -6632,20 +6675,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1026, + "id": 1190, "name": "ElementaryTypeName", - "src": "2973:15:8" + "src": "3038:15:5" } ], - "id": 1027, + "id": 1191, "name": "VariableDeclaration", - "src": "2973:26:8" + "src": "3038:26:5" }, { "attributes": { "constant": false, "name": "_relayer", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -6659,20 +6702,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1028, + "id": 1192, "name": "ElementaryTypeName", - "src": "3001:15:8" + "src": "3066:15:5" } ], - "id": 1029, + "id": 1193, "name": "VariableDeclaration", - "src": "3001:24:8" + "src": "3066:24:5" }, { "attributes": { "constant": false, "name": "_fee", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -6685,20 +6728,20 @@ "name": "uint256", "type": "uint256" }, - "id": 1030, + "id": 1194, "name": "ElementaryTypeName", - "src": "3027:7:8" + "src": "3092:7:5" } ], - "id": 1031, + "id": 1195, "name": "VariableDeclaration", - "src": "3027:12:8" + "src": "3092:12:5" }, { "attributes": { "constant": false, "name": "_refund", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -6711,19 +6754,19 @@ "name": "uint256", "type": "uint256" }, - "id": 1032, + "id": 1196, "name": "ElementaryTypeName", - "src": "3041:7:8" + "src": "3106:7:5" } ], - "id": 1033, + "id": 1197, "name": "VariableDeclaration", - "src": "3041:15:8" + "src": "3106:15:5" } ], - "id": 1034, + "id": 1198, "name": "ParameterList", - "src": "2910:147:8" + "src": "2975:147:5" }, { "attributes": { @@ -6732,9 +6775,9 @@ ] }, "children": [], - "id": 1037, + "id": 1201, "name": "ParameterList", - "src": "3088:0:8" + "src": "3153:0:5" }, { "attributes": { @@ -6747,18 +6790,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3254, + "referencedDeclaration": 1392, "type": "modifier ()", "value": "nonReentrant" }, - "id": 1035, + "id": 1199, "name": "Identifier", - "src": "3075:12:8" + "src": "3140:12:5" } ], - "id": 1036, + "id": 1200, "name": "ModifierInvocation", - "src": "3075:12:8" + "src": "3140:12:5" }, { "children": [ @@ -6792,16 +6835,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1038, + "id": 1202, "name": "Identifier", - "src": "3094:7:8" + "src": "3159:7:5" }, { "attributes": { @@ -6824,13 +6867,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1039, + "id": 1203, "name": "Identifier", - "src": "3102:4:8" + "src": "3167:4:5" }, { "attributes": { @@ -6838,18 +6881,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 894, + "referencedDeclaration": 1058, "type": "uint256", "value": "denomination" }, - "id": 1040, + "id": 1204, "name": "Identifier", - "src": "3110:12:8" + "src": "3175:12:5" } ], - "id": 1041, + "id": 1205, "name": "BinaryOperation", - "src": "3102:20:8" + "src": "3167:20:5" }, { "attributes": { @@ -6864,19 +6907,19 @@ "type": "literal_string \"Fee exceeds transfer value\"", "value": "Fee exceeds transfer value" }, - "id": 1042, + "id": 1206, "name": "Literal", - "src": "3124:28:8" + "src": "3189:28:5" } ], - "id": 1043, + "id": 1207, "name": "FunctionCall", - "src": "3094:59:8" + "src": "3159:59:5" } ], - "id": 1044, + "id": 1208, "name": "ExpressionStatement", - "src": "3094:59:8" + "src": "3159:59:5" }, { "children": [ @@ -6908,16 +6951,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1045, + "id": 1209, "name": "Identifier", - "src": "3159:7:8" + "src": "3224:7:5" }, { "attributes": { @@ -6947,13 +6990,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 898, + "referencedDeclaration": 1062, "type": "mapping(bytes32 => bool)", "value": "nullifierHashes" }, - "id": 1046, + "id": 1210, "name": "Identifier", - "src": "3168:15:8" + "src": "3233:15:5" }, { "attributes": { @@ -6961,23 +7004,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1047, + "id": 1211, "name": "Identifier", - "src": "3184:14:8" + "src": "3249:14:5" } ], - "id": 1048, + "id": 1212, "name": "IndexAccess", - "src": "3168:31:8" + "src": "3233:31:5" } ], - "id": 1049, + "id": 1213, "name": "UnaryOperation", - "src": "3167:32:8" + "src": "3232:32:5" }, { "attributes": { @@ -6992,19 +7035,19 @@ "type": "literal_string \"The note has been already spent\"", "value": "The note has been already spent" }, - "id": 1050, + "id": 1214, "name": "Literal", - "src": "3201:33:8" + "src": "3266:33:5" } ], - "id": 1051, + "id": 1215, "name": "FunctionCall", - "src": "3159:76:8" + "src": "3224:76:5" } ], - "id": 1052, + "id": 1216, "name": "ExpressionStatement", - "src": "3159:76:8" + "src": "3224:76:5" }, { "children": [ @@ -7036,16 +7079,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1053, + "id": 1217, "name": "Identifier", - "src": "3241:7:8" + "src": "3306:7:5" }, { "attributes": { @@ -7073,13 +7116,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 674, + "referencedDeclaration": 827, "type": "function (bytes32) view returns (bool)", "value": "isKnownRoot" }, - "id": 1054, + "id": 1218, "name": "Identifier", - "src": "3249:11:8" + "src": "3314:11:5" }, { "attributes": { @@ -7087,18 +7130,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1023, + "referencedDeclaration": 1187, "type": "bytes32", "value": "_root" }, - "id": 1055, + "id": 1219, "name": "Identifier", - "src": "3261:5:8" + "src": "3326:5:5" } ], - "id": 1056, + "id": 1220, "name": "FunctionCall", - "src": "3249:18:8" + "src": "3314:18:5" }, { "attributes": { @@ -7113,19 +7156,19 @@ "type": "literal_string \"Cannot find your merkle root\"", "value": "Cannot find your merkle root" }, - "id": 1057, + "id": 1221, "name": "Literal", - "src": "3269:30:8" + "src": "3334:30:5" } ], - "id": 1058, + "id": 1222, "name": "FunctionCall", - "src": "3241:59:8" + "src": "3306:59:5" } ], - "id": 1059, + "id": 1223, "name": "ExpressionStatement", - "src": "3241:59:8" + "src": "3306:59:5" }, { "children": [ @@ -7157,16 +7200,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1060, + "id": 1224, "name": "Identifier", - "src": "3339:7:8" + "src": "3404:7:5" }, { "attributes": { @@ -7200,7 +7243,7 @@ "isPure": false, "lValueRequested": false, "member_name": "verifyProof", - "referencedDeclaration": 881, + "referencedDeclaration": 1040, "type": "function (bytes memory,uint256[6] memory) external returns (bool)" }, "children": [ @@ -7210,18 +7253,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 904, + "referencedDeclaration": 1068, "type": "contract IVerifier", "value": "verifier" }, - "id": 1061, + "id": 1225, "name": "Identifier", - "src": "3347:8:8" + "src": "3412:8:5" } ], - "id": 1062, + "id": 1226, "name": "MemberAccess", - "src": "3347:20:8" + "src": "3412:20:5" }, { "attributes": { @@ -7229,13 +7272,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1021, + "referencedDeclaration": 1185, "type": "bytes calldata", "value": "_proof" }, - "id": 1063, + "id": 1227, "name": "Identifier", - "src": "3368:6:8" + "src": "3433:6:5" }, { "attributes": { @@ -7278,9 +7321,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1064, + "id": 1228, "name": "ElementaryTypeNameExpression", - "src": "3377:7:8" + "src": "3442:7:5" }, { "attributes": { @@ -7288,18 +7331,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1023, + "referencedDeclaration": 1187, "type": "bytes32", "value": "_root" }, - "id": 1065, + "id": 1229, "name": "Identifier", - "src": "3385:5:8" + "src": "3450:5:5" } ], - "id": 1066, + "id": 1230, "name": "FunctionCall", - "src": "3377:14:8" + "src": "3442:14:5" }, { "attributes": { @@ -7331,9 +7374,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1067, + "id": 1231, "name": "ElementaryTypeNameExpression", - "src": "3393:7:8" + "src": "3458:7:5" }, { "attributes": { @@ -7341,18 +7384,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1068, + "id": 1232, "name": "Identifier", - "src": "3401:14:8" + "src": "3466:14:5" } ], - "id": 1069, + "id": 1233, "name": "FunctionCall", - "src": "3393:23:8" + "src": "3458:23:5" }, { "attributes": { @@ -7384,9 +7427,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1070, + "id": 1234, "name": "ElementaryTypeNameExpression", - "src": "3418:7:8" + "src": "3483:7:5" }, { "attributes": { @@ -7394,18 +7437,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1027, + "referencedDeclaration": 1191, "type": "address payable", "value": "_recipient" }, - "id": 1071, + "id": 1235, "name": "Identifier", - "src": "3426:10:8" + "src": "3491:10:5" } ], - "id": 1072, + "id": 1236, "name": "FunctionCall", - "src": "3418:19:8" + "src": "3483:19:5" }, { "attributes": { @@ -7437,9 +7480,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1073, + "id": 1237, "name": "ElementaryTypeNameExpression", - "src": "3439:7:8" + "src": "3504:7:5" }, { "attributes": { @@ -7447,18 +7490,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1029, + "referencedDeclaration": 1193, "type": "address payable", "value": "_relayer" }, - "id": 1074, + "id": 1238, "name": "Identifier", - "src": "3447:8:8" + "src": "3512:8:5" } ], - "id": 1075, + "id": 1239, "name": "FunctionCall", - "src": "3439:17:8" + "src": "3504:17:5" }, { "attributes": { @@ -7466,13 +7509,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1076, + "id": 1240, "name": "Identifier", - "src": "3458:4:8" + "src": "3523:4:5" }, { "attributes": { @@ -7480,23 +7523,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1033, + "referencedDeclaration": 1197, "type": "uint256", "value": "_refund" }, - "id": 1077, + "id": 1241, "name": "Identifier", - "src": "3464:7:8" + "src": "3529:7:5" } ], - "id": 1078, + "id": 1242, "name": "TupleExpression", - "src": "3376:96:8" + "src": "3441:96:5" } ], - "id": 1079, + "id": 1243, "name": "FunctionCall", - "src": "3347:126:8" + "src": "3412:126:5" }, { "attributes": { @@ -7511,19 +7554,19 @@ "type": "literal_string \"Invalid withdraw proof\"", "value": "Invalid withdraw proof" }, - "id": 1080, + "id": 1244, "name": "Literal", - "src": "3475:24:8" + "src": "3540:24:5" } ], - "id": 1081, + "id": 1245, "name": "FunctionCall", - "src": "3339:161:8" + "src": "3404:161:5" } ], - "id": 1082, + "id": 1246, "name": "ExpressionStatement", - "src": "3339:161:8" + "src": "3404:161:5" }, { "children": [ @@ -7554,13 +7597,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 898, + "referencedDeclaration": 1062, "type": "mapping(bytes32 => bool)", "value": "nullifierHashes" }, - "id": 1083, + "id": 1247, "name": "Identifier", - "src": "3507:15:8" + "src": "3572:15:5" }, { "attributes": { @@ -7568,18 +7611,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1084, + "id": 1248, "name": "Identifier", - "src": "3523:14:8" + "src": "3588:14:5" } ], - "id": 1085, + "id": 1249, "name": "IndexAccess", - "src": "3507:31:8" + "src": "3572:31:5" }, { "attributes": { @@ -7594,19 +7637,19 @@ "type": "bool", "value": "true" }, - "id": 1086, + "id": 1250, "name": "Literal", - "src": "3541:4:8" + "src": "3606:4:5" } ], - "id": 1087, + "id": 1251, "name": "Assignment", - "src": "3507:38:8" + "src": "3572:38:5" } ], - "id": 1088, + "id": 1252, "name": "ExpressionStatement", - "src": "3507:38:8" + "src": "3572:38:5" }, { "children": [ @@ -7643,22 +7686,18 @@ { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" } ], "overloadedDeclarations": [ null ], - "referencedDeclaration": 1120, - "type": "function (address payable,address payable,uint256,uint256,address)", + "referencedDeclaration": 1279, + "type": "function (address payable,address payable,uint256,uint256)", "value": "_processWithdraw" }, - "id": 1089, + "id": 1253, "name": "Identifier", - "src": "3551:16:8" + "src": "3616:16:5" }, { "attributes": { @@ -7666,13 +7705,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1027, + "referencedDeclaration": 1191, "type": "address payable", "value": "_recipient" }, - "id": 1090, + "id": 1254, "name": "Identifier", - "src": "3568:10:8" + "src": "3633:10:5" }, { "attributes": { @@ -7680,13 +7719,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1029, + "referencedDeclaration": 1193, "type": "address payable", "value": "_relayer" }, - "id": 1091, + "id": 1255, "name": "Identifier", - "src": "3580:8:8" + "src": "3645:8:5" }, { "attributes": { @@ -7694,13 +7733,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1092, + "id": 1256, "name": "Identifier", - "src": "3590:4:8" + "src": "3655:4:5" }, { "attributes": { @@ -7708,79 +7747,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1033, + "referencedDeclaration": 1197, "type": "uint256", "value": "_refund" }, - "id": 1093, + "id": 1257, "name": "Identifier", - "src": "3596:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "feeTo", - "referencedDeclaration": 887, - "type": "function () view external returns (address)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 906, - "type": "contract IFeeManager", - "value": "feeManager" - }, - "id": 1094, - "name": "Identifier", - "src": "3605:10:8" - } - ], - "id": 1095, - "name": "MemberAccess", - "src": "3605:16:8" - } - ], - "id": 1096, - "name": "FunctionCall", - "src": "3605:18:8" + "src": "3661:7:5" } ], - "id": 1097, + "id": 1258, "name": "FunctionCall", - "src": "3551:73:8" + "src": "3616:53:5" } ], - "id": 1098, + "id": 1259, "name": "ExpressionStatement", - "src": "3551:73:8" + "src": "3616:53:5" }, { "children": [ @@ -7822,13 +7805,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 938, + "referencedDeclaration": 1102, "type": "function (address,bytes32,address,uint256)", "value": "Withdrawal" }, - "id": 1099, + "id": 1260, "name": "Identifier", - "src": "3635:10:8" + "src": "3680:10:5" }, { "attributes": { @@ -7836,13 +7819,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1027, + "referencedDeclaration": 1191, "type": "address payable", "value": "_recipient" }, - "id": 1100, + "id": 1261, "name": "Identifier", - "src": "3646:10:8" + "src": "3691:10:5" }, { "attributes": { @@ -7850,13 +7833,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1101, + "id": 1262, "name": "Identifier", - "src": "3658:14:8" + "src": "3703:14:5" }, { "attributes": { @@ -7864,13 +7847,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1029, + "referencedDeclaration": 1193, "type": "address payable", "value": "_relayer" }, - "id": 1102, + "id": 1263, "name": "Identifier", - "src": "3674:8:8" + "src": "3719:8:5" }, { "attributes": { @@ -7878,33 +7861,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1103, + "id": 1264, "name": "Identifier", - "src": "3684:4:8" + "src": "3729:4:5" } ], - "id": 1104, + "id": 1265, "name": "FunctionCall", - "src": "3635:54:8" + "src": "3680:54:5" } ], - "id": 1105, + "id": 1266, "name": "EmitStatement", - "src": "3630:59:8" + "src": "3675:59:5" } ], - "id": 1106, + "id": 1267, "name": "Block", - "src": "3088:606:8" + "src": "3153:586:5" } ], - "id": 1107, + "id": 1268, "name": "FunctionDefinition", - "src": "2893:801:8" + "src": "2958:781:5" }, { "attributes": { @@ -7917,7 +7900,7 @@ null ], "name": "_processWithdraw", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" @@ -7929,7 +7912,7 @@ "attributes": { "constant": false, "name": "_recipient", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -7943,20 +7926,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1108, + "id": 1269, "name": "ElementaryTypeName", - "src": "3783:15:8" + "src": "3828:15:5" } ], - "id": 1109, + "id": 1270, "name": "VariableDeclaration", - "src": "3783:26:8" + "src": "3828:26:5" }, { "attributes": { "constant": false, "name": "_relayer", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -7970,20 +7953,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1110, + "id": 1271, "name": "ElementaryTypeName", - "src": "3811:15:8" + "src": "3856:15:5" } ], - "id": 1111, + "id": 1272, "name": "VariableDeclaration", - "src": "3811:24:8" + "src": "3856:24:5" }, { "attributes": { "constant": false, "name": "_relayer_fee", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -7996,20 +7979,20 @@ "name": "uint256", "type": "uint256" }, - "id": 1112, + "id": 1273, "name": "ElementaryTypeName", - "src": "3837:7:8" + "src": "3882:7:5" } ], - "id": 1113, + "id": 1274, "name": "VariableDeclaration", - "src": "3837:20:8" + "src": "3882:20:5" }, { "attributes": { "constant": false, "name": "_refund", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8022,46 +8005,19 @@ "name": "uint256", "type": "uint256" }, - "id": 1114, + "id": 1275, "name": "ElementaryTypeName", - "src": "3859:7:8" + "src": "3904:7:5" } ], - "id": 1115, + "id": 1276, "name": "VariableDeclaration", - "src": "3859:15:8" - }, - { - "attributes": { - "constant": false, - "name": "_feeTo", - "scope": 1120, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1116, - "name": "ElementaryTypeName", - "src": "3876:7:8" - } - ], - "id": 1117, - "name": "VariableDeclaration", - "src": "3876:14:8" + "src": "3904:15:5" } ], - "id": 1118, + "id": 1277, "name": "ParameterList", - "src": "3782:109:8" + "src": "3827:93:5" }, { "attributes": { @@ -8070,14 +8026,14 @@ ] }, "children": [], - "id": 1119, + "id": 1278, "name": "ParameterList", - "src": "3900:0:8" + "src": "3929:0:5" } ], - "id": 1120, + "id": 1279, "name": "FunctionDefinition", - "src": "3757:144:8" + "src": "3802:128:5" }, { "attributes": { @@ -8089,7 +8045,7 @@ null ], "name": "isSpent", - "scope": 1204, + "scope": 1363, "stateMutability": "view", "superFunction": null, "visibility": "public" @@ -8101,7 +8057,7 @@ "attributes": { "constant": false, "name": "_nullifierHash", - "scope": 1132, + "scope": 1291, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8114,19 +8070,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1121, + "id": 1280, "name": "ElementaryTypeName", - "src": "3968:7:8" + "src": "3997:7:5" } ], - "id": 1122, + "id": 1281, "name": "VariableDeclaration", - "src": "3968:22:8" + "src": "3997:22:5" } ], - "id": 1123, + "id": 1282, "name": "ParameterList", - "src": "3967:24:8" + "src": "3996:24:5" }, { "children": [ @@ -8134,7 +8090,7 @@ "attributes": { "constant": false, "name": "", - "scope": 1132, + "scope": 1291, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -8147,25 +8103,25 @@ "name": "bool", "type": "bool" }, - "id": 1124, + "id": 1283, "name": "ElementaryTypeName", - "src": "4012:4:8" + "src": "4041:4:5" } ], - "id": 1125, + "id": 1284, "name": "VariableDeclaration", - "src": "4012:4:8" + "src": "4041:4:5" } ], - "id": 1126, + "id": 1285, "name": "ParameterList", - "src": "4011:6:8" + "src": "4040:6:5" }, { "children": [ { "attributes": { - "functionReturnParameters": 1126 + "functionReturnParameters": 1285 }, "children": [ { @@ -8184,13 +8140,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 898, + "referencedDeclaration": 1062, "type": "mapping(bytes32 => bool)", "value": "nullifierHashes" }, - "id": 1127, + "id": 1286, "name": "Identifier", - "src": "4031:15:8" + "src": "4060:15:5" }, { "attributes": { @@ -8198,33 +8154,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1122, + "referencedDeclaration": 1281, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1128, + "id": 1287, "name": "Identifier", - "src": "4047:14:8" + "src": "4076:14:5" } ], - "id": 1129, + "id": 1288, "name": "IndexAccess", - "src": "4031:31:8" + "src": "4060:31:5" } ], - "id": 1130, + "id": 1289, "name": "Return", - "src": "4024:38:8" + "src": "4053:38:5" } ], - "id": 1131, + "id": 1290, "name": "Block", - "src": "4018:49:8" + "src": "4047:49:5" } ], - "id": 1132, + "id": 1291, "name": "FunctionDefinition", - "src": "3951:116:8" + "src": "3980:116:5" }, { "attributes": { @@ -8236,7 +8192,7 @@ null ], "name": "isSpentArray", - "scope": 1204, + "scope": 1363, "stateMutability": "view", "superFunction": null, "visibility": "external" @@ -8248,7 +8204,7 @@ "attributes": { "constant": false, "name": "_nullifierHashes", - "scope": 1177, + "scope": 1336, "stateVariable": false, "storageLocation": "calldata", "type": "bytes32[]", @@ -8267,24 +8223,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1133, + "id": 1292, "name": "ElementaryTypeName", - "src": "4150:7:8" + "src": "4179:7:5" } ], - "id": 1134, + "id": 1293, "name": "ArrayTypeName", - "src": "4150:9:8" + "src": "4179:9:5" } ], - "id": 1135, + "id": 1294, "name": "VariableDeclaration", - "src": "4150:35:8" + "src": "4179:35:5" } ], - "id": 1136, + "id": 1295, "name": "ParameterList", - "src": "4149:37:8" + "src": "4178:37:5" }, { "children": [ @@ -8292,7 +8248,7 @@ "attributes": { "constant": false, "name": "spent", - "scope": 1177, + "scope": 1336, "stateVariable": false, "storageLocation": "memory", "type": "bool[]", @@ -8311,24 +8267,24 @@ "name": "bool", "type": "bool" }, - "id": 1137, + "id": 1296, "name": "ElementaryTypeName", - "src": "4209:4:8" + "src": "4238:4:5" } ], - "id": 1138, + "id": 1297, "name": "ArrayTypeName", - "src": "4209:6:8" + "src": "4238:6:5" } ], - "id": 1139, + "id": 1298, "name": "VariableDeclaration", - "src": "4209:19:8" + "src": "4238:19:5" } ], - "id": 1140, + "id": 1299, "name": "ParameterList", - "src": "4208:21:8" + "src": "4237:21:5" }, { "children": [ @@ -8351,13 +8307,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1139, + "referencedDeclaration": 1298, "type": "bool[] memory", "value": "spent" }, - "id": 1141, + "id": 1300, "name": "Identifier", - "src": "4236:5:8" + "src": "4265:5:5" }, { "attributes": { @@ -8400,19 +8356,19 @@ "name": "bool", "type": "bool" }, - "id": 1142, + "id": 1301, "name": "ElementaryTypeName", - "src": "4248:4:8" + "src": "4277:4:5" } ], - "id": 1143, + "id": 1302, "name": "ArrayTypeName", - "src": "4248:6:8" + "src": "4277:6:5" } ], - "id": 1144, + "id": 1303, "name": "NewExpression", - "src": "4244:10:8" + "src": "4273:10:5" }, { "attributes": { @@ -8432,40 +8388,40 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1135, + "referencedDeclaration": 1294, "type": "bytes32[] calldata", "value": "_nullifierHashes" }, - "id": 1145, + "id": 1304, "name": "Identifier", - "src": "4255:16:8" + "src": "4284:16:5" } ], - "id": 1146, + "id": 1305, "name": "MemberAccess", - "src": "4255:23:8" + "src": "4284:23:5" } ], - "id": 1147, + "id": 1306, "name": "FunctionCall", - "src": "4244:35:8" + "src": "4273:35:5" } ], - "id": 1148, + "id": 1307, "name": "Assignment", - "src": "4236:43:8" + "src": "4265:43:5" } ], - "id": 1149, + "id": 1308, "name": "ExpressionStatement", - "src": "4236:43:8" + "src": "4265:43:5" }, { "children": [ { "attributes": { "assignments": [ - 1151 + 1310 ] }, "children": [ @@ -8473,7 +8429,7 @@ "attributes": { "constant": false, "name": "i", - "scope": 1175, + "scope": 1334, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8486,14 +8442,14 @@ "name": "uint", "type": "uint256" }, - "id": 1150, + "id": 1309, "name": "ElementaryTypeName", - "src": "4289:4:8" + "src": "4318:4:5" } ], - "id": 1151, + "id": 1310, "name": "VariableDeclaration", - "src": "4289:6:8" + "src": "4318:6:5" }, { "attributes": { @@ -8508,14 +8464,14 @@ "type": "int_const 0", "value": "0" }, - "id": 1152, + "id": 1311, "name": "Literal", - "src": "4298:1:8" + "src": "4327:1:5" } ], - "id": 1153, + "id": 1312, "name": "VariableDeclarationStatement", - "src": "4289:10:8" + "src": "4318:10:5" }, { "attributes": { @@ -8538,13 +8494,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1154, + "id": 1313, "name": "Identifier", - "src": "4301:1:8" + "src": "4330:1:5" }, { "attributes": { @@ -8564,23 +8520,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1135, + "referencedDeclaration": 1294, "type": "bytes32[] calldata", "value": "_nullifierHashes" }, - "id": 1155, + "id": 1314, "name": "Identifier", - "src": "4305:16:8" + "src": "4334:16:5" } ], - "id": 1156, + "id": 1315, "name": "MemberAccess", - "src": "4305:23:8" + "src": "4334:23:5" } ], - "id": 1157, + "id": 1316, "name": "BinaryOperation", - "src": "4301:27:8" + "src": "4330:27:5" }, { "children": [ @@ -8602,23 +8558,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1158, + "id": 1317, "name": "Identifier", - "src": "4330:1:8" + "src": "4359:1:5" } ], - "id": 1159, + "id": 1318, "name": "UnaryOperation", - "src": "4330:3:8" + "src": "4359:3:5" } ], - "id": 1160, + "id": 1319, "name": "ExpressionStatement", - "src": "4330:3:8" + "src": "4359:3:5" }, { "children": [ @@ -8653,13 +8609,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1132, + "referencedDeclaration": 1291, "type": "function (bytes32) view returns (bool)", "value": "isSpent" }, - "id": 1161, + "id": 1320, "name": "Identifier", - "src": "4347:7:8" + "src": "4376:7:5" }, { "attributes": { @@ -8677,13 +8633,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1135, + "referencedDeclaration": 1294, "type": "bytes32[] calldata", "value": "_nullifierHashes" }, - "id": 1162, + "id": 1321, "name": "Identifier", - "src": "4355:16:8" + "src": "4384:16:5" }, { "attributes": { @@ -8691,23 +8647,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1163, + "id": 1322, "name": "Identifier", - "src": "4372:1:8" + "src": "4401:1:5" } ], - "id": 1164, + "id": 1323, "name": "IndexAccess", - "src": "4355:19:8" + "src": "4384:19:5" } ], - "id": 1165, + "id": 1324, "name": "FunctionCall", - "src": "4347:28:8" + "src": "4376:28:5" }, { "children": [ @@ -8740,13 +8696,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1139, + "referencedDeclaration": 1298, "type": "bool[] memory", "value": "spent" }, - "id": 1166, + "id": 1325, "name": "Identifier", - "src": "4387:5:8" + "src": "4416:5:5" }, { "attributes": { @@ -8754,18 +8710,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1167, + "id": 1326, "name": "Identifier", - "src": "4393:1:8" + "src": "4422:1:5" } ], - "id": 1168, + "id": 1327, "name": "IndexAccess", - "src": "4387:8:8" + "src": "4416:8:5" }, { "attributes": { @@ -8780,49 +8736,49 @@ "type": "bool", "value": "true" }, - "id": 1169, + "id": 1328, "name": "Literal", - "src": "4398:4:8" + "src": "4427:4:5" } ], - "id": 1170, + "id": 1329, "name": "Assignment", - "src": "4387:15:8" + "src": "4416:15:5" } ], - "id": 1171, + "id": 1330, "name": "ExpressionStatement", - "src": "4387:15:8" + "src": "4416:15:5" } ], - "id": 1172, + "id": 1331, "name": "Block", - "src": "4377:34:8" + "src": "4406:34:5" } ], - "id": 1173, + "id": 1332, "name": "IfStatement", - "src": "4343:68:8" + "src": "4372:68:5" } ], - "id": 1174, + "id": 1333, "name": "Block", - "src": "4335:82:8" + "src": "4364:82:5" } ], - "id": 1175, + "id": 1334, "name": "ForStatement", - "src": "4285:132:8" + "src": "4314:132:5" } ], - "id": 1176, + "id": 1335, "name": "Block", - "src": "4230:191:8" + "src": "4259:191:5" } ], - "id": 1177, + "id": 1336, "name": "FunctionDefinition", - "src": "4128:293:8" + "src": "4157:293:5" }, { "attributes": { @@ -8831,7 +8787,7 @@ "isConstructor": false, "kind": "function", "name": "updateVerifier", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" @@ -8843,7 +8799,7 @@ "attributes": { "constant": false, "name": "_newVerifier", - "scope": 1191, + "scope": 1350, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -8857,19 +8813,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1178, + "id": 1337, "name": "ElementaryTypeName", - "src": "4675:7:8" + "src": "4704:7:5" } ], - "id": 1179, + "id": 1338, "name": "VariableDeclaration", - "src": "4675:20:8" + "src": "4704:20:5" } ], - "id": 1180, + "id": 1339, "name": "ParameterList", - "src": "4674:22:8" + "src": "4703:22:5" }, { "attributes": { @@ -8878,9 +8834,9 @@ ] }, "children": [], - "id": 1183, + "id": 1342, "name": "ParameterList", - "src": "4719:0:8" + "src": "4748:0:5" }, { "attributes": { @@ -8893,18 +8849,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 920, + "referencedDeclaration": 1084, "type": "modifier ()", "value": "onlyOperator" }, - "id": 1181, + "id": 1340, "name": "Identifier", - "src": "4706:12:8" + "src": "4735:12:5" } ], - "id": 1182, + "id": 1341, "name": "ModifierInvocation", - "src": "4706:12:8" + "src": "4735:12:5" }, { "children": [ @@ -8927,13 +8883,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 904, + "referencedDeclaration": 1068, "type": "contract IVerifier", "value": "verifier" }, - "id": 1184, + "id": 1343, "name": "Identifier", - "src": "4725:8:8" + "src": "4754:8:5" }, { "attributes": { @@ -8961,13 +8917,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "type(contract IVerifier)", "value": "IVerifier" }, - "id": 1185, + "id": 1344, "name": "Identifier", - "src": "4736:9:8" + "src": "4765:9:5" }, { "attributes": { @@ -8975,38 +8931,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1179, + "referencedDeclaration": 1338, "type": "address", "value": "_newVerifier" }, - "id": 1186, + "id": 1345, "name": "Identifier", - "src": "4746:12:8" + "src": "4775:12:5" } ], - "id": 1187, + "id": 1346, "name": "FunctionCall", - "src": "4736:23:8" + "src": "4765:23:5" } ], - "id": 1188, + "id": 1347, "name": "Assignment", - "src": "4725:34:8" + "src": "4754:34:5" } ], - "id": 1189, + "id": 1348, "name": "ExpressionStatement", - "src": "4725:34:8" + "src": "4754:34:5" } ], - "id": 1190, + "id": 1349, "name": "Block", - "src": "4719:45:8" + "src": "4748:45:5" } ], - "id": 1191, + "id": 1350, "name": "FunctionDefinition", - "src": "4651:113:8" + "src": "4680:113:5" }, { "attributes": { @@ -9015,7 +8971,7 @@ "isConstructor": false, "kind": "function", "name": "changeOperator", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" @@ -9027,7 +8983,7 @@ "attributes": { "constant": false, "name": "_newOperator", - "scope": 1203, + "scope": 1362, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -9041,19 +8997,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1192, + "id": 1351, "name": "ElementaryTypeName", - "src": "4838:7:8" + "src": "4867:7:5" } ], - "id": 1193, + "id": 1352, "name": "VariableDeclaration", - "src": "4838:20:8" + "src": "4867:20:5" } ], - "id": 1194, + "id": 1353, "name": "ParameterList", - "src": "4837:22:8" + "src": "4866:22:5" }, { "attributes": { @@ -9062,9 +9018,9 @@ ] }, "children": [], - "id": 1197, + "id": 1356, "name": "ParameterList", - "src": "4882:0:8" + "src": "4911:0:5" }, { "attributes": { @@ -9077,18 +9033,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 920, + "referencedDeclaration": 1084, "type": "modifier ()", "value": "onlyOperator" }, - "id": 1195, + "id": 1354, "name": "Identifier", - "src": "4869:12:8" + "src": "4898:12:5" } ], - "id": 1196, + "id": 1355, "name": "ModifierInvocation", - "src": "4869:12:8" + "src": "4898:12:5" }, { "children": [ @@ -9111,13 +9067,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 908, + "referencedDeclaration": 1072, "type": "address", "value": "operator" }, - "id": 1198, + "id": 1357, "name": "Identifier", - "src": "4888:8:8" + "src": "4917:8:5" }, { "attributes": { @@ -9125,43 +9081,43 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1193, + "referencedDeclaration": 1352, "type": "address", "value": "_newOperator" }, - "id": 1199, + "id": 1358, "name": "Identifier", - "src": "4899:12:8" + "src": "4928:12:5" } ], - "id": 1200, + "id": 1359, "name": "Assignment", - "src": "4888:23:8" + "src": "4917:23:5" } ], - "id": 1201, + "id": 1360, "name": "ExpressionStatement", - "src": "4888:23:8" + "src": "4917:23:5" } ], - "id": 1202, + "id": 1361, "name": "Block", - "src": "4882:34:8" + "src": "4911:34:5" } ], - "id": 1203, + "id": 1362, "name": "FunctionDefinition", - "src": "4814:102:8" + "src": "4843:102:5" } ], - "id": 1204, + "id": 1363, "name": "ContractDefinition", - "src": "318:4600:8" + "src": "383:4564:5" } ], - "id": 1205, + "id": 1364, "name": "SourceUnit", - "src": "0:4919:8" + "src": "0:4948:5" }, "compiler": { "name": "solc", @@ -9169,7 +9125,7 @@ }, "networks": {}, "schemaVersion": "3.3.4", - "updatedAt": "2021-04-04T20:21:29.873Z", + "updatedAt": "2021-04-12T00:15:10.066Z", "devdoc": { "methods": {} }, diff --git a/client/contracts/SafeMath.json b/client/contracts/SafeMath.json index 35d5fc4..dc296f2 100644 --- a/client/contracts/SafeMath.json +++ b/client/contracts/SafeMath.json @@ -1,25 +1,25 @@ { "contractName": "SafeMath", "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. * Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. * Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]}},\"version\":1}", - "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820227ba37fef003ab44dba94eda774b038aafd5f48da618ac76acada099cedc69d64736f6c63430005110032", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820227ba37fef003ab44dba94eda774b038aafd5f48da618ac76acada099cedc69d64736f6c63430005110032", - "sourceMap": "589:4708:13:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", - "deployedSourceMap": "589:4708:13:-;;;;;;;;", - "source": "pragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n", - "sourcePath": "@openzeppelin/contracts/math/SafeMath.sol", + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. * Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. * Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/SafeMath.sol\":{\"keccak256\":\"0x92dbc60a1308f6f7fc49158be2792c9eb7d4cb2a828628b9ac67b09402caeaf9\",\"urls\":[\"bzz-raw://875473c162bd502c1dd2c1f40f812e337a16da7c27475d7ffc4f9dd72db65c49\",\"dweb:/ipfs/QmUVCJUnPDkQ6AV78uFvegmKJUMtFNb1Jy7cKYJLvHLu2E\"]}},\"version\":1}", + "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158202fd7b258af2a1ef865a20df4f3599a5459f18e21b373b2384e4733e71a0c474564736f6c63430005110032", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158202fd7b258af2a1ef865a20df4f3599a5459f18e21b373b2384e4733e71a0c474564736f6c63430005110032", + "sourceMap": "703:4708:4:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", + "deployedSourceMap": "703:4708:4:-;;;;;;;;", + "source": "pragma solidity ^0.5.0;\n\n// Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.5.0/contracts/math/SafeMath.sol\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n", + "sourcePath": "/home/home/dotfiles/tornado-core/contracts/SafeMath.sol", "ast": { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "absolutePath": "/home/home/dotfiles/tornado-core/contracts/SafeMath.sol", "exportedSymbols": { "SafeMath": [ - 2665 + 1025 ] }, - "id": 2666, + "id": 1026, "nodeType": "SourceUnit", "nodes": [ { - "id": 2480, + "id": 840, "literals": [ "solidity", "^", @@ -27,7 +27,7 @@ ".0" ], "nodeType": "PragmaDirective", - "src": "0:23:13" + "src": "0:23:4" }, { "baseContracts": [], @@ -35,31 +35,31 @@ "contractKind": "library", "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", "fullyImplemented": true, - "id": 2665, + "id": 1025, "linearizedBaseContracts": [ - 2665 + 1025 ], "name": "SafeMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { - "id": 2504, + "id": 864, "nodeType": "Block", - "src": "901:109:13", + "src": "1015:109:4", "statements": [ { "assignments": [ - 2490 + 850 ], "declarations": [ { "constant": false, - "id": 2490, + "id": 850, "name": "c", "nodeType": "VariableDeclaration", - "scope": 2504, - "src": "911:9:13", + "scope": 864, + "src": "1025:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -67,10 +67,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2489, + "id": 849, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "911:7:13", + "src": "1025:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -80,26 +80,26 @@ "visibility": "internal" } ], - "id": 2494, + "id": 854, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2493, + "id": 853, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2491, + "id": 851, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2482, - "src": "923:1:13", + "referencedDeclaration": 842, + "src": "1037:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -109,25 +109,25 @@ "operator": "+", "rightExpression": { "argumentTypes": null, - "id": 2492, + "id": 852, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2484, - "src": "927:1:13", + "referencedDeclaration": 844, + "src": "1041:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "923:5:13", + "src": "1037:5:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "911:17:13" + "src": "1025:17:4" }, { "expression": { @@ -139,19 +139,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2498, + "id": 858, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2496, + "id": 856, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2490, - "src": "946:1:13", + "referencedDeclaration": 850, + "src": "1060:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -161,18 +161,18 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 2497, + "id": 857, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2482, - "src": "951:1:13", + "referencedDeclaration": 842, + "src": "1065:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "946:6:13", + "src": "1060:6:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -181,14 +181,14 @@ { "argumentTypes": null, "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 2499, + "id": 859, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "954:29:13", + "src": "1068:29:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", @@ -208,21 +208,21 @@ "typeString": "literal_string \"SafeMath: addition overflow\"" } ], - "id": 2495, + "id": 855, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "938:7:13", + "referencedDeclaration": 1412, + "src": "1052:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2500, + "id": 860, "isConstant": false, "isLValue": false, "isPure": false, @@ -230,55 +230,55 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "938:46:13", + "src": "1052:46:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2501, + "id": 861, "nodeType": "ExpressionStatement", - "src": "938:46:13" + "src": "1052:46:4" }, { "expression": { "argumentTypes": null, - "id": 2502, + "id": 862, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2490, - "src": "1002:1:13", + "referencedDeclaration": 850, + "src": "1116:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2488, - "id": 2503, + "functionReturnParameters": 848, + "id": 863, "nodeType": "Return", - "src": "995:8:13" + "src": "1109:8:4" } ] }, "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 2505, + "id": 865, "implemented": true, "kind": "function", "modifiers": [], "name": "add", "nodeType": "FunctionDefinition", "parameters": { - "id": 2485, + "id": 845, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2482, + "id": 842, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2505, - "src": "847:9:13", + "scope": 865, + "src": "961:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -286,10 +286,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2481, + "id": 841, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "847:7:13", + "src": "961:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -300,11 +300,11 @@ }, { "constant": false, - "id": 2484, + "id": 844, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2505, - "src": "858:9:13", + "scope": 865, + "src": "972:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -312,10 +312,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2483, + "id": 843, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "858:7:13", + "src": "972:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -325,19 +325,19 @@ "visibility": "internal" } ], - "src": "846:22:13" + "src": "960:22:4" }, "returnParameters": { - "id": 2488, + "id": 848, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2487, + "id": 847, "name": "", "nodeType": "VariableDeclaration", - "scope": 2505, - "src": "892:7:13", + "scope": 865, + "src": "1006:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -345,10 +345,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2486, + "id": 846, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "892:7:13", + "src": "1006:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -358,19 +358,19 @@ "visibility": "internal" } ], - "src": "891:9:13" + "src": "1005:9:4" }, - "scope": 2665, - "src": "834:176:13", + "scope": 1025, + "src": "948:176:4", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2520, + "id": 880, "nodeType": "Block", - "src": "1341:67:13", + "src": "1455:67:4", "statements": [ { "expression": { @@ -378,12 +378,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2515, + "id": 875, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2507, - "src": "1362:1:13", + "referencedDeclaration": 867, + "src": "1476:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -391,12 +391,12 @@ }, { "argumentTypes": null, - "id": 2516, + "id": 876, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2509, - "src": "1365:1:13", + "referencedDeclaration": 869, + "src": "1479:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -405,14 +405,14 @@ { "argumentTypes": null, "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 2517, + "id": 877, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1368:32:13", + "src": "1482:32:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", @@ -436,21 +436,21 @@ "typeString": "literal_string \"SafeMath: subtraction overflow\"" } ], - "id": 2514, + "id": 874, "name": "sub", "nodeType": "Identifier", "overloadedDeclarations": [ - 2521, - 2548 + 881, + 908 ], - "referencedDeclaration": 2548, - "src": "1358:3:13", + "referencedDeclaration": 908, + "src": "1472:3:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" } }, - "id": 2518, + "id": 878, "isConstant": false, "isLValue": false, "isPure": false, @@ -458,37 +458,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1358:43:13", + "src": "1472:43:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2513, - "id": 2519, + "functionReturnParameters": 873, + "id": 879, "nodeType": "Return", - "src": "1351:50:13" + "src": "1465:50:4" } ] }, "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 2521, + "id": 881, "implemented": true, "kind": "function", "modifiers": [], "name": "sub", "nodeType": "FunctionDefinition", "parameters": { - "id": 2510, + "id": 870, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2507, + "id": 867, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2521, - "src": "1287:9:13", + "scope": 881, + "src": "1401:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -496,10 +496,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2506, + "id": 866, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1287:7:13", + "src": "1401:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -510,11 +510,11 @@ }, { "constant": false, - "id": 2509, + "id": 869, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2521, - "src": "1298:9:13", + "scope": 881, + "src": "1412:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -522,10 +522,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2508, + "id": 868, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1298:7:13", + "src": "1412:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -535,19 +535,19 @@ "visibility": "internal" } ], - "src": "1286:22:13" + "src": "1400:22:4" }, "returnParameters": { - "id": 2513, + "id": 873, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2512, + "id": 872, "name": "", "nodeType": "VariableDeclaration", - "scope": 2521, - "src": "1332:7:13", + "scope": 881, + "src": "1446:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -555,10 +555,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2511, + "id": 871, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1332:7:13", + "src": "1446:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -568,19 +568,19 @@ "visibility": "internal" } ], - "src": "1331:9:13" + "src": "1445:9:4" }, - "scope": 2665, - "src": "1274:134:13", + "scope": 1025, + "src": "1388:134:4", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2547, + "id": 907, "nodeType": "Block", - "src": "1827:92:13", + "src": "1941:92:4", "statements": [ { "expression": { @@ -592,19 +592,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2535, + "id": 895, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2533, + "id": 893, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2525, - "src": "1845:1:13", + "referencedDeclaration": 885, + "src": "1959:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -614,18 +614,18 @@ "operator": "<=", "rightExpression": { "argumentTypes": null, - "id": 2534, + "id": 894, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2523, - "src": "1850:1:13", + "referencedDeclaration": 883, + "src": "1964:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1845:6:13", + "src": "1959:6:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -633,12 +633,12 @@ }, { "argumentTypes": null, - "id": 2536, + "id": 896, "name": "errorMessage", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2527, - "src": "1853:12:13", + "referencedDeclaration": 887, + "src": "1967:12:4", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -656,21 +656,21 @@ "typeString": "string memory" } ], - "id": 2532, + "id": 892, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "1837:7:13", + "referencedDeclaration": 1412, + "src": "1951:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2537, + "id": 897, "isConstant": false, "isLValue": false, "isPure": false, @@ -678,28 +678,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1837:29:13", + "src": "1951:29:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2538, + "id": 898, "nodeType": "ExpressionStatement", - "src": "1837:29:13" + "src": "1951:29:4" }, { "assignments": [ - 2540 + 900 ], "declarations": [ { "constant": false, - "id": 2540, + "id": 900, "name": "c", "nodeType": "VariableDeclaration", - "scope": 2547, - "src": "1876:9:13", + "scope": 907, + "src": "1990:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -707,10 +707,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2539, + "id": 899, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1876:7:13", + "src": "1990:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -720,26 +720,26 @@ "visibility": "internal" } ], - "id": 2544, + "id": 904, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2543, + "id": 903, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2541, + "id": 901, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2523, - "src": "1888:1:13", + "referencedDeclaration": 883, + "src": "2002:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -749,65 +749,65 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 2542, + "id": 902, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2525, - "src": "1892:1:13", + "referencedDeclaration": 885, + "src": "2006:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1888:5:13", + "src": "2002:5:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "1876:17:13" + "src": "1990:17:4" }, { "expression": { "argumentTypes": null, - "id": 2545, + "id": 905, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2540, - "src": "1911:1:13", + "referencedDeclaration": 900, + "src": "2025:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2531, - "id": 2546, + "functionReturnParameters": 891, + "id": 906, "nodeType": "Return", - "src": "1904:8:13" + "src": "2018:8:4" } ] }, "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 2548, + "id": 908, "implemented": true, "kind": "function", "modifiers": [], "name": "sub", "nodeType": "FunctionDefinition", "parameters": { - "id": 2528, + "id": 888, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2523, + "id": 883, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "1745:9:13", + "scope": 908, + "src": "1859:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -815,10 +815,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2522, + "id": 882, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1745:7:13", + "src": "1859:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -829,11 +829,11 @@ }, { "constant": false, - "id": 2525, + "id": 885, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "1756:9:13", + "scope": 908, + "src": "1870:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -841,10 +841,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2524, + "id": 884, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1756:7:13", + "src": "1870:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -855,11 +855,11 @@ }, { "constant": false, - "id": 2527, + "id": 887, "name": "errorMessage", "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "1767:26:13", + "scope": 908, + "src": "1881:26:4", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -867,10 +867,10 @@ "typeString": "string" }, "typeName": { - "id": 2526, + "id": 886, "name": "string", "nodeType": "ElementaryTypeName", - "src": "1767:6:13", + "src": "1881:6:4", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -880,19 +880,19 @@ "visibility": "internal" } ], - "src": "1744:50:13" + "src": "1858:50:4" }, "returnParameters": { - "id": 2531, + "id": 891, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2530, + "id": 890, "name": "", "nodeType": "VariableDeclaration", - "scope": 2548, - "src": "1818:7:13", + "scope": 908, + "src": "1932:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -900,10 +900,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2529, + "id": 889, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1818:7:13", + "src": "1932:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -913,19 +913,19 @@ "visibility": "internal" } ], - "src": "1817:9:13" + "src": "1931:9:4" }, - "scope": 2665, - "src": "1732:187:13", + "scope": 1025, + "src": "1846:187:4", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2581, + "id": 941, "nodeType": "Block", - "src": "2226:392:13", + "src": "2340:392:4", "statements": [ { "condition": { @@ -934,19 +934,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2559, + "id": 919, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2557, + "id": 917, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2550, - "src": "2458:1:13", + "referencedDeclaration": 910, + "src": "2572:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -957,14 +957,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2558, + "id": 918, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2463:1:13", + "src": "2577:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -972,33 +972,33 @@ }, "value": "0" }, - "src": "2458:6:13", + "src": "2572:6:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 2563, + "id": 923, "nodeType": "IfStatement", - "src": "2454:45:13", + "src": "2568:45:4", "trueBody": { - "id": 2562, + "id": 922, "nodeType": "Block", - "src": "2466:33:13", + "src": "2580:33:4", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", - "id": 2560, + "id": 920, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2487:1:13", + "src": "2601:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1006,26 +1006,26 @@ }, "value": "0" }, - "functionReturnParameters": 2556, - "id": 2561, + "functionReturnParameters": 916, + "id": 921, "nodeType": "Return", - "src": "2480:8:13" + "src": "2594:8:4" } ] } }, { "assignments": [ - 2565 + 925 ], "declarations": [ { "constant": false, - "id": 2565, + "id": 925, "name": "c", "nodeType": "VariableDeclaration", - "scope": 2581, - "src": "2509:9:13", + "scope": 941, + "src": "2623:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1033,10 +1033,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2564, + "id": 924, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2509:7:13", + "src": "2623:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1046,26 +1046,26 @@ "visibility": "internal" } ], - "id": 2569, + "id": 929, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2568, + "id": 928, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2566, + "id": 926, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2550, - "src": "2521:1:13", + "referencedDeclaration": 910, + "src": "2635:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1075,25 +1075,25 @@ "operator": "*", "rightExpression": { "argumentTypes": null, - "id": 2567, + "id": 927, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2552, - "src": "2525:1:13", + "referencedDeclaration": 912, + "src": "2639:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2521:5:13", + "src": "2635:5:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "2509:17:13" + "src": "2623:17:4" }, { "expression": { @@ -1105,7 +1105,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2575, + "id": 935, "isConstant": false, "isLValue": false, "isPure": false, @@ -1116,19 +1116,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2573, + "id": 933, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2571, + "id": 931, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2565, - "src": "2544:1:13", + "referencedDeclaration": 925, + "src": "2658:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1138,18 +1138,18 @@ "operator": "/", "rightExpression": { "argumentTypes": null, - "id": 2572, + "id": 932, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2550, - "src": "2548:1:13", + "referencedDeclaration": 910, + "src": "2662:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2544:5:13", + "src": "2658:5:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1159,18 +1159,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 2574, + "id": 934, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2552, - "src": "2553:1:13", + "referencedDeclaration": 912, + "src": "2667:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2544:10:13", + "src": "2658:10:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1179,14 +1179,14 @@ { "argumentTypes": null, "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 2576, + "id": 936, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2556:35:13", + "src": "2670:35:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", @@ -1206,21 +1206,21 @@ "typeString": "literal_string \"SafeMath: multiplication overflow\"" } ], - "id": 2570, + "id": 930, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "2536:7:13", + "referencedDeclaration": 1412, + "src": "2650:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2577, + "id": 937, "isConstant": false, "isLValue": false, "isPure": false, @@ -1228,55 +1228,55 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2536:56:13", + "src": "2650:56:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2578, + "id": 938, "nodeType": "ExpressionStatement", - "src": "2536:56:13" + "src": "2650:56:4" }, { "expression": { "argumentTypes": null, - "id": 2579, + "id": 939, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2565, - "src": "2610:1:13", + "referencedDeclaration": 925, + "src": "2724:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2556, - "id": 2580, + "functionReturnParameters": 916, + "id": 940, "nodeType": "Return", - "src": "2603:8:13" + "src": "2717:8:4" } ] }, "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 2582, + "id": 942, "implemented": true, "kind": "function", "modifiers": [], "name": "mul", "nodeType": "FunctionDefinition", "parameters": { - "id": 2553, + "id": 913, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2550, + "id": 910, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2582, - "src": "2172:9:13", + "scope": 942, + "src": "2286:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1284,10 +1284,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2549, + "id": 909, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2172:7:13", + "src": "2286:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1298,11 +1298,11 @@ }, { "constant": false, - "id": 2552, + "id": 912, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2582, - "src": "2183:9:13", + "scope": 942, + "src": "2297:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1310,10 +1310,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2551, + "id": 911, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2183:7:13", + "src": "2297:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1323,19 +1323,19 @@ "visibility": "internal" } ], - "src": "2171:22:13" + "src": "2285:22:4" }, "returnParameters": { - "id": 2556, + "id": 916, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2555, + "id": 915, "name": "", "nodeType": "VariableDeclaration", - "scope": 2582, - "src": "2217:7:13", + "scope": 942, + "src": "2331:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1343,10 +1343,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2554, + "id": 914, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2217:7:13", + "src": "2331:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1356,19 +1356,19 @@ "visibility": "internal" } ], - "src": "2216:9:13" + "src": "2330:9:4" }, - "scope": 2665, - "src": "2159:459:13", + "scope": 1025, + "src": "2273:459:4", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2597, + "id": 957, "nodeType": "Block", - "src": "3140:63:13", + "src": "3254:63:4", "statements": [ { "expression": { @@ -1376,12 +1376,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2592, + "id": 952, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2584, - "src": "3161:1:13", + "referencedDeclaration": 944, + "src": "3275:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1389,12 +1389,12 @@ }, { "argumentTypes": null, - "id": 2593, + "id": 953, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2586, - "src": "3164:1:13", + "referencedDeclaration": 946, + "src": "3278:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1403,14 +1403,14 @@ { "argumentTypes": null, "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 2594, + "id": 954, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3167:28:13", + "src": "3281:28:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", @@ -1434,21 +1434,21 @@ "typeString": "literal_string \"SafeMath: division by zero\"" } ], - "id": 2591, + "id": 951, "name": "div", "nodeType": "Identifier", "overloadedDeclarations": [ - 2598, - 2625 + 958, + 985 ], - "referencedDeclaration": 2625, - "src": "3157:3:13", + "referencedDeclaration": 985, + "src": "3271:3:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" } }, - "id": 2595, + "id": 955, "isConstant": false, "isLValue": false, "isPure": false, @@ -1456,37 +1456,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3157:39:13", + "src": "3271:39:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2590, - "id": 2596, + "functionReturnParameters": 950, + "id": 956, "nodeType": "Return", - "src": "3150:46:13" + "src": "3264:46:4" } ] }, "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 2598, + "id": 958, "implemented": true, "kind": "function", "modifiers": [], "name": "div", "nodeType": "FunctionDefinition", "parameters": { - "id": 2587, + "id": 947, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2584, + "id": 944, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2598, - "src": "3086:9:13", + "scope": 958, + "src": "3200:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1494,10 +1494,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2583, + "id": 943, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3086:7:13", + "src": "3200:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1508,11 +1508,11 @@ }, { "constant": false, - "id": 2586, + "id": 946, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2598, - "src": "3097:9:13", + "scope": 958, + "src": "3211:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1520,10 +1520,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2585, + "id": 945, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3097:7:13", + "src": "3211:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1533,19 +1533,19 @@ "visibility": "internal" } ], - "src": "3085:22:13" + "src": "3199:22:4" }, "returnParameters": { - "id": 2590, + "id": 950, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2589, + "id": 949, "name": "", "nodeType": "VariableDeclaration", - "scope": 2598, - "src": "3131:7:13", + "scope": 958, + "src": "3245:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1553,10 +1553,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2588, + "id": 948, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3131:7:13", + "src": "3245:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1566,19 +1566,19 @@ "visibility": "internal" } ], - "src": "3130:9:13" + "src": "3244:9:4" }, - "scope": 2665, - "src": "3073:130:13", + "scope": 1025, + "src": "3187:130:4", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2624, + "id": 984, "nodeType": "Block", - "src": "3813:243:13", + "src": "3927:243:4", "statements": [ { "expression": { @@ -1590,19 +1590,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2612, + "id": 972, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2610, + "id": 970, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2602, - "src": "3897:1:13", + "referencedDeclaration": 962, + "src": "4011:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1613,14 +1613,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2611, + "id": 971, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3901:1:13", + "src": "4015:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1628,7 +1628,7 @@ }, "value": "0" }, - "src": "3897:5:13", + "src": "4011:5:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1636,12 +1636,12 @@ }, { "argumentTypes": null, - "id": 2613, + "id": 973, "name": "errorMessage", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2604, - "src": "3904:12:13", + "referencedDeclaration": 964, + "src": "4018:12:4", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -1659,21 +1659,21 @@ "typeString": "string memory" } ], - "id": 2609, + "id": 969, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3889:7:13", + "referencedDeclaration": 1412, + "src": "4003:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2614, + "id": 974, "isConstant": false, "isLValue": false, "isPure": false, @@ -1681,28 +1681,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3889:28:13", + "src": "4003:28:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2615, + "id": 975, "nodeType": "ExpressionStatement", - "src": "3889:28:13" + "src": "4003:28:4" }, { "assignments": [ - 2617 + 977 ], "declarations": [ { "constant": false, - "id": 2617, + "id": 977, "name": "c", "nodeType": "VariableDeclaration", - "scope": 2624, - "src": "3927:9:13", + "scope": 984, + "src": "4041:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1710,10 +1710,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2616, + "id": 976, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3927:7:13", + "src": "4041:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1723,26 +1723,26 @@ "visibility": "internal" } ], - "id": 2621, + "id": 981, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2620, + "id": 980, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2618, + "id": 978, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2600, - "src": "3939:1:13", + "referencedDeclaration": 960, + "src": "4053:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1752,65 +1752,65 @@ "operator": "/", "rightExpression": { "argumentTypes": null, - "id": 2619, + "id": 979, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2602, - "src": "3943:1:13", + "referencedDeclaration": 962, + "src": "4057:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3939:5:13", + "src": "4053:5:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "3927:17:13" + "src": "4041:17:4" }, { "expression": { "argumentTypes": null, - "id": 2622, + "id": 982, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2617, - "src": "4048:1:13", + "referencedDeclaration": 977, + "src": "4162:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2608, - "id": 2623, + "functionReturnParameters": 968, + "id": 983, "nodeType": "Return", - "src": "4041:8:13" + "src": "4155:8:4" } ] }, "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 2625, + "id": 985, "implemented": true, "kind": "function", "modifiers": [], "name": "div", "nodeType": "FunctionDefinition", "parameters": { - "id": 2605, + "id": 965, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2600, + "id": 960, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2625, - "src": "3731:9:13", + "scope": 985, + "src": "3845:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1818,10 +1818,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2599, + "id": 959, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3731:7:13", + "src": "3845:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1832,11 +1832,11 @@ }, { "constant": false, - "id": 2602, + "id": 962, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2625, - "src": "3742:9:13", + "scope": 985, + "src": "3856:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1844,10 +1844,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2601, + "id": 961, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3742:7:13", + "src": "3856:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1858,11 +1858,11 @@ }, { "constant": false, - "id": 2604, + "id": 964, "name": "errorMessage", "nodeType": "VariableDeclaration", - "scope": 2625, - "src": "3753:26:13", + "scope": 985, + "src": "3867:26:4", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -1870,10 +1870,10 @@ "typeString": "string" }, "typeName": { - "id": 2603, + "id": 963, "name": "string", "nodeType": "ElementaryTypeName", - "src": "3753:6:13", + "src": "3867:6:4", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1883,19 +1883,19 @@ "visibility": "internal" } ], - "src": "3730:50:13" + "src": "3844:50:4" }, "returnParameters": { - "id": 2608, + "id": 968, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2607, + "id": 967, "name": "", "nodeType": "VariableDeclaration", - "scope": 2625, - "src": "3804:7:13", + "scope": 985, + "src": "3918:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1903,10 +1903,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2606, + "id": 966, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3804:7:13", + "src": "3918:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1916,19 +1916,19 @@ "visibility": "internal" } ], - "src": "3803:9:13" + "src": "3917:9:4" }, - "scope": 2665, - "src": "3718:338:13", + "scope": 1025, + "src": "3832:338:4", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2640, + "id": 1000, "nodeType": "Block", - "src": "4567:61:13", + "src": "4681:61:4", "statements": [ { "expression": { @@ -1936,12 +1936,12 @@ "arguments": [ { "argumentTypes": null, - "id": 2635, + "id": 995, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2627, - "src": "4588:1:13", + "referencedDeclaration": 987, + "src": "4702:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1949,12 +1949,12 @@ }, { "argumentTypes": null, - "id": 2636, + "id": 996, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2629, - "src": "4591:1:13", + "referencedDeclaration": 989, + "src": "4705:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1963,14 +1963,14 @@ { "argumentTypes": null, "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 2637, + "id": 997, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4594:26:13", + "src": "4708:26:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", @@ -1994,21 +1994,21 @@ "typeString": "literal_string \"SafeMath: modulo by zero\"" } ], - "id": 2634, + "id": 994, "name": "mod", "nodeType": "Identifier", "overloadedDeclarations": [ - 2641, - 2664 + 1001, + 1024 ], - "referencedDeclaration": 2664, - "src": "4584:3:13", + "referencedDeclaration": 1024, + "src": "4698:3:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" } }, - "id": 2638, + "id": 998, "isConstant": false, "isLValue": false, "isPure": false, @@ -2016,37 +2016,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4584:37:13", + "src": "4698:37:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2633, - "id": 2639, + "functionReturnParameters": 993, + "id": 999, "nodeType": "Return", - "src": "4577:44:13" + "src": "4691:44:4" } ] }, "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 2641, + "id": 1001, "implemented": true, "kind": "function", "modifiers": [], "name": "mod", "nodeType": "FunctionDefinition", "parameters": { - "id": 2630, + "id": 990, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2627, + "id": 987, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2641, - "src": "4513:9:13", + "scope": 1001, + "src": "4627:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2054,10 +2054,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2626, + "id": 986, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4513:7:13", + "src": "4627:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2068,11 +2068,11 @@ }, { "constant": false, - "id": 2629, + "id": 989, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2641, - "src": "4524:9:13", + "scope": 1001, + "src": "4638:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2080,10 +2080,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2628, + "id": 988, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4524:7:13", + "src": "4638:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2093,19 +2093,19 @@ "visibility": "internal" } ], - "src": "4512:22:13" + "src": "4626:22:4" }, "returnParameters": { - "id": 2633, + "id": 993, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2632, + "id": 992, "name": "", "nodeType": "VariableDeclaration", - "scope": 2641, - "src": "4558:7:13", + "scope": 1001, + "src": "4672:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2113,10 +2113,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2631, + "id": 991, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4558:7:13", + "src": "4672:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2126,19 +2126,19 @@ "visibility": "internal" } ], - "src": "4557:9:13" + "src": "4671:9:4" }, - "scope": 2665, - "src": "4500:128:13", + "scope": 1025, + "src": "4614:128:4", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 2663, + "id": 1023, "nodeType": "Block", - "src": "5227:68:13", + "src": "5341:68:4", "statements": [ { "expression": { @@ -2150,19 +2150,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2655, + "id": 1015, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2653, + "id": 1013, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2645, - "src": "5245:1:13", + "referencedDeclaration": 1005, + "src": "5359:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2173,14 +2173,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 2654, + "id": 1014, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5250:1:13", + "src": "5364:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2188,7 +2188,7 @@ }, "value": "0" }, - "src": "5245:6:13", + "src": "5359:6:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2196,12 +2196,12 @@ }, { "argumentTypes": null, - "id": 2656, + "id": 1016, "name": "errorMessage", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2647, - "src": "5253:12:13", + "referencedDeclaration": 1007, + "src": "5367:12:4", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -2219,21 +2219,21 @@ "typeString": "string memory" } ], - "id": 2652, + "id": 1012, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "5237:7:13", + "referencedDeclaration": 1412, + "src": "5351:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2657, + "id": 1017, "isConstant": false, "isLValue": false, "isPure": false, @@ -2241,15 +2241,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5237:29:13", + "src": "5351:29:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2658, + "id": 1018, "nodeType": "ExpressionStatement", - "src": "5237:29:13" + "src": "5351:29:4" }, { "expression": { @@ -2258,19 +2258,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2661, + "id": 1021, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 2659, + "id": 1019, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2643, - "src": "5283:1:13", + "referencedDeclaration": 1003, + "src": "5397:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2280,48 +2280,48 @@ "operator": "%", "rightExpression": { "argumentTypes": null, - "id": 2660, + "id": 1020, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2645, - "src": "5287:1:13", + "referencedDeclaration": 1005, + "src": "5401:1:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5283:5:13", + "src": "5397:5:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2651, - "id": 2662, + "functionReturnParameters": 1011, + "id": 1022, "nodeType": "Return", - "src": "5276:12:13" + "src": "5390:12:4" } ] }, "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 2664, + "id": 1024, "implemented": true, "kind": "function", "modifiers": [], "name": "mod", "nodeType": "FunctionDefinition", "parameters": { - "id": 2648, + "id": 1008, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2643, + "id": 1003, "name": "a", "nodeType": "VariableDeclaration", - "scope": 2664, - "src": "5145:9:13", + "scope": 1024, + "src": "5259:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2329,10 +2329,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2642, + "id": 1002, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5145:7:13", + "src": "5259:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2343,11 +2343,11 @@ }, { "constant": false, - "id": 2645, + "id": 1005, "name": "b", "nodeType": "VariableDeclaration", - "scope": 2664, - "src": "5156:9:13", + "scope": 1024, + "src": "5270:9:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2355,10 +2355,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2644, + "id": 1004, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5156:7:13", + "src": "5270:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2369,11 +2369,11 @@ }, { "constant": false, - "id": 2647, + "id": 1007, "name": "errorMessage", "nodeType": "VariableDeclaration", - "scope": 2664, - "src": "5167:26:13", + "scope": 1024, + "src": "5281:26:4", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -2381,10 +2381,10 @@ "typeString": "string" }, "typeName": { - "id": 2646, + "id": 1006, "name": "string", "nodeType": "ElementaryTypeName", - "src": "5167:6:13", + "src": "5281:6:4", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -2394,19 +2394,19 @@ "visibility": "internal" } ], - "src": "5144:50:13" + "src": "5258:50:4" }, "returnParameters": { - "id": 2651, + "id": 1011, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2650, + "id": 1010, "name": "", "nodeType": "VariableDeclaration", - "scope": 2664, - "src": "5218:7:13", + "scope": 1024, + "src": "5332:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2414,10 +2414,10 @@ "typeString": "uint256" }, "typeName": { - "id": 2649, + "id": 1009, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5218:7:13", + "src": "5332:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2427,27 +2427,27 @@ "visibility": "internal" } ], - "src": "5217:9:13" + "src": "5331:9:4" }, - "scope": 2665, - "src": "5132:163:13", + "scope": 1025, + "src": "5246:163:4", "stateMutability": "pure", "superFunction": null, "visibility": "internal" } ], - "scope": 2666, - "src": "589:4708:13" + "scope": 1026, + "src": "703:4708:4" } ], - "src": "0:5298:13" + "src": "0:5412:4" }, "legacyAST": { "attributes": { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "absolutePath": "/home/home/dotfiles/tornado-core/contracts/SafeMath.sol", "exportedSymbols": { "SafeMath": [ - 2665 + 1025 ] } }, @@ -2461,9 +2461,9 @@ ".0" ] }, - "id": 2480, + "id": 840, "name": "PragmaDirective", - "src": "0:23:13" + "src": "0:23:4" }, { "attributes": { @@ -2477,10 +2477,10 @@ "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", "fullyImplemented": true, "linearizedBaseContracts": [ - 2665 + 1025 ], "name": "SafeMath", - "scope": 2666 + "scope": 1026 }, "children": [ { @@ -2493,7 +2493,7 @@ null ], "name": "add", - "scope": 2665, + "scope": 1025, "stateMutability": "pure", "superFunction": null, "visibility": "internal" @@ -2505,7 +2505,7 @@ "attributes": { "constant": false, "name": "a", - "scope": 2505, + "scope": 865, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -2518,20 +2518,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2481, + "id": 841, "name": "ElementaryTypeName", - "src": "847:7:13" + "src": "961:7:4" } ], - "id": 2482, + "id": 842, "name": "VariableDeclaration", - "src": "847:9:13" + "src": "961:9:4" }, { "attributes": { "constant": false, "name": "b", - "scope": 2505, + "scope": 865, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -2544,19 +2544,19 @@ "name": "uint256", "type": "uint256" }, - "id": 2483, + "id": 843, "name": "ElementaryTypeName", - "src": "858:7:13" + "src": "972:7:4" } ], - "id": 2484, + "id": 844, "name": "VariableDeclaration", - "src": "858:9:13" + "src": "972:9:4" } ], - "id": 2485, + "id": 845, "name": "ParameterList", - "src": "846:22:13" + "src": "960:22:4" }, { "children": [ @@ -2564,7 +2564,7 @@ "attributes": { "constant": false, "name": "", - "scope": 2505, + "scope": 865, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -2577,26 +2577,26 @@ "name": "uint256", "type": "uint256" }, - "id": 2486, + "id": 846, "name": "ElementaryTypeName", - "src": "892:7:13" + "src": "1006:7:4" } ], - "id": 2487, + "id": 847, "name": "VariableDeclaration", - "src": "892:7:13" + "src": "1006:7:4" } ], - "id": 2488, + "id": 848, "name": "ParameterList", - "src": "891:9:13" + "src": "1005:9:4" }, { "children": [ { "attributes": { "assignments": [ - 2490 + 850 ] }, "children": [ @@ -2604,7 +2604,7 @@ "attributes": { "constant": false, "name": "c", - "scope": 2504, + "scope": 864, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -2617,14 +2617,14 @@ "name": "uint256", "type": "uint256" }, - "id": 2489, + "id": 849, "name": "ElementaryTypeName", - "src": "911:7:13" + "src": "1025:7:4" } ], - "id": 2490, + "id": 850, "name": "VariableDeclaration", - "src": "911:9:13" + "src": "1025:9:4" }, { "attributes": { @@ -2647,13 +2647,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2482, + "referencedDeclaration": 842, "type": "uint256", "value": "a" }, - "id": 2491, + "id": 851, "name": "Identifier", - "src": "923:1:13" + "src": "1037:1:4" }, { "attributes": { @@ -2661,23 +2661,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2484, + "referencedDeclaration": 844, "type": "uint256", "value": "b" }, - "id": 2492, + "id": 852, "name": "Identifier", - "src": "927:1:13" + "src": "1041:1:4" } ], - "id": 2493, + "id": 853, "name": "BinaryOperation", - "src": "923:5:13" + "src": "1037:5:4" } ], - "id": 2494, + "id": 854, "name": "VariableDeclarationStatement", - "src": "911:17:13" + "src": "1025:17:4" }, { "children": [ @@ -2709,16 +2709,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 2495, + "id": 855, "name": "Identifier", - "src": "938:7:13" + "src": "1052:7:4" }, { "attributes": { @@ -2741,13 +2741,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2490, + "referencedDeclaration": 850, "type": "uint256", "value": "c" }, - "id": 2496, + "id": 856, "name": "Identifier", - "src": "946:1:13" + "src": "1060:1:4" }, { "attributes": { @@ -2755,18 +2755,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2482, + "referencedDeclaration": 842, "type": "uint256", "value": "a" }, - "id": 2497, + "id": 857, "name": "Identifier", - "src": "951:1:13" + "src": "1065:1:4" } ], - "id": 2498, + "id": 858, "name": "BinaryOperation", - "src": "946:6:13" + "src": "1060:6:4" }, { "attributes": { @@ -2781,23 +2781,23 @@ "type": "literal_string \"SafeMath: addition overflow\"", "value": "SafeMath: addition overflow" }, - "id": 2499, + "id": 859, "name": "Literal", - "src": "954:29:13" + "src": "1068:29:4" } ], - "id": 2500, + "id": 860, "name": "FunctionCall", - "src": "938:46:13" + "src": "1052:46:4" } ], - "id": 2501, + "id": 861, "name": "ExpressionStatement", - "src": "938:46:13" + "src": "1052:46:4" }, { "attributes": { - "functionReturnParameters": 2488 + "functionReturnParameters": 848 }, "children": [ { @@ -2806,28 +2806,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2490, + "referencedDeclaration": 850, "type": "uint256", "value": "c" }, - "id": 2502, + "id": 862, "name": "Identifier", - "src": "1002:1:13" + "src": "1116:1:4" } ], - "id": 2503, + "id": 863, "name": "Return", - "src": "995:8:13" + "src": "1109:8:4" } ], - "id": 2504, + "id": 864, "name": "Block", - "src": "901:109:13" + "src": "1015:109:4" } ], - "id": 2505, + "id": 865, "name": "FunctionDefinition", - "src": "834:176:13" + "src": "948:176:4" }, { "attributes": { @@ -2839,7 +2839,7 @@ null ], "name": "sub", - "scope": 2665, + "scope": 1025, "stateMutability": "pure", "superFunction": null, "visibility": "internal" @@ -2851,7 +2851,7 @@ "attributes": { "constant": false, "name": "a", - "scope": 2521, + "scope": 881, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -2864,20 +2864,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2506, + "id": 866, "name": "ElementaryTypeName", - "src": "1287:7:13" + "src": "1401:7:4" } ], - "id": 2507, + "id": 867, "name": "VariableDeclaration", - "src": "1287:9:13" + "src": "1401:9:4" }, { "attributes": { "constant": false, "name": "b", - "scope": 2521, + "scope": 881, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -2890,19 +2890,19 @@ "name": "uint256", "type": "uint256" }, - "id": 2508, + "id": 868, "name": "ElementaryTypeName", - "src": "1298:7:13" + "src": "1412:7:4" } ], - "id": 2509, + "id": 869, "name": "VariableDeclaration", - "src": "1298:9:13" + "src": "1412:9:4" } ], - "id": 2510, + "id": 870, "name": "ParameterList", - "src": "1286:22:13" + "src": "1400:22:4" }, { "children": [ @@ -2910,7 +2910,7 @@ "attributes": { "constant": false, "name": "", - "scope": 2521, + "scope": 881, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -2923,25 +2923,25 @@ "name": "uint256", "type": "uint256" }, - "id": 2511, + "id": 871, "name": "ElementaryTypeName", - "src": "1332:7:13" + "src": "1446:7:4" } ], - "id": 2512, + "id": 872, "name": "VariableDeclaration", - "src": "1332:7:13" + "src": "1446:7:4" } ], - "id": 2513, + "id": 873, "name": "ParameterList", - "src": "1331:9:13" + "src": "1445:9:4" }, { "children": [ { "attributes": { - "functionReturnParameters": 2513 + "functionReturnParameters": 873 }, "children": [ { @@ -2976,16 +2976,16 @@ } ], "overloadedDeclarations": [ - 2521, - 2548 + 881, + 908 ], - "referencedDeclaration": 2548, + "referencedDeclaration": 908, "type": "function (uint256,uint256,string memory) pure returns (uint256)", "value": "sub" }, - "id": 2514, + "id": 874, "name": "Identifier", - "src": "1358:3:13" + "src": "1472:3:4" }, { "attributes": { @@ -2993,13 +2993,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2507, + "referencedDeclaration": 867, "type": "uint256", "value": "a" }, - "id": 2515, + "id": 875, "name": "Identifier", - "src": "1362:1:13" + "src": "1476:1:4" }, { "attributes": { @@ -3007,13 +3007,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2509, + "referencedDeclaration": 869, "type": "uint256", "value": "b" }, - "id": 2516, + "id": 876, "name": "Identifier", - "src": "1365:1:13" + "src": "1479:1:4" }, { "attributes": { @@ -3028,29 +3028,29 @@ "type": "literal_string \"SafeMath: subtraction overflow\"", "value": "SafeMath: subtraction overflow" }, - "id": 2517, + "id": 877, "name": "Literal", - "src": "1368:32:13" + "src": "1482:32:4" } ], - "id": 2518, + "id": 878, "name": "FunctionCall", - "src": "1358:43:13" + "src": "1472:43:4" } ], - "id": 2519, + "id": 879, "name": "Return", - "src": "1351:50:13" + "src": "1465:50:4" } ], - "id": 2520, + "id": 880, "name": "Block", - "src": "1341:67:13" + "src": "1455:67:4" } ], - "id": 2521, + "id": 881, "name": "FunctionDefinition", - "src": "1274:134:13" + "src": "1388:134:4" }, { "attributes": { @@ -3062,7 +3062,7 @@ null ], "name": "sub", - "scope": 2665, + "scope": 1025, "stateMutability": "pure", "superFunction": null, "visibility": "internal" @@ -3074,7 +3074,7 @@ "attributes": { "constant": false, "name": "a", - "scope": 2548, + "scope": 908, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3087,20 +3087,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2522, + "id": 882, "name": "ElementaryTypeName", - "src": "1745:7:13" + "src": "1859:7:4" } ], - "id": 2523, + "id": 883, "name": "VariableDeclaration", - "src": "1745:9:13" + "src": "1859:9:4" }, { "attributes": { "constant": false, "name": "b", - "scope": 2548, + "scope": 908, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3113,20 +3113,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2524, + "id": 884, "name": "ElementaryTypeName", - "src": "1756:7:13" + "src": "1870:7:4" } ], - "id": 2525, + "id": 885, "name": "VariableDeclaration", - "src": "1756:9:13" + "src": "1870:9:4" }, { "attributes": { "constant": false, "name": "errorMessage", - "scope": 2548, + "scope": 908, "stateVariable": false, "storageLocation": "memory", "type": "string", @@ -3139,19 +3139,19 @@ "name": "string", "type": "string" }, - "id": 2526, + "id": 886, "name": "ElementaryTypeName", - "src": "1767:6:13" + "src": "1881:6:4" } ], - "id": 2527, + "id": 887, "name": "VariableDeclaration", - "src": "1767:26:13" + "src": "1881:26:4" } ], - "id": 2528, + "id": 888, "name": "ParameterList", - "src": "1744:50:13" + "src": "1858:50:4" }, { "children": [ @@ -3159,7 +3159,7 @@ "attributes": { "constant": false, "name": "", - "scope": 2548, + "scope": 908, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3172,19 +3172,19 @@ "name": "uint256", "type": "uint256" }, - "id": 2529, + "id": 889, "name": "ElementaryTypeName", - "src": "1818:7:13" + "src": "1932:7:4" } ], - "id": 2530, + "id": 890, "name": "VariableDeclaration", - "src": "1818:7:13" + "src": "1932:7:4" } ], - "id": 2531, + "id": 891, "name": "ParameterList", - "src": "1817:9:13" + "src": "1931:9:4" }, { "children": [ @@ -3218,16 +3218,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 2532, + "id": 892, "name": "Identifier", - "src": "1837:7:13" + "src": "1951:7:4" }, { "attributes": { @@ -3250,13 +3250,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2525, + "referencedDeclaration": 885, "type": "uint256", "value": "b" }, - "id": 2533, + "id": 893, "name": "Identifier", - "src": "1845:1:13" + "src": "1959:1:4" }, { "attributes": { @@ -3264,18 +3264,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2523, + "referencedDeclaration": 883, "type": "uint256", "value": "a" }, - "id": 2534, + "id": 894, "name": "Identifier", - "src": "1850:1:13" + "src": "1964:1:4" } ], - "id": 2535, + "id": 895, "name": "BinaryOperation", - "src": "1845:6:13" + "src": "1959:6:4" }, { "attributes": { @@ -3283,28 +3283,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2527, + "referencedDeclaration": 887, "type": "string memory", "value": "errorMessage" }, - "id": 2536, + "id": 896, "name": "Identifier", - "src": "1853:12:13" + "src": "1967:12:4" } ], - "id": 2537, + "id": 897, "name": "FunctionCall", - "src": "1837:29:13" + "src": "1951:29:4" } ], - "id": 2538, + "id": 898, "name": "ExpressionStatement", - "src": "1837:29:13" + "src": "1951:29:4" }, { "attributes": { "assignments": [ - 2540 + 900 ] }, "children": [ @@ -3312,7 +3312,7 @@ "attributes": { "constant": false, "name": "c", - "scope": 2547, + "scope": 907, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3325,14 +3325,14 @@ "name": "uint256", "type": "uint256" }, - "id": 2539, + "id": 899, "name": "ElementaryTypeName", - "src": "1876:7:13" + "src": "1990:7:4" } ], - "id": 2540, + "id": 900, "name": "VariableDeclaration", - "src": "1876:9:13" + "src": "1990:9:4" }, { "attributes": { @@ -3355,13 +3355,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2523, + "referencedDeclaration": 883, "type": "uint256", "value": "a" }, - "id": 2541, + "id": 901, "name": "Identifier", - "src": "1888:1:13" + "src": "2002:1:4" }, { "attributes": { @@ -3369,27 +3369,27 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2525, + "referencedDeclaration": 885, "type": "uint256", "value": "b" }, - "id": 2542, + "id": 902, "name": "Identifier", - "src": "1892:1:13" + "src": "2006:1:4" } ], - "id": 2543, + "id": 903, "name": "BinaryOperation", - "src": "1888:5:13" + "src": "2002:5:4" } ], - "id": 2544, + "id": 904, "name": "VariableDeclarationStatement", - "src": "1876:17:13" + "src": "1990:17:4" }, { "attributes": { - "functionReturnParameters": 2531 + "functionReturnParameters": 891 }, "children": [ { @@ -3398,28 +3398,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2540, + "referencedDeclaration": 900, "type": "uint256", "value": "c" }, - "id": 2545, + "id": 905, "name": "Identifier", - "src": "1911:1:13" + "src": "2025:1:4" } ], - "id": 2546, + "id": 906, "name": "Return", - "src": "1904:8:13" + "src": "2018:8:4" } ], - "id": 2547, + "id": 907, "name": "Block", - "src": "1827:92:13" + "src": "1941:92:4" } ], - "id": 2548, + "id": 908, "name": "FunctionDefinition", - "src": "1732:187:13" + "src": "1846:187:4" }, { "attributes": { @@ -3431,7 +3431,7 @@ null ], "name": "mul", - "scope": 2665, + "scope": 1025, "stateMutability": "pure", "superFunction": null, "visibility": "internal" @@ -3443,7 +3443,7 @@ "attributes": { "constant": false, "name": "a", - "scope": 2582, + "scope": 942, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3456,20 +3456,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2549, + "id": 909, "name": "ElementaryTypeName", - "src": "2172:7:13" + "src": "2286:7:4" } ], - "id": 2550, + "id": 910, "name": "VariableDeclaration", - "src": "2172:9:13" + "src": "2286:9:4" }, { "attributes": { "constant": false, "name": "b", - "scope": 2582, + "scope": 942, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3482,19 +3482,19 @@ "name": "uint256", "type": "uint256" }, - "id": 2551, + "id": 911, "name": "ElementaryTypeName", - "src": "2183:7:13" + "src": "2297:7:4" } ], - "id": 2552, + "id": 912, "name": "VariableDeclaration", - "src": "2183:9:13" + "src": "2297:9:4" } ], - "id": 2553, + "id": 913, "name": "ParameterList", - "src": "2171:22:13" + "src": "2285:22:4" }, { "children": [ @@ -3502,7 +3502,7 @@ "attributes": { "constant": false, "name": "", - "scope": 2582, + "scope": 942, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3515,19 +3515,19 @@ "name": "uint256", "type": "uint256" }, - "id": 2554, + "id": 914, "name": "ElementaryTypeName", - "src": "2217:7:13" + "src": "2331:7:4" } ], - "id": 2555, + "id": 915, "name": "VariableDeclaration", - "src": "2217:7:13" + "src": "2331:7:4" } ], - "id": 2556, + "id": 916, "name": "ParameterList", - "src": "2216:9:13" + "src": "2330:9:4" }, { "children": [ @@ -3557,13 +3557,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2550, + "referencedDeclaration": 910, "type": "uint256", "value": "a" }, - "id": 2557, + "id": 917, "name": "Identifier", - "src": "2458:1:13" + "src": "2572:1:4" }, { "attributes": { @@ -3578,20 +3578,20 @@ "type": "int_const 0", "value": "0" }, - "id": 2558, + "id": 918, "name": "Literal", - "src": "2463:1:13" + "src": "2577:1:4" } ], - "id": 2559, + "id": 919, "name": "BinaryOperation", - "src": "2458:6:13" + "src": "2572:6:4" }, { "children": [ { "attributes": { - "functionReturnParameters": 2556 + "functionReturnParameters": 916 }, "children": [ { @@ -3607,29 +3607,29 @@ "type": "int_const 0", "value": "0" }, - "id": 2560, + "id": 920, "name": "Literal", - "src": "2487:1:13" + "src": "2601:1:4" } ], - "id": 2561, + "id": 921, "name": "Return", - "src": "2480:8:13" + "src": "2594:8:4" } ], - "id": 2562, + "id": 922, "name": "Block", - "src": "2466:33:13" + "src": "2580:33:4" } ], - "id": 2563, + "id": 923, "name": "IfStatement", - "src": "2454:45:13" + "src": "2568:45:4" }, { "attributes": { "assignments": [ - 2565 + 925 ] }, "children": [ @@ -3637,7 +3637,7 @@ "attributes": { "constant": false, "name": "c", - "scope": 2581, + "scope": 941, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3650,14 +3650,14 @@ "name": "uint256", "type": "uint256" }, - "id": 2564, + "id": 924, "name": "ElementaryTypeName", - "src": "2509:7:13" + "src": "2623:7:4" } ], - "id": 2565, + "id": 925, "name": "VariableDeclaration", - "src": "2509:9:13" + "src": "2623:9:4" }, { "attributes": { @@ -3680,13 +3680,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2550, + "referencedDeclaration": 910, "type": "uint256", "value": "a" }, - "id": 2566, + "id": 926, "name": "Identifier", - "src": "2521:1:13" + "src": "2635:1:4" }, { "attributes": { @@ -3694,23 +3694,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2552, + "referencedDeclaration": 912, "type": "uint256", "value": "b" }, - "id": 2567, + "id": 927, "name": "Identifier", - "src": "2525:1:13" + "src": "2639:1:4" } ], - "id": 2568, + "id": 928, "name": "BinaryOperation", - "src": "2521:5:13" + "src": "2635:5:4" } ], - "id": 2569, + "id": 929, "name": "VariableDeclarationStatement", - "src": "2509:17:13" + "src": "2623:17:4" }, { "children": [ @@ -3742,16 +3742,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 2570, + "id": 930, "name": "Identifier", - "src": "2536:7:13" + "src": "2650:7:4" }, { "attributes": { @@ -3789,13 +3789,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2565, + "referencedDeclaration": 925, "type": "uint256", "value": "c" }, - "id": 2571, + "id": 931, "name": "Identifier", - "src": "2544:1:13" + "src": "2658:1:4" }, { "attributes": { @@ -3803,18 +3803,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2550, + "referencedDeclaration": 910, "type": "uint256", "value": "a" }, - "id": 2572, + "id": 932, "name": "Identifier", - "src": "2548:1:13" + "src": "2662:1:4" } ], - "id": 2573, + "id": 933, "name": "BinaryOperation", - "src": "2544:5:13" + "src": "2658:5:4" }, { "attributes": { @@ -3822,18 +3822,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2552, + "referencedDeclaration": 912, "type": "uint256", "value": "b" }, - "id": 2574, + "id": 934, "name": "Identifier", - "src": "2553:1:13" + "src": "2667:1:4" } ], - "id": 2575, + "id": 935, "name": "BinaryOperation", - "src": "2544:10:13" + "src": "2658:10:4" }, { "attributes": { @@ -3848,23 +3848,23 @@ "type": "literal_string \"SafeMath: multiplication overflow\"", "value": "SafeMath: multiplication overflow" }, - "id": 2576, + "id": 936, "name": "Literal", - "src": "2556:35:13" + "src": "2670:35:4" } ], - "id": 2577, + "id": 937, "name": "FunctionCall", - "src": "2536:56:13" + "src": "2650:56:4" } ], - "id": 2578, + "id": 938, "name": "ExpressionStatement", - "src": "2536:56:13" + "src": "2650:56:4" }, { "attributes": { - "functionReturnParameters": 2556 + "functionReturnParameters": 916 }, "children": [ { @@ -3873,28 +3873,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2565, + "referencedDeclaration": 925, "type": "uint256", "value": "c" }, - "id": 2579, + "id": 939, "name": "Identifier", - "src": "2610:1:13" + "src": "2724:1:4" } ], - "id": 2580, + "id": 940, "name": "Return", - "src": "2603:8:13" + "src": "2717:8:4" } ], - "id": 2581, + "id": 941, "name": "Block", - "src": "2226:392:13" + "src": "2340:392:4" } ], - "id": 2582, + "id": 942, "name": "FunctionDefinition", - "src": "2159:459:13" + "src": "2273:459:4" }, { "attributes": { @@ -3906,7 +3906,7 @@ null ], "name": "div", - "scope": 2665, + "scope": 1025, "stateMutability": "pure", "superFunction": null, "visibility": "internal" @@ -3918,7 +3918,7 @@ "attributes": { "constant": false, "name": "a", - "scope": 2598, + "scope": 958, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3931,20 +3931,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2583, + "id": 943, "name": "ElementaryTypeName", - "src": "3086:7:13" + "src": "3200:7:4" } ], - "id": 2584, + "id": 944, "name": "VariableDeclaration", - "src": "3086:9:13" + "src": "3200:9:4" }, { "attributes": { "constant": false, "name": "b", - "scope": 2598, + "scope": 958, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3957,19 +3957,19 @@ "name": "uint256", "type": "uint256" }, - "id": 2585, + "id": 945, "name": "ElementaryTypeName", - "src": "3097:7:13" + "src": "3211:7:4" } ], - "id": 2586, + "id": 946, "name": "VariableDeclaration", - "src": "3097:9:13" + "src": "3211:9:4" } ], - "id": 2587, + "id": 947, "name": "ParameterList", - "src": "3085:22:13" + "src": "3199:22:4" }, { "children": [ @@ -3977,7 +3977,7 @@ "attributes": { "constant": false, "name": "", - "scope": 2598, + "scope": 958, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3990,25 +3990,25 @@ "name": "uint256", "type": "uint256" }, - "id": 2588, + "id": 948, "name": "ElementaryTypeName", - "src": "3131:7:13" + "src": "3245:7:4" } ], - "id": 2589, + "id": 949, "name": "VariableDeclaration", - "src": "3131:7:13" + "src": "3245:7:4" } ], - "id": 2590, + "id": 950, "name": "ParameterList", - "src": "3130:9:13" + "src": "3244:9:4" }, { "children": [ { "attributes": { - "functionReturnParameters": 2590 + "functionReturnParameters": 950 }, "children": [ { @@ -4043,16 +4043,16 @@ } ], "overloadedDeclarations": [ - 2598, - 2625 + 958, + 985 ], - "referencedDeclaration": 2625, + "referencedDeclaration": 985, "type": "function (uint256,uint256,string memory) pure returns (uint256)", "value": "div" }, - "id": 2591, + "id": 951, "name": "Identifier", - "src": "3157:3:13" + "src": "3271:3:4" }, { "attributes": { @@ -4060,13 +4060,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2584, + "referencedDeclaration": 944, "type": "uint256", "value": "a" }, - "id": 2592, + "id": 952, "name": "Identifier", - "src": "3161:1:13" + "src": "3275:1:4" }, { "attributes": { @@ -4074,13 +4074,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2586, + "referencedDeclaration": 946, "type": "uint256", "value": "b" }, - "id": 2593, + "id": 953, "name": "Identifier", - "src": "3164:1:13" + "src": "3278:1:4" }, { "attributes": { @@ -4095,29 +4095,29 @@ "type": "literal_string \"SafeMath: division by zero\"", "value": "SafeMath: division by zero" }, - "id": 2594, + "id": 954, "name": "Literal", - "src": "3167:28:13" + "src": "3281:28:4" } ], - "id": 2595, + "id": 955, "name": "FunctionCall", - "src": "3157:39:13" + "src": "3271:39:4" } ], - "id": 2596, + "id": 956, "name": "Return", - "src": "3150:46:13" + "src": "3264:46:4" } ], - "id": 2597, + "id": 957, "name": "Block", - "src": "3140:63:13" + "src": "3254:63:4" } ], - "id": 2598, + "id": 958, "name": "FunctionDefinition", - "src": "3073:130:13" + "src": "3187:130:4" }, { "attributes": { @@ -4129,7 +4129,7 @@ null ], "name": "div", - "scope": 2665, + "scope": 1025, "stateMutability": "pure", "superFunction": null, "visibility": "internal" @@ -4141,7 +4141,7 @@ "attributes": { "constant": false, "name": "a", - "scope": 2625, + "scope": 985, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4154,20 +4154,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2599, + "id": 959, "name": "ElementaryTypeName", - "src": "3731:7:13" + "src": "3845:7:4" } ], - "id": 2600, + "id": 960, "name": "VariableDeclaration", - "src": "3731:9:13" + "src": "3845:9:4" }, { "attributes": { "constant": false, "name": "b", - "scope": 2625, + "scope": 985, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4180,20 +4180,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2601, + "id": 961, "name": "ElementaryTypeName", - "src": "3742:7:13" + "src": "3856:7:4" } ], - "id": 2602, + "id": 962, "name": "VariableDeclaration", - "src": "3742:9:13" + "src": "3856:9:4" }, { "attributes": { "constant": false, "name": "errorMessage", - "scope": 2625, + "scope": 985, "stateVariable": false, "storageLocation": "memory", "type": "string", @@ -4206,19 +4206,19 @@ "name": "string", "type": "string" }, - "id": 2603, + "id": 963, "name": "ElementaryTypeName", - "src": "3753:6:13" + "src": "3867:6:4" } ], - "id": 2604, + "id": 964, "name": "VariableDeclaration", - "src": "3753:26:13" + "src": "3867:26:4" } ], - "id": 2605, + "id": 965, "name": "ParameterList", - "src": "3730:50:13" + "src": "3844:50:4" }, { "children": [ @@ -4226,7 +4226,7 @@ "attributes": { "constant": false, "name": "", - "scope": 2625, + "scope": 985, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4239,19 +4239,19 @@ "name": "uint256", "type": "uint256" }, - "id": 2606, + "id": 966, "name": "ElementaryTypeName", - "src": "3804:7:13" + "src": "3918:7:4" } ], - "id": 2607, + "id": 967, "name": "VariableDeclaration", - "src": "3804:7:13" + "src": "3918:7:4" } ], - "id": 2608, + "id": 968, "name": "ParameterList", - "src": "3803:9:13" + "src": "3917:9:4" }, { "children": [ @@ -4285,16 +4285,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 2609, + "id": 969, "name": "Identifier", - "src": "3889:7:13" + "src": "4003:7:4" }, { "attributes": { @@ -4317,13 +4317,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2602, + "referencedDeclaration": 962, "type": "uint256", "value": "b" }, - "id": 2610, + "id": 970, "name": "Identifier", - "src": "3897:1:13" + "src": "4011:1:4" }, { "attributes": { @@ -4338,14 +4338,14 @@ "type": "int_const 0", "value": "0" }, - "id": 2611, + "id": 971, "name": "Literal", - "src": "3901:1:13" + "src": "4015:1:4" } ], - "id": 2612, + "id": 972, "name": "BinaryOperation", - "src": "3897:5:13" + "src": "4011:5:4" }, { "attributes": { @@ -4353,28 +4353,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2604, + "referencedDeclaration": 964, "type": "string memory", "value": "errorMessage" }, - "id": 2613, + "id": 973, "name": "Identifier", - "src": "3904:12:13" + "src": "4018:12:4" } ], - "id": 2614, + "id": 974, "name": "FunctionCall", - "src": "3889:28:13" + "src": "4003:28:4" } ], - "id": 2615, + "id": 975, "name": "ExpressionStatement", - "src": "3889:28:13" + "src": "4003:28:4" }, { "attributes": { "assignments": [ - 2617 + 977 ] }, "children": [ @@ -4382,7 +4382,7 @@ "attributes": { "constant": false, "name": "c", - "scope": 2624, + "scope": 984, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4395,14 +4395,14 @@ "name": "uint256", "type": "uint256" }, - "id": 2616, + "id": 976, "name": "ElementaryTypeName", - "src": "3927:7:13" + "src": "4041:7:4" } ], - "id": 2617, + "id": 977, "name": "VariableDeclaration", - "src": "3927:9:13" + "src": "4041:9:4" }, { "attributes": { @@ -4425,13 +4425,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2600, + "referencedDeclaration": 960, "type": "uint256", "value": "a" }, - "id": 2618, + "id": 978, "name": "Identifier", - "src": "3939:1:13" + "src": "4053:1:4" }, { "attributes": { @@ -4439,27 +4439,27 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2602, + "referencedDeclaration": 962, "type": "uint256", "value": "b" }, - "id": 2619, + "id": 979, "name": "Identifier", - "src": "3943:1:13" + "src": "4057:1:4" } ], - "id": 2620, + "id": 980, "name": "BinaryOperation", - "src": "3939:5:13" + "src": "4053:5:4" } ], - "id": 2621, + "id": 981, "name": "VariableDeclarationStatement", - "src": "3927:17:13" + "src": "4041:17:4" }, { "attributes": { - "functionReturnParameters": 2608 + "functionReturnParameters": 968 }, "children": [ { @@ -4468,28 +4468,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2617, + "referencedDeclaration": 977, "type": "uint256", "value": "c" }, - "id": 2622, + "id": 982, "name": "Identifier", - "src": "4048:1:13" + "src": "4162:1:4" } ], - "id": 2623, + "id": 983, "name": "Return", - "src": "4041:8:13" + "src": "4155:8:4" } ], - "id": 2624, + "id": 984, "name": "Block", - "src": "3813:243:13" + "src": "3927:243:4" } ], - "id": 2625, + "id": 985, "name": "FunctionDefinition", - "src": "3718:338:13" + "src": "3832:338:4" }, { "attributes": { @@ -4501,7 +4501,7 @@ null ], "name": "mod", - "scope": 2665, + "scope": 1025, "stateMutability": "pure", "superFunction": null, "visibility": "internal" @@ -4513,7 +4513,7 @@ "attributes": { "constant": false, "name": "a", - "scope": 2641, + "scope": 1001, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4526,20 +4526,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2626, + "id": 986, "name": "ElementaryTypeName", - "src": "4513:7:13" + "src": "4627:7:4" } ], - "id": 2627, + "id": 987, "name": "VariableDeclaration", - "src": "4513:9:13" + "src": "4627:9:4" }, { "attributes": { "constant": false, "name": "b", - "scope": 2641, + "scope": 1001, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4552,19 +4552,19 @@ "name": "uint256", "type": "uint256" }, - "id": 2628, + "id": 988, "name": "ElementaryTypeName", - "src": "4524:7:13" + "src": "4638:7:4" } ], - "id": 2629, + "id": 989, "name": "VariableDeclaration", - "src": "4524:9:13" + "src": "4638:9:4" } ], - "id": 2630, + "id": 990, "name": "ParameterList", - "src": "4512:22:13" + "src": "4626:22:4" }, { "children": [ @@ -4572,7 +4572,7 @@ "attributes": { "constant": false, "name": "", - "scope": 2641, + "scope": 1001, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4585,25 +4585,25 @@ "name": "uint256", "type": "uint256" }, - "id": 2631, + "id": 991, "name": "ElementaryTypeName", - "src": "4558:7:13" + "src": "4672:7:4" } ], - "id": 2632, + "id": 992, "name": "VariableDeclaration", - "src": "4558:7:13" + "src": "4672:7:4" } ], - "id": 2633, + "id": 993, "name": "ParameterList", - "src": "4557:9:13" + "src": "4671:9:4" }, { "children": [ { "attributes": { - "functionReturnParameters": 2633 + "functionReturnParameters": 993 }, "children": [ { @@ -4638,16 +4638,16 @@ } ], "overloadedDeclarations": [ - 2641, - 2664 + 1001, + 1024 ], - "referencedDeclaration": 2664, + "referencedDeclaration": 1024, "type": "function (uint256,uint256,string memory) pure returns (uint256)", "value": "mod" }, - "id": 2634, + "id": 994, "name": "Identifier", - "src": "4584:3:13" + "src": "4698:3:4" }, { "attributes": { @@ -4655,13 +4655,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2627, + "referencedDeclaration": 987, "type": "uint256", "value": "a" }, - "id": 2635, + "id": 995, "name": "Identifier", - "src": "4588:1:13" + "src": "4702:1:4" }, { "attributes": { @@ -4669,13 +4669,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2629, + "referencedDeclaration": 989, "type": "uint256", "value": "b" }, - "id": 2636, + "id": 996, "name": "Identifier", - "src": "4591:1:13" + "src": "4705:1:4" }, { "attributes": { @@ -4690,29 +4690,29 @@ "type": "literal_string \"SafeMath: modulo by zero\"", "value": "SafeMath: modulo by zero" }, - "id": 2637, + "id": 997, "name": "Literal", - "src": "4594:26:13" + "src": "4708:26:4" } ], - "id": 2638, + "id": 998, "name": "FunctionCall", - "src": "4584:37:13" + "src": "4698:37:4" } ], - "id": 2639, + "id": 999, "name": "Return", - "src": "4577:44:13" + "src": "4691:44:4" } ], - "id": 2640, + "id": 1000, "name": "Block", - "src": "4567:61:13" + "src": "4681:61:4" } ], - "id": 2641, + "id": 1001, "name": "FunctionDefinition", - "src": "4500:128:13" + "src": "4614:128:4" }, { "attributes": { @@ -4724,7 +4724,7 @@ null ], "name": "mod", - "scope": 2665, + "scope": 1025, "stateMutability": "pure", "superFunction": null, "visibility": "internal" @@ -4736,7 +4736,7 @@ "attributes": { "constant": false, "name": "a", - "scope": 2664, + "scope": 1024, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4749,20 +4749,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2642, + "id": 1002, "name": "ElementaryTypeName", - "src": "5145:7:13" + "src": "5259:7:4" } ], - "id": 2643, + "id": 1003, "name": "VariableDeclaration", - "src": "5145:9:13" + "src": "5259:9:4" }, { "attributes": { "constant": false, "name": "b", - "scope": 2664, + "scope": 1024, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4775,20 +4775,20 @@ "name": "uint256", "type": "uint256" }, - "id": 2644, + "id": 1004, "name": "ElementaryTypeName", - "src": "5156:7:13" + "src": "5270:7:4" } ], - "id": 2645, + "id": 1005, "name": "VariableDeclaration", - "src": "5156:9:13" + "src": "5270:9:4" }, { "attributes": { "constant": false, "name": "errorMessage", - "scope": 2664, + "scope": 1024, "stateVariable": false, "storageLocation": "memory", "type": "string", @@ -4801,19 +4801,19 @@ "name": "string", "type": "string" }, - "id": 2646, + "id": 1006, "name": "ElementaryTypeName", - "src": "5167:6:13" + "src": "5281:6:4" } ], - "id": 2647, + "id": 1007, "name": "VariableDeclaration", - "src": "5167:26:13" + "src": "5281:26:4" } ], - "id": 2648, + "id": 1008, "name": "ParameterList", - "src": "5144:50:13" + "src": "5258:50:4" }, { "children": [ @@ -4821,7 +4821,7 @@ "attributes": { "constant": false, "name": "", - "scope": 2664, + "scope": 1024, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4834,19 +4834,19 @@ "name": "uint256", "type": "uint256" }, - "id": 2649, + "id": 1009, "name": "ElementaryTypeName", - "src": "5218:7:13" + "src": "5332:7:4" } ], - "id": 2650, + "id": 1010, "name": "VariableDeclaration", - "src": "5218:7:13" + "src": "5332:7:4" } ], - "id": 2651, + "id": 1011, "name": "ParameterList", - "src": "5217:9:13" + "src": "5331:9:4" }, { "children": [ @@ -4880,16 +4880,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 2652, + "id": 1012, "name": "Identifier", - "src": "5237:7:13" + "src": "5351:7:4" }, { "attributes": { @@ -4912,13 +4912,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2645, + "referencedDeclaration": 1005, "type": "uint256", "value": "b" }, - "id": 2653, + "id": 1013, "name": "Identifier", - "src": "5245:1:13" + "src": "5359:1:4" }, { "attributes": { @@ -4933,14 +4933,14 @@ "type": "int_const 0", "value": "0" }, - "id": 2654, + "id": 1014, "name": "Literal", - "src": "5250:1:13" + "src": "5364:1:4" } ], - "id": 2655, + "id": 1015, "name": "BinaryOperation", - "src": "5245:6:13" + "src": "5359:6:4" }, { "attributes": { @@ -4948,27 +4948,27 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2647, + "referencedDeclaration": 1007, "type": "string memory", "value": "errorMessage" }, - "id": 2656, + "id": 1016, "name": "Identifier", - "src": "5253:12:13" + "src": "5367:12:4" } ], - "id": 2657, + "id": 1017, "name": "FunctionCall", - "src": "5237:29:13" + "src": "5351:29:4" } ], - "id": 2658, + "id": 1018, "name": "ExpressionStatement", - "src": "5237:29:13" + "src": "5351:29:4" }, { "attributes": { - "functionReturnParameters": 2651 + "functionReturnParameters": 1011 }, "children": [ { @@ -4992,13 +4992,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2643, + "referencedDeclaration": 1003, "type": "uint256", "value": "a" }, - "id": 2659, + "id": 1019, "name": "Identifier", - "src": "5283:1:13" + "src": "5397:1:4" }, { "attributes": { @@ -5006,43 +5006,43 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 2645, + "referencedDeclaration": 1005, "type": "uint256", "value": "b" }, - "id": 2660, + "id": 1020, "name": "Identifier", - "src": "5287:1:13" + "src": "5401:1:4" } ], - "id": 2661, + "id": 1021, "name": "BinaryOperation", - "src": "5283:5:13" + "src": "5397:5:4" } ], - "id": 2662, + "id": 1022, "name": "Return", - "src": "5276:12:13" + "src": "5390:12:4" } ], - "id": 2663, + "id": 1023, "name": "Block", - "src": "5227:68:13" + "src": "5341:68:4" } ], - "id": 2664, + "id": 1024, "name": "FunctionDefinition", - "src": "5132:163:13" + "src": "5246:163:4" } ], - "id": 2665, + "id": 1025, "name": "ContractDefinition", - "src": "589:4708:13" + "src": "703:4708:4" } ], - "id": 2666, + "id": 1026, "name": "SourceUnit", - "src": "0:5298:13" + "src": "0:5412:4" }, "compiler": { "name": "solc", @@ -5050,7 +5050,7 @@ }, "networks": {}, "schemaVersion": "3.3.4", - "updatedAt": "2021-04-04T20:21:29.911Z", + "updatedAt": "2021-04-12T00:15:10.056Z", "devdoc": { "details": "Wrappers over Solidity's arithmetic operations with added overflow checks. * Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. * Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.", "methods": {} diff --git a/client/contracts/Tornado.json b/client/contracts/Tornado.json index 783b006..b90d77a 100644 --- a/client/contracts/Tornado.json +++ b/client/contracts/Tornado.json @@ -539,58 +539,58 @@ "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"contract IFeeManager\",\"name\":\"_feeManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_denomination\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_merkleTreeHeight\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"leafIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"nullifierHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"FIELD_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ROOT_HISTORY_SIZE\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ZERO_VALUE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOperator\",\"type\":\"address\"}],\"name\":\"changeOperator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"commitments\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentRootIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"denomination\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_commitment\",\"type\":\"bytes32\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeManager\",\"outputs\":[{\"internalType\":\"contract IFeeManager\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"filledSubtrees\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLastRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_left\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_right\",\"type\":\"bytes32\"}],\"name\":\"hashLeftRight\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"}],\"name\":\"isKnownRoot\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"}],\"name\":\"isSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_nullifierHashes\",\"type\":\"bytes32[]\"}],\"name\":\"isSpentArray\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"spent\",\"type\":\"bool[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"levels\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nullifierHashes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"roots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_refund\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"zeros\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"changeOperator(address)\":{\"details\":\"operator can change his address \"},\"constructor\":{\"details\":\"The constructor\",\"params\":{\"_denomination\":\"transfer amount for each deposit\",\"_merkleTreeHeight\":\"the height of deposits' Merkle Tree\",\"_operator\":\"operator address (see operator comment above)\",\"_verifier\":\"the address of SNARK verifier for this contract\"}},\"deposit(bytes32)\":{\"details\":\"Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\",\"params\":{\"_commitment\":\"the note commitment, which is PedersenHash(nullifier + secret)\"}},\"getLastRoot()\":{\"details\":\"Returns the last root\"},\"hashLeftRight(bytes32,bytes32)\":{\"details\":\"Hash 2 tree leaves, returns MiMC(_left, _right)\"},\"isKnownRoot(bytes32)\":{\"details\":\"Whether the root is present in the root history\"},\"isSpent(bytes32)\":{\"details\":\"whether a note is already spent \"},\"isSpentArray(bytes32[])\":{\"details\":\"whether an array of notes is already spent \"},\"updateVerifier(address)\":{\"details\":\"allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address\"},\"withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)\":{\"details\":\"Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":\"Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0xe7db8acb3efcecf95c7364f447ed1764c571dbf5090fd4641fe4668a965332eb\",\"urls\":[\"bzz-raw://45e790c247c38ed8ae473e3165c1148ea10a753cf6e9f9c8742394019be2aef6\",\"dweb:/ipfs/QmaGfk1ndvqur2NvCY3TWoKuorfBVShXeykKei18GDY582\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"contract IFeeManager\",\"name\":\"_feeManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_denomination\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_merkleTreeHeight\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"leafIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"nullifierHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"FIELD_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ROOT_HISTORY_SIZE\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ZERO_VALUE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOperator\",\"type\":\"address\"}],\"name\":\"changeOperator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"commitments\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentRootIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"denomination\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_commitment\",\"type\":\"bytes32\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeManager\",\"outputs\":[{\"internalType\":\"contract IFeeManager\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"filledSubtrees\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLastRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_left\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_right\",\"type\":\"bytes32\"}],\"name\":\"hashLeftRight\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"}],\"name\":\"isKnownRoot\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"}],\"name\":\"isSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_nullifierHashes\",\"type\":\"bytes32[]\"}],\"name\":\"isSpentArray\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"spent\",\"type\":\"bool[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"levels\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nullifierHashes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"roots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_root\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_nullifierHash\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_relayer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_refund\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"zeros\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"changeOperator(address)\":{\"details\":\"operator can change his address \"},\"constructor\":{\"details\":\"The constructor\",\"params\":{\"_denomination\":\"transfer amount for each deposit\",\"_merkleTreeHeight\":\"the height of deposits' Merkle Tree\",\"_operator\":\"operator address (see operator comment above)\",\"_verifier\":\"the address of SNARK verifier for this contract\"}},\"deposit(bytes32)\":{\"details\":\"Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\",\"params\":{\"_commitment\":\"the note commitment, which is PedersenHash(nullifier + secret)\"}},\"getLastRoot()\":{\"details\":\"Returns the last root\"},\"hashLeftRight(bytes32,bytes32)\":{\"details\":\"Hash 2 tree leaves, returns MiMC(_left, _right)\"},\"isKnownRoot(bytes32)\":{\"details\":\"Whether the root is present in the root history\"},\"isSpent(bytes32)\":{\"details\":\"whether a note is already spent \"},\"isSpentArray(bytes32[])\":{\"details\":\"whether an array of notes is already spent \"},\"updateVerifier(address)\":{\"details\":\"allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address\"},\"withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)\":{\"details\":\"Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":\"Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/home/home/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x7269c9361452a555e6f29e924e70d4478a8a5bd86c7b33ea3731470a52c235b5\",\"urls\":[\"bzz-raw://eddd542888565cb84d4dac710511b0f02afbed2e0e1a7d25e0425e6d69b7712f\",\"dweb:/ipfs/Qma1KWoX8nZYK1d1PAfRiZH4prYqM347dMkWM6DjJzTqYY\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", - "source": "pragma solidity 0.5.17;\n\nimport \"./MerkleTreeWithHistory.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\ncontract IVerifier {\n function verifyProof(bytes memory _proof, uint256[6] memory _input) public returns(bool);\n}\n\ncontract IFeeManager {\n function feeTo() external view returns (address);\n}\n\ncontract Tornado is MerkleTreeWithHistory, ReentrancyGuard {\n uint256 public denomination;\n mapping(bytes32 => bool) public nullifierHashes;\n // we store all commitments just to prevent accidental deposits with the same commitment\n mapping(bytes32 => bool) public commitments;\n IVerifier public verifier;\n IFeeManager public feeManager;\n\n // operator can update snark verification key\n // after the final trusted setup ceremony operator rights are supposed to be transferred to zero address\n address public operator;\n modifier onlyOperator {\n require(msg.sender == operator, \"Only operator can call this function.\");\n _;\n }\n\n event Deposit(bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp);\n event Withdrawal(address to, bytes32 nullifierHash, address indexed relayer, uint256 fee);\n\n /**\n @dev The constructor\n @param _verifier the address of SNARK verifier for this contract\n @param _denomination transfer amount for each deposit\n @param _merkleTreeHeight the height of deposits' Merkle Tree\n @param _operator operator address (see operator comment above)\n */\n constructor(\n IVerifier _verifier,\n IFeeManager _feeManager,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator\n ) MerkleTreeWithHistory(_merkleTreeHeight) public {\n require(_denomination > 0, \"denomination should be greater than 0\");\n verifier = _verifier;\n feeManager = _feeManager;\n operator = _operator;\n denomination = _denomination;\n }\n\n /**\n @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\n @param _commitment the note commitment, which is PedersenHash(nullifier + secret)\n */\n function deposit(bytes32 _commitment) external payable nonReentrant {\n require(!commitments[_commitment], \"The commitment has been submitted\");\n\n uint32 insertedIndex = _insert(_commitment);\n commitments[_commitment] = true;\n _processDeposit();\n\n emit Deposit(_commitment, insertedIndex, block.timestamp);\n }\n\n /** @dev this function is defined in a child contract */\n function _processDeposit() internal;\n\n /**\n @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs\n `input` array consists of:\n - merkle root of all deposits in the contract\n - hash of unique deposit nullifier to prevent double spends\n - the recipient of funds\n - optional fee that goes to the transaction sender (usually a relay)\n */\n function withdraw(bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund) external payable nonReentrant {\n require(_fee <= denomination, \"Fee exceeds transfer value\");\n require(!nullifierHashes[_nullifierHash], \"The note has been already spent\");\n require(isKnownRoot(_root), \"Cannot find your merkle root\"); // Make sure to use a recent one\n require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(_recipient), uint256(_relayer), _fee, _refund]), \"Invalid withdraw proof\");\n\n nullifierHashes[_nullifierHash] = true;\n _processWithdraw(_recipient, _relayer, _fee, _refund, feeManager.feeTo());\n emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee);\n }\n\n /** @dev this function is defined in a child contract */\n function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund, address _feeTo) internal;\n\n /** @dev whether a note is already spent */\n function isSpent(bytes32 _nullifierHash) public view returns(bool) {\n return nullifierHashes[_nullifierHash];\n }\n\n /** @dev whether an array of notes is already spent */\n function isSpentArray(bytes32[] calldata _nullifierHashes) external view returns(bool[] memory spent) {\n spent = new bool[](_nullifierHashes.length);\n for(uint i = 0; i < _nullifierHashes.length; i++) {\n if (isSpent(_nullifierHashes[i])) {\n spent[i] = true;\n }\n }\n }\n\n /**\n @dev allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held.\n After that operator rights are supposed to be transferred to zero address\n */\n function updateVerifier(address _newVerifier) external onlyOperator {\n verifier = IVerifier(_newVerifier);\n }\n\n /** @dev operator can change his address */\n function changeOperator(address _newOperator) external onlyOperator {\n operator = _newOperator;\n }\n}\n", + "source": "pragma solidity 0.5.17;\n\nimport \"./MerkleTreeWithHistory.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\ncontract IVerifier {\n function verifyProof(bytes memory _proof, uint256[6] memory _input) public returns(bool);\n}\n\ncontract IFeeManager {\n function feeTo() external view returns (address);\n function protocolFeeDivisor() external view returns (uint256);\n}\n\ncontract Tornado is MerkleTreeWithHistory, ReentrancyGuard {\n uint256 public denomination;\n mapping(bytes32 => bool) public nullifierHashes;\n // we store all commitments just to prevent accidental deposits with the same commitment\n mapping(bytes32 => bool) public commitments;\n IVerifier public verifier;\n IFeeManager public feeManager;\n\n // operator can update snark verification key\n // after the final trusted setup ceremony operator rights are supposed to be transferred to zero address\n address public operator;\n modifier onlyOperator {\n require(msg.sender == operator, \"Only operator can call this function.\");\n _;\n }\n\n event Deposit(bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp);\n event Withdrawal(address to, bytes32 nullifierHash, address indexed relayer, uint256 fee);\n\n /**\n @dev The constructor\n @param _verifier the address of SNARK verifier for this contract\n @param _denomination transfer amount for each deposit\n @param _merkleTreeHeight the height of deposits' Merkle Tree\n @param _operator operator address (see operator comment above)\n */\n constructor(\n IVerifier _verifier,\n IFeeManager _feeManager,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator\n ) MerkleTreeWithHistory(_merkleTreeHeight) public {\n require(_denomination > 0, \"denomination should be greater than 0\");\n verifier = _verifier;\n feeManager = _feeManager;\n operator = _operator;\n denomination = _denomination;\n }\n\n /**\n @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\n @param _commitment the note commitment, which is PedersenHash(nullifier + secret)\n */\n function deposit(bytes32 _commitment) external payable nonReentrant {\n require(!commitments[_commitment], \"The commitment has been submitted\");\n\n uint32 insertedIndex = _insert(_commitment);\n commitments[_commitment] = true;\n _processDeposit();\n\n emit Deposit(_commitment, insertedIndex, block.timestamp);\n }\n\n /** @dev this function is defined in a child contract */\n function _processDeposit() internal;\n\n /**\n @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs\n `input` array consists of:\n - merkle root of all deposits in the contract\n - hash of unique deposit nullifier to prevent double spends\n - the recipient of funds\n - optional fee that goes to the transaction sender (usually a relay)\n */\n function withdraw(bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund) external payable nonReentrant {\n require(_fee <= denomination, \"Fee exceeds transfer value\");\n require(!nullifierHashes[_nullifierHash], \"The note has been already spent\");\n require(isKnownRoot(_root), \"Cannot find your merkle root\"); // Make sure to use a recent one\n require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(_recipient), uint256(_relayer), _fee, _refund]), \"Invalid withdraw proof\");\n\n nullifierHashes[_nullifierHash] = true;\n _processWithdraw(_recipient, _relayer, _fee, _refund);\n emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee);\n }\n\n /** @dev this function is defined in a child contract */\n function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund) internal;\n\n /** @dev whether a note is already spent */\n function isSpent(bytes32 _nullifierHash) public view returns(bool) {\n return nullifierHashes[_nullifierHash];\n }\n\n /** @dev whether an array of notes is already spent */\n function isSpentArray(bytes32[] calldata _nullifierHashes) external view returns(bool[] memory spent) {\n spent = new bool[](_nullifierHashes.length);\n for(uint i = 0; i < _nullifierHashes.length; i++) {\n if (isSpent(_nullifierHashes[i])) {\n spent[i] = true;\n }\n }\n }\n\n /**\n @dev allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held.\n After that operator rights are supposed to be transferred to zero address\n */\n function updateVerifier(address _newVerifier) external onlyOperator {\n verifier = IVerifier(_newVerifier);\n }\n\n /** @dev operator can change his address */\n function changeOperator(address _newOperator) external onlyOperator {\n operator = _newOperator;\n }\n}\n", "sourcePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "ast": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "exportedSymbols": { "IFeeManager": [ - 888 + 1052 ], "IVerifier": [ - 882 + 1041 ], "Tornado": [ - 1204 + 1363 ] }, - "id": 1205, + "id": 1364, "nodeType": "SourceUnit", "nodes": [ { - "id": 868, + "id": 1027, "literals": [ "solidity", "0.5", ".17" ], "nodeType": "PragmaDirective", - "src": "0:23:8" + "src": "0:23:5" }, { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol", "file": "./MerkleTreeWithHistory.sol", - "id": 869, + "id": 1028, "nodeType": "ImportDirective", - "scope": 1205, - "sourceUnit": 686, - "src": "25:37:8", + "scope": 1364, + "sourceUnit": 839, + "src": "25:37:5", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "id": 870, + "id": 1029, "nodeType": "ImportDirective", - "scope": 1205, - "sourceUnit": 3256, - "src": "63:59:8", + "scope": 1364, + "sourceUnit": 1394, + "src": "63:59:5", "symbolAliases": [], "unitAlias": "" }, @@ -600,9 +600,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": false, - "id": 882, + "id": 1041, "linearizedBaseContracts": [ - 882 + 1041 ], "name": "IVerifier", "nodeType": "ContractDefinition", @@ -610,23 +610,23 @@ { "body": null, "documentation": null, - "id": 881, + "id": 1040, "implemented": false, "kind": "function", "modifiers": [], "name": "verifyProof", "nodeType": "FunctionDefinition", "parameters": { - "id": 877, + "id": 1036, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 872, + "id": 1031, "name": "_proof", "nodeType": "VariableDeclaration", - "scope": 881, - "src": "168:19:8", + "scope": 1040, + "src": "168:19:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -634,10 +634,10 @@ "typeString": "bytes" }, "typeName": { - "id": 871, + "id": 1030, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "168:5:8", + "src": "168:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -648,11 +648,11 @@ }, { "constant": false, - "id": 876, + "id": 1035, "name": "_input", "nodeType": "VariableDeclaration", - "scope": 881, - "src": "189:24:8", + "scope": 1040, + "src": "189:24:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -661,27 +661,27 @@ }, "typeName": { "baseType": { - "id": 873, + "id": 1032, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "189:7:8", + "src": "189:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 875, + "id": 1034, "length": { "argumentTypes": null, "hexValue": "36", - "id": 874, + "id": 1033, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "197:1:8", + "src": "197:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_6_by_1", @@ -690,7 +690,7 @@ "value": "6" }, "nodeType": "ArrayTypeName", - "src": "189:10:8", + "src": "189:10:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$6_storage_ptr", "typeString": "uint256[6]" @@ -700,19 +700,19 @@ "visibility": "internal" } ], - "src": "167:47:8" + "src": "167:47:5" }, "returnParameters": { - "id": 880, + "id": 1039, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 879, + "id": 1038, "name": "", "nodeType": "VariableDeclaration", - "scope": 881, - "src": "230:4:8", + "scope": 1040, + "src": "230:4:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -720,10 +720,10 @@ "typeString": "bool" }, "typeName": { - "id": 878, + "id": 1037, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "230:4:8", + "src": "230:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -733,17 +733,17 @@ "visibility": "internal" } ], - "src": "229:6:8" + "src": "229:6:5" }, - "scope": 882, - "src": "147:89:8", + "scope": 1041, + "src": "147:89:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 1205, - "src": "124:114:8" + "scope": 1364, + "src": "124:114:5" }, { "baseContracts": [], @@ -751,9 +751,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": false, - "id": 888, + "id": 1052, "linearizedBaseContracts": [ - 888 + 1052 ], "name": "IFeeManager", "nodeType": "ContractDefinition", @@ -761,29 +761,29 @@ { "body": null, "documentation": null, - "id": 887, + "id": 1046, "implemented": false, "kind": "function", "modifiers": [], "name": "feeTo", "nodeType": "FunctionDefinition", "parameters": { - "id": 883, + "id": 1042, "nodeType": "ParameterList", "parameters": [], - "src": "279:2:8" + "src": "279:2:5" }, "returnParameters": { - "id": 886, + "id": 1045, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 885, + "id": 1044, "name": "", "nodeType": "VariableDeclaration", - "scope": 887, - "src": "305:7:8", + "scope": 1046, + "src": "305:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -791,10 +791,10 @@ "typeString": "address" }, "typeName": { - "id": 884, + "id": 1043, "name": "address", "nodeType": "ElementaryTypeName", - "src": "305:7:8", + "src": "305:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -805,17 +805,71 @@ "visibility": "internal" } ], - "src": "304:9:8" + "src": "304:9:5" }, - "scope": 888, - "src": "265:49:8", + "scope": 1052, + "src": "265:49:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1051, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "protocolFeeDivisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1047, + "nodeType": "ParameterList", + "parameters": [], + "src": "344:2:5" + }, + "returnParameters": { + "id": 1050, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1049, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "370:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1048, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "370:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "369:9:5" + }, + "scope": 1052, + "src": "317:62:5", "stateMutability": "view", "superFunction": null, "visibility": "external" } ], - "scope": 1205, - "src": "240:76:8" + "scope": 1364, + "src": "240:141:5" }, { "baseContracts": [ @@ -823,62 +877,62 @@ "arguments": null, "baseName": { "contractScope": null, - "id": 889, + "id": 1053, "name": "MerkleTreeWithHistory", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 685, - "src": "338:21:8", + "referencedDeclaration": 838, + "src": "403:21:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_MerkleTreeWithHistory_$685", + "typeIdentifier": "t_contract$_MerkleTreeWithHistory_$838", "typeString": "contract MerkleTreeWithHistory" } }, - "id": 890, + "id": 1054, "nodeType": "InheritanceSpecifier", - "src": "338:21:8" + "src": "403:21:5" }, { "arguments": null, "baseName": { "contractScope": null, - "id": 891, + "id": 1055, "name": "ReentrancyGuard", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3255, - "src": "361:15:8", + "referencedDeclaration": 1393, + "src": "426:15:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_ReentrancyGuard_$3255", + "typeIdentifier": "t_contract$_ReentrancyGuard_$1393", "typeString": "contract ReentrancyGuard" } }, - "id": 892, + "id": 1056, "nodeType": "InheritanceSpecifier", - "src": "361:15:8" + "src": "426:15:5" } ], "contractDependencies": [ - 685, - 3255 + 838, + 1393 ], "contractKind": "contract", "documentation": null, "fullyImplemented": false, - "id": 1204, + "id": 1363, "linearizedBaseContracts": [ - 1204, - 3255, - 685 + 1363, + 1393, + 838 ], "name": "Tornado", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 894, + "id": 1058, "name": "denomination", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "381:27:8", + "scope": 1363, + "src": "446:27:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -886,10 +940,10 @@ "typeString": "uint256" }, "typeName": { - "id": 893, + "id": 1057, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "381:7:8", + "src": "446:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -900,11 +954,11 @@ }, { "constant": false, - "id": 898, + "id": 1062, "name": "nullifierHashes", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "412:47:8", + "scope": 1363, + "src": "477:47:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -912,28 +966,28 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 897, + "id": 1061, "keyType": { - "id": 895, + "id": 1059, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "420:7:8", + "src": "485:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "412:24:8", + "src": "477:24:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 896, + "id": 1060, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "431:4:8", + "src": "496:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -945,11 +999,11 @@ }, { "constant": false, - "id": 902, + "id": 1066, "name": "commitments", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "554:43:8", + "scope": 1363, + "src": "619:43:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -957,28 +1011,28 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 901, + "id": 1065, "keyType": { - "id": 899, + "id": 1063, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "562:7:8", + "src": "627:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "554:24:8", + "src": "619:24:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 900, + "id": 1064, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "573:4:8", + "src": "638:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -990,26 +1044,26 @@ }, { "constant": false, - "id": 904, + "id": 1068, "name": "verifier", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "601:25:8", + "scope": 1363, + "src": "666:25:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" }, "typeName": { "contractScope": null, - "id": 903, + "id": 1067, "name": "IVerifier", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 882, - "src": "601:9:8", + "referencedDeclaration": 1041, + "src": "666:9:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -1018,26 +1072,26 @@ }, { "constant": false, - "id": 906, + "id": 1070, "name": "feeManager", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "630:29:8", + "scope": 1363, + "src": "695:29:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" }, "typeName": { "contractScope": null, - "id": 905, + "id": 1069, "name": "IFeeManager", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 888, - "src": "630:11:8", + "referencedDeclaration": 1052, + "src": "695:11:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -1046,11 +1100,11 @@ }, { "constant": false, - "id": 908, + "id": 1072, "name": "operator", "nodeType": "VariableDeclaration", - "scope": 1204, - "src": "819:23:8", + "scope": 1363, + "src": "884:23:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1058,10 +1112,10 @@ "typeString": "address" }, "typeName": { - "id": 907, + "id": 1071, "name": "address", "nodeType": "ElementaryTypeName", - "src": "819:7:8", + "src": "884:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1073,9 +1127,9 @@ }, { "body": { - "id": 919, + "id": 1083, "nodeType": "Block", - "src": "868:90:8", + "src": "933:90:5", "statements": [ { "expression": { @@ -1087,7 +1141,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 914, + "id": 1078, "isConstant": false, "isLValue": false, "isPure": false, @@ -1096,18 +1150,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 911, + "id": 1075, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "882:3:8", + "referencedDeclaration": 1408, + "src": "947:3:5", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 912, + "id": 1076, "isConstant": false, "isLValue": false, "isPure": false, @@ -1115,7 +1169,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "882:10:8", + "src": "947:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -1125,18 +1179,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 913, + "id": 1077, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "896:8:8", + "referencedDeclaration": 1072, + "src": "961:8:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "882:22:8", + "src": "947:22:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1145,14 +1199,14 @@ { "argumentTypes": null, "hexValue": "4f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2e", - "id": 915, + "id": 1079, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "906:39:8", + "src": "971:39:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e8393660073679be7a6133571fe2ca8983a31a683c72e9055f401ac33a2efffc", @@ -1172,21 +1226,21 @@ "typeString": "literal_string \"Only operator can call this function.\"" } ], - "id": 910, + "id": 1074, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "874:7:8", + "referencedDeclaration": 1412, + "src": "939:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 916, + "id": 1080, "isConstant": false, "isLValue": false, "isPure": false, @@ -1194,54 +1248,54 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "874:72:8", + "src": "939:72:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 917, + "id": 1081, "nodeType": "ExpressionStatement", - "src": "874:72:8" + "src": "939:72:5" }, { - "id": 918, + "id": 1082, "nodeType": "PlaceholderStatement", - "src": "952:1:8" + "src": "1017:1:5" } ] }, "documentation": null, - "id": 920, + "id": 1084, "name": "onlyOperator", "nodeType": "ModifierDefinition", "parameters": { - "id": 909, + "id": 1073, "nodeType": "ParameterList", "parameters": [], - "src": "868:0:8" + "src": "933:0:5" }, - "src": "846:112:8", + "src": "911:112:5", "visibility": "internal" }, { "anonymous": false, "documentation": null, - "id": 928, + "id": 1092, "name": "Deposit", "nodeType": "EventDefinition", "parameters": { - "id": 927, + "id": 1091, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 922, + "id": 1086, "indexed": true, "name": "commitment", "nodeType": "VariableDeclaration", - "scope": 928, - "src": "976:26:8", + "scope": 1092, + "src": "1041:26:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1249,10 +1303,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 921, + "id": 1085, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "976:7:8", + "src": "1041:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1263,12 +1317,12 @@ }, { "constant": false, - "id": 924, + "id": 1088, "indexed": false, "name": "leafIndex", "nodeType": "VariableDeclaration", - "scope": 928, - "src": "1004:16:8", + "scope": 1092, + "src": "1069:16:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1276,10 +1330,10 @@ "typeString": "uint32" }, "typeName": { - "id": 923, + "id": 1087, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "1004:6:8", + "src": "1069:6:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1290,12 +1344,12 @@ }, { "constant": false, - "id": 926, + "id": 1090, "indexed": false, "name": "timestamp", "nodeType": "VariableDeclaration", - "scope": 928, - "src": "1022:17:8", + "scope": 1092, + "src": "1087:17:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1303,10 +1357,10 @@ "typeString": "uint256" }, "typeName": { - "id": 925, + "id": 1089, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1022:7:8", + "src": "1087:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1316,28 +1370,28 @@ "visibility": "internal" } ], - "src": "975:65:8" + "src": "1040:65:5" }, - "src": "962:79:8" + "src": "1027:79:5" }, { "anonymous": false, "documentation": null, - "id": 938, + "id": 1102, "name": "Withdrawal", "nodeType": "EventDefinition", "parameters": { - "id": 937, + "id": 1101, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 930, + "id": 1094, "indexed": false, "name": "to", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1061:10:8", + "scope": 1102, + "src": "1126:10:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1345,10 +1399,10 @@ "typeString": "address" }, "typeName": { - "id": 929, + "id": 1093, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1061:7:8", + "src": "1126:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1360,12 +1414,12 @@ }, { "constant": false, - "id": 932, + "id": 1096, "indexed": false, "name": "nullifierHash", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1073:21:8", + "scope": 1102, + "src": "1138:21:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1373,10 +1427,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 931, + "id": 1095, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1073:7:8", + "src": "1138:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1387,12 +1441,12 @@ }, { "constant": false, - "id": 934, + "id": 1098, "indexed": true, "name": "relayer", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1096:23:8", + "scope": 1102, + "src": "1161:23:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1400,10 +1454,10 @@ "typeString": "address" }, "typeName": { - "id": 933, + "id": 1097, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1096:7:8", + "src": "1161:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1415,12 +1469,12 @@ }, { "constant": false, - "id": 936, + "id": 1100, "indexed": false, "name": "fee", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "1121:11:8", + "scope": 1102, + "src": "1186:11:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1428,10 +1482,10 @@ "typeString": "uint256" }, "typeName": { - "id": 935, + "id": 1099, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1121:7:8", + "src": "1186:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1441,15 +1495,15 @@ "visibility": "internal" } ], - "src": "1060:73:8" + "src": "1125:73:5" }, - "src": "1044:90:8" + "src": "1109:90:5" }, { "body": { - "id": 977, + "id": 1141, "nodeType": "Block", - "src": "1631:194:8", + "src": "1696:194:5", "statements": [ { "expression": { @@ -1461,19 +1515,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 957, + "id": 1121, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 955, + "id": 1119, "name": "_denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "1645:13:8", + "referencedDeclaration": 1108, + "src": "1710:13:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1484,14 +1538,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 956, + "id": 1120, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1661:1:8", + "src": "1726:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1499,7 +1553,7 @@ }, "value": "0" }, - "src": "1645:17:8", + "src": "1710:17:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1508,14 +1562,14 @@ { "argumentTypes": null, "hexValue": "64656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030", - "id": 958, + "id": 1122, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1664:39:8", + "src": "1729:39:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_04818fb803bf7e7ff6c9059d97eae335b77b108931ead0a529924d35ccaf3fc8", @@ -1535,21 +1589,21 @@ "typeString": "literal_string \"denomination should be greater than 0\"" } ], - "id": 954, + "id": 1118, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "1637:7:8", + "referencedDeclaration": 1412, + "src": "1702:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 959, + "id": 1123, "isConstant": false, "isLValue": false, "isPure": false, @@ -1557,34 +1611,34 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1637:67:8", + "src": "1702:67:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 960, + "id": 1124, "nodeType": "ExpressionStatement", - "src": "1637:67:8" + "src": "1702:67:5" }, { "expression": { "argumentTypes": null, - "id": 963, + "id": 1127, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 961, + "id": 1125, "name": "verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "1710:8:8", + "referencedDeclaration": 1068, + "src": "1775:8:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -1592,45 +1646,45 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 962, + "id": 1126, "name": "_verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 940, - "src": "1721:9:8", + "referencedDeclaration": 1104, + "src": "1786:9:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "src": "1710:20:8", + "src": "1775:20:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "id": 964, + "id": 1128, "nodeType": "ExpressionStatement", - "src": "1710:20:8" + "src": "1775:20:5" }, { "expression": { "argumentTypes": null, - "id": 967, + "id": 1131, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 965, + "id": 1129, "name": "feeManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "1736:10:8", + "referencedDeclaration": 1070, + "src": "1801:10:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -1638,43 +1692,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 966, + "id": 1130, "name": "_feeManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 942, - "src": "1749:11:8", + "referencedDeclaration": 1106, + "src": "1814:11:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, - "src": "1736:24:8", + "src": "1801:24:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, - "id": 968, + "id": 1132, "nodeType": "ExpressionStatement", - "src": "1736:24:8" + "src": "1801:24:5" }, { "expression": { "argumentTypes": null, - "id": 971, + "id": 1135, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 969, + "id": 1133, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "1766:8:8", + "referencedDeclaration": 1072, + "src": "1831:8:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1684,43 +1738,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 970, + "id": 1134, "name": "_operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 948, - "src": "1777:9:8", + "referencedDeclaration": 1112, + "src": "1842:9:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1766:20:8", + "src": "1831:20:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 972, + "id": 1136, "nodeType": "ExpressionStatement", - "src": "1766:20:8" + "src": "1831:20:5" }, { "expression": { "argumentTypes": null, - "id": 975, + "id": 1139, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 973, + "id": 1137, "name": "denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 894, - "src": "1792:12:8", + "referencedDeclaration": 1058, + "src": "1857:12:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1730,31 +1784,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 974, + "id": 1138, "name": "_denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "1807:13:8", + "referencedDeclaration": 1108, + "src": "1872:13:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1792:28:8", + "src": "1857:28:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 976, + "id": 1140, "nodeType": "ExpressionStatement", - "src": "1792:28:8" + "src": "1857:28:5" } ] }, "documentation": "@dev The constructor\n@param _verifier the address of SNARK verifier for this contract\n@param _denomination transfer amount for each deposit\n@param _merkleTreeHeight the height of deposits' Merkle Tree\n@param _operator operator address (see operator comment above)", - "id": 978, + "id": 1142, "implemented": true, "kind": "constructor", "modifiers": [ @@ -1762,64 +1816,64 @@ "arguments": [ { "argumentTypes": null, - "id": 951, + "id": 1115, "name": "_merkleTreeHeight", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 946, - "src": "1605:17:8", + "referencedDeclaration": 1110, + "src": "1670:17:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } } ], - "id": 952, + "id": 1116, "modifierName": { "argumentTypes": null, - "id": 950, + "id": 1114, "name": "MerkleTreeWithHistory", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 685, - "src": "1583:21:8", + "referencedDeclaration": 838, + "src": "1648:21:5", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_MerkleTreeWithHistory_$685_$", + "typeIdentifier": "t_type$_t_contract$_MerkleTreeWithHistory_$838_$", "typeString": "type(contract MerkleTreeWithHistory)" } }, "nodeType": "ModifierInvocation", - "src": "1583:40:8" + "src": "1648:40:5" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 949, + "id": 1113, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 940, + "id": 1104, "name": "_verifier", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1450:19:8", + "scope": 1142, + "src": "1515:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" }, "typeName": { "contractScope": null, - "id": 939, + "id": 1103, "name": "IVerifier", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 882, - "src": "1450:9:8", + "referencedDeclaration": 1041, + "src": "1515:9:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -1828,26 +1882,26 @@ }, { "constant": false, - "id": 942, + "id": 1106, "name": "_feeManager", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1475:23:8", + "scope": 1142, + "src": "1540:23:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" }, "typeName": { "contractScope": null, - "id": 941, + "id": 1105, "name": "IFeeManager", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 888, - "src": "1475:11:8", + "referencedDeclaration": 1052, + "src": "1540:11:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", + "typeIdentifier": "t_contract$_IFeeManager_$1052", "typeString": "contract IFeeManager" } }, @@ -1856,11 +1910,11 @@ }, { "constant": false, - "id": 944, + "id": 1108, "name": "_denomination", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1504:21:8", + "scope": 1142, + "src": "1569:21:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1868,10 +1922,10 @@ "typeString": "uint256" }, "typeName": { - "id": 943, + "id": 1107, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1504:7:8", + "src": "1569:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1882,11 +1936,11 @@ }, { "constant": false, - "id": 946, + "id": 1110, "name": "_merkleTreeHeight", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1531:24:8", + "scope": 1142, + "src": "1596:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1894,10 +1948,10 @@ "typeString": "uint32" }, "typeName": { - "id": 945, + "id": 1109, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "1531:6:8", + "src": "1596:6:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -1908,11 +1962,11 @@ }, { "constant": false, - "id": 948, + "id": 1112, "name": "_operator", "nodeType": "VariableDeclaration", - "scope": 978, - "src": "1561:17:8", + "scope": 1142, + "src": "1626:17:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1920,10 +1974,10 @@ "typeString": "address" }, "typeName": { - "id": 947, + "id": 1111, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1561:7:8", + "src": "1626:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1934,25 +1988,25 @@ "visibility": "internal" } ], - "src": "1444:138:8" + "src": "1509:138:5" }, "returnParameters": { - "id": 953, + "id": 1117, "nodeType": "ParameterList", "parameters": [], - "src": "1631:0:8" + "src": "1696:0:5" }, - "scope": 1204, - "src": "1433:392:8", + "scope": 1363, + "src": "1498:392:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 1015, + "id": 1179, "nodeType": "Block", - "src": "2141:256:8", + "src": "2206:256:5", "statements": [ { "expression": { @@ -1960,7 +2014,7 @@ "arguments": [ { "argumentTypes": null, - "id": 989, + "id": 1153, "isConstant": false, "isLValue": false, "isPure": false, @@ -1968,31 +2022,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "2155:25:8", + "src": "2220:25:5", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 986, + "id": 1150, "name": "commitments", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "2156:11:8", + "referencedDeclaration": 1066, + "src": "2221:11:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 988, + "id": 1152, "indexExpression": { "argumentTypes": null, - "id": 987, + "id": 1151, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2168:11:8", + "referencedDeclaration": 1144, + "src": "2233:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2003,7 +2057,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2156:24:8", + "src": "2221:24:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2017,14 +2071,14 @@ { "argumentTypes": null, "hexValue": "54686520636f6d6d69746d656e7420686173206265656e207375626d6974746564", - "id": 990, + "id": 1154, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2182:35:8", + "src": "2247:35:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ae5f231636554c1cb3bf839359e4dfbb338ccb221c7c5dbdf2da91ddc6e2ee6b", @@ -2044,21 +2098,21 @@ "typeString": "literal_string \"The commitment has been submitted\"" } ], - "id": 985, + "id": 1149, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "2147:7:8", + "referencedDeclaration": 1412, + "src": "2212:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 991, + "id": 1155, "isConstant": false, "isLValue": false, "isPure": false, @@ -2066,28 +2120,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2147:71:8", + "src": "2212:71:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 992, + "id": 1156, "nodeType": "ExpressionStatement", - "src": "2147:71:8" + "src": "2212:71:5" }, { "assignments": [ - 994 + 1158 ], "declarations": [ { "constant": false, - "id": 994, + "id": 1158, "name": "insertedIndex", "nodeType": "VariableDeclaration", - "scope": 1015, - "src": "2225:20:8", + "scope": 1179, + "src": "2290:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2095,10 +2149,10 @@ "typeString": "uint32" }, "typeName": { - "id": 993, + "id": 1157, "name": "uint32", "nodeType": "ElementaryTypeName", - "src": "2225:6:8", + "src": "2290:6:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2108,18 +2162,18 @@ "visibility": "internal" } ], - "id": 998, + "id": 1162, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 996, + "id": 1160, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2256:11:8", + "referencedDeclaration": 1144, + "src": "2321:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2133,18 +2187,18 @@ "typeString": "bytes32" } ], - "id": 995, + "id": 1159, "name": "_insert", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 627, - "src": "2248:7:8", + "referencedDeclaration": 780, + "src": "2313:7:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_uint32_$", "typeString": "function (bytes32) returns (uint32)" } }, - "id": 997, + "id": 1161, "isConstant": false, "isLValue": false, "isPure": false, @@ -2152,19 +2206,19 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2248:20:8", + "src": "2313:20:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "nodeType": "VariableDeclarationStatement", - "src": "2225:43:8" + "src": "2290:43:5" }, { "expression": { "argumentTypes": null, - "id": 1003, + "id": 1167, "isConstant": false, "isLValue": false, "isPure": false, @@ -2173,26 +2227,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 999, + "id": 1163, "name": "commitments", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "2274:11:8", + "referencedDeclaration": 1066, + "src": "2339:11:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1001, + "id": 1165, "indexExpression": { "argumentTypes": null, - "id": 1000, + "id": 1164, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2286:11:8", + "referencedDeclaration": 1144, + "src": "2351:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2203,7 +2257,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2274:24:8", + "src": "2339:24:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2214,14 +2268,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1002, + "id": 1166, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "2301:4:8", + "src": "2366:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -2229,15 +2283,15 @@ }, "value": "true" }, - "src": "2274:31:8", + "src": "2339:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1004, + "id": 1168, "nodeType": "ExpressionStatement", - "src": "2274:31:8" + "src": "2339:31:5" }, { "expression": { @@ -2245,18 +2299,18 @@ "arguments": [], "expression": { "argumentTypes": [], - "id": 1005, + "id": 1169, "name": "_processDeposit", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1019, - "src": "2311:15:8", + "referencedDeclaration": 1183, + "src": "2376:15:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, - "id": 1006, + "id": 1170, "isConstant": false, "isLValue": false, "isPure": false, @@ -2264,15 +2318,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2311:17:8", + "src": "2376:17:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1007, + "id": 1171, "nodeType": "ExpressionStatement", - "src": "2311:17:8" + "src": "2376:17:5" }, { "eventCall": { @@ -2280,12 +2334,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1009, + "id": 1173, "name": "_commitment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "2348:11:8", + "referencedDeclaration": 1144, + "src": "2413:11:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2293,12 +2347,12 @@ }, { "argumentTypes": null, - "id": 1010, + "id": 1174, "name": "insertedIndex", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 994, - "src": "2361:13:8", + "referencedDeclaration": 1158, + "src": "2426:13:5", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" @@ -2308,18 +2362,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1011, + "id": 1175, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3260, - "src": "2376:5:8", + "referencedDeclaration": 1398, + "src": "2441:5:5", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 1012, + "id": 1176, "isConstant": false, "isLValue": false, "isPure": false, @@ -2327,7 +2381,7 @@ "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2376:15:8", + "src": "2441:15:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2349,18 +2403,18 @@ "typeString": "uint256" } ], - "id": 1008, + "id": 1172, "name": "Deposit", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "2340:7:8", + "referencedDeclaration": 1092, + "src": "2405:7:5", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint32_$_t_uint256_$returns$__$", "typeString": "function (bytes32,uint32,uint256)" } }, - "id": 1013, + "id": 1177, "isConstant": false, "isLValue": false, "isPure": false, @@ -2368,56 +2422,56 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2340:52:8", + "src": "2405:52:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1014, + "id": 1178, "nodeType": "EmitStatement", - "src": "2335:57:8" + "src": "2400:57:5" } ] }, "documentation": "@dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.\n@param _commitment the note commitment, which is PedersenHash(nullifier + secret)", - "id": 1016, + "id": 1180, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 983, + "id": 1147, "modifierName": { "argumentTypes": null, - "id": 982, + "id": 1146, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "2128:12:8", + "referencedDeclaration": 1392, + "src": "2193:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "2128:12:8" + "src": "2193:12:5" } ], "name": "deposit", "nodeType": "FunctionDefinition", "parameters": { - "id": 981, + "id": 1145, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 980, + "id": 1144, "name": "_commitment", "nodeType": "VariableDeclaration", - "scope": 1016, - "src": "2090:19:8", + "scope": 1180, + "src": "2155:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2425,10 +2479,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 979, + "id": 1143, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2090:7:8", + "src": "2155:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2438,16 +2492,16 @@ "visibility": "internal" } ], - "src": "2089:21:8" + "src": "2154:21:5" }, "returnParameters": { - "id": 984, + "id": 1148, "nodeType": "ParameterList", "parameters": [], - "src": "2141:0:8" + "src": "2206:0:5" }, - "scope": 1204, - "src": "2073:324:8", + "scope": 1363, + "src": "2138:324:5", "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -2455,35 +2509,35 @@ { "body": null, "documentation": "@dev this function is defined in a child contract ", - "id": 1019, + "id": 1183, "implemented": false, "kind": "function", "modifiers": [], "name": "_processDeposit", "nodeType": "FunctionDefinition", "parameters": { - "id": 1017, + "id": 1181, "nodeType": "ParameterList", "parameters": [], - "src": "2484:2:8" + "src": "2549:2:5" }, "returnParameters": { - "id": 1018, + "id": 1182, "nodeType": "ParameterList", "parameters": [], - "src": "2495:0:8" + "src": "2560:0:5" }, - "scope": 1204, - "src": "2460:36:8", + "scope": 1363, + "src": "2525:36:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1106, + "id": 1267, "nodeType": "Block", - "src": "3088:606:8", + "src": "3153:586:5", "statements": [ { "expression": { @@ -2495,19 +2549,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1041, + "id": 1205, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1039, + "id": 1203, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3102:4:8", + "referencedDeclaration": 1195, + "src": "3167:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2517,18 +2571,18 @@ "operator": "<=", "rightExpression": { "argumentTypes": null, - "id": 1040, + "id": 1204, "name": "denomination", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 894, - "src": "3110:12:8", + "referencedDeclaration": 1058, + "src": "3175:12:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3102:20:8", + "src": "3167:20:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2537,14 +2591,14 @@ { "argumentTypes": null, "hexValue": "4665652065786365656473207472616e736665722076616c7565", - "id": 1042, + "id": 1206, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3124:28:8", + "src": "3189:28:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2ce218df547d416f80ea8a5deadaf9453d23523ffa5f2e880a48adfdb4053a9c", @@ -2564,21 +2618,21 @@ "typeString": "literal_string \"Fee exceeds transfer value\"" } ], - "id": 1038, + "id": 1202, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3094:7:8", + "referencedDeclaration": 1412, + "src": "3159:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1043, + "id": 1207, "isConstant": false, "isLValue": false, "isPure": false, @@ -2586,15 +2640,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3094:59:8", + "src": "3159:59:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1044, + "id": 1208, "nodeType": "ExpressionStatement", - "src": "3094:59:8" + "src": "3159:59:5" }, { "expression": { @@ -2602,7 +2656,7 @@ "arguments": [ { "argumentTypes": null, - "id": 1049, + "id": 1213, "isConstant": false, "isLValue": false, "isPure": false, @@ -2610,31 +2664,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "3167:32:8", + "src": "3232:32:5", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1046, + "id": 1210, "name": "nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 898, - "src": "3168:15:8", + "referencedDeclaration": 1062, + "src": "3233:15:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1048, + "id": 1212, "indexExpression": { "argumentTypes": null, - "id": 1047, + "id": 1211, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3184:14:8", + "referencedDeclaration": 1189, + "src": "3249:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2645,7 +2699,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3168:31:8", + "src": "3233:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2659,14 +2713,14 @@ { "argumentTypes": null, "hexValue": "546865206e6f746520686173206265656e20616c7265616479207370656e74", - "id": 1050, + "id": 1214, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3201:33:8", + "src": "3266:33:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_a1bef92d7a18b1c6975dc8de68df6140a52afea05a2c6c91da2b1562c617e896", @@ -2686,21 +2740,21 @@ "typeString": "literal_string \"The note has been already spent\"" } ], - "id": 1045, + "id": 1209, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3159:7:8", + "referencedDeclaration": 1412, + "src": "3224:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1051, + "id": 1215, "isConstant": false, "isLValue": false, "isPure": false, @@ -2708,15 +2762,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3159:76:8", + "src": "3224:76:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1052, + "id": 1216, "nodeType": "ExpressionStatement", - "src": "3159:76:8" + "src": "3224:76:5" }, { "expression": { @@ -2727,12 +2781,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1055, + "id": 1219, "name": "_root", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "3261:5:8", + "referencedDeclaration": 1187, + "src": "3326:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2746,18 +2800,18 @@ "typeString": "bytes32" } ], - "id": 1054, + "id": 1218, "name": "isKnownRoot", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 674, - "src": "3249:11:8", + "referencedDeclaration": 827, + "src": "3314:11:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$", "typeString": "function (bytes32) view returns (bool)" } }, - "id": 1056, + "id": 1220, "isConstant": false, "isLValue": false, "isPure": false, @@ -2765,7 +2819,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3249:18:8", + "src": "3314:18:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2774,14 +2828,14 @@ { "argumentTypes": null, "hexValue": "43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f74", - "id": 1057, + "id": 1221, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3269:30:8", + "src": "3334:30:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2a69086763073955418d2fd7dfee3d2f1fbc5b21047a216b7855d3f313d8e204", @@ -2801,21 +2855,21 @@ "typeString": "literal_string \"Cannot find your merkle root\"" } ], - "id": 1053, + "id": 1217, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3241:7:8", + "referencedDeclaration": 1412, + "src": "3306:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1058, + "id": 1222, "isConstant": false, "isLValue": false, "isPure": false, @@ -2823,15 +2877,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3241:59:8", + "src": "3306:59:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1059, + "id": 1223, "nodeType": "ExpressionStatement", - "src": "3241:59:8" + "src": "3306:59:5" }, { "expression": { @@ -2842,12 +2896,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1063, + "id": 1227, "name": "_proof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "3368:6:8", + "referencedDeclaration": 1185, + "src": "3433:6:5", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" @@ -2861,12 +2915,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1065, + "id": 1229, "name": "_root", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "3385:5:8", + "referencedDeclaration": 1187, + "src": "3450:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2880,20 +2934,20 @@ "typeString": "bytes32" } ], - "id": 1064, + "id": 1228, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3377:7:8", + "src": "3442:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1066, + "id": 1230, "isConstant": false, "isLValue": false, "isPure": false, @@ -2901,7 +2955,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3377:14:8", + "src": "3442:14:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2912,12 +2966,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1068, + "id": 1232, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3401:14:8", + "referencedDeclaration": 1189, + "src": "3466:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2931,20 +2985,20 @@ "typeString": "bytes32" } ], - "id": 1067, + "id": 1231, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3393:7:8", + "src": "3458:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1069, + "id": 1233, "isConstant": false, "isLValue": false, "isPure": false, @@ -2952,7 +3006,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3393:23:8", + "src": "3458:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2963,12 +3017,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1071, + "id": 1235, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "3426:10:8", + "referencedDeclaration": 1191, + "src": "3491:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2982,20 +3036,20 @@ "typeString": "address payable" } ], - "id": 1070, + "id": 1234, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3418:7:8", + "src": "3483:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1072, + "id": 1236, "isConstant": false, "isLValue": false, "isPure": false, @@ -3003,7 +3057,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3418:19:8", + "src": "3483:19:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3014,12 +3068,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1074, + "id": 1238, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "3447:8:8", + "referencedDeclaration": 1193, + "src": "3512:8:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3033,20 +3087,20 @@ "typeString": "address payable" } ], - "id": 1073, + "id": 1237, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3439:7:8", + "src": "3504:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, - "id": 1075, + "id": 1239, "isConstant": false, "isLValue": false, "isPure": false, @@ -3054,7 +3108,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3439:17:8", + "src": "3504:17:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3062,12 +3116,12 @@ }, { "argumentTypes": null, - "id": 1076, + "id": 1240, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3458:4:8", + "referencedDeclaration": 1195, + "src": "3523:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3075,26 +3129,26 @@ }, { "argumentTypes": null, - "id": 1077, + "id": 1241, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1033, - "src": "3464:7:8", + "referencedDeclaration": 1197, + "src": "3529:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 1078, + "id": 1242, "isConstant": false, "isInlineArray": true, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "3376:96:8", + "src": "3441:96:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", "typeString": "uint256[6] memory" @@ -3114,32 +3168,32 @@ ], "expression": { "argumentTypes": null, - "id": 1061, + "id": 1225, "name": "verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "3347:8:8", + "referencedDeclaration": 1068, + "src": "3412:8:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "id": 1062, + "id": 1226, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "verifyProof", "nodeType": "MemberAccess", - "referencedDeclaration": 881, - "src": "3347:20:8", + "referencedDeclaration": 1040, + "src": "3412:20:5", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_bytes_memory_ptr_$_t_array$_t_uint256_$6_memory_ptr_$returns$_t_bool_$", "typeString": "function (bytes memory,uint256[6] memory) external returns (bool)" } }, - "id": 1079, + "id": 1243, "isConstant": false, "isLValue": false, "isPure": false, @@ -3147,7 +3201,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3347:126:8", + "src": "3412:126:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3156,14 +3210,14 @@ { "argumentTypes": null, "hexValue": "496e76616c69642077697468647261772070726f6f66", - "id": 1080, + "id": 1244, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3475:24:8", + "src": "3540:24:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_7021ea58137dba96e572e94936410b0b0e4cbc344e1ab2ee7f47660768b81ff4", @@ -3183,21 +3237,21 @@ "typeString": "literal_string \"Invalid withdraw proof\"" } ], - "id": 1060, + "id": 1224, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, - "src": "3339:7:8", + "referencedDeclaration": 1412, + "src": "3404:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1081, + "id": 1245, "isConstant": false, "isLValue": false, "isPure": false, @@ -3205,20 +3259,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3339:161:8", + "src": "3404:161:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1082, + "id": 1246, "nodeType": "ExpressionStatement", - "src": "3339:161:8" + "src": "3404:161:5" }, { "expression": { "argumentTypes": null, - "id": 1087, + "id": 1251, "isConstant": false, "isLValue": false, "isPure": false, @@ -3227,26 +3281,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1083, + "id": 1247, "name": "nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 898, - "src": "3507:15:8", + "referencedDeclaration": 1062, + "src": "3572:15:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1085, + "id": 1249, "indexExpression": { "argumentTypes": null, - "id": 1084, + "id": 1248, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3523:14:8", + "referencedDeclaration": 1189, + "src": "3588:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3257,7 +3311,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3507:31:8", + "src": "3572:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3268,14 +3322,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1086, + "id": 1250, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3541:4:8", + "src": "3606:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3283,15 +3337,15 @@ }, "value": "true" }, - "src": "3507:38:8", + "src": "3572:38:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1088, + "id": 1252, "nodeType": "ExpressionStatement", - "src": "3507:38:8" + "src": "3572:38:5" }, { "expression": { @@ -3299,12 +3353,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1090, + "id": 1254, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "3568:10:8", + "referencedDeclaration": 1191, + "src": "3633:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3312,12 +3366,12 @@ }, { "argumentTypes": null, - "id": 1091, + "id": 1255, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "3580:8:8", + "referencedDeclaration": 1193, + "src": "3645:8:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3325,12 +3379,12 @@ }, { "argumentTypes": null, - "id": 1092, + "id": 1256, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3590:4:8", + "referencedDeclaration": 1195, + "src": "3655:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3338,62 +3392,16 @@ }, { "argumentTypes": null, - "id": 1093, + "id": 1257, "name": "_refund", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1033, - "src": "3596:7:8", + "referencedDeclaration": 1197, + "src": "3661:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 1094, - "name": "feeManager", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "3605:10:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IFeeManager_$888", - "typeString": "contract IFeeManager" - } - }, - "id": 1095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "feeTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 887, - "src": "3605:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", - "typeString": "function () view external returns (address)" - } - }, - "id": 1096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3605:18:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } } ], "expression": { @@ -3413,24 +3421,20 @@ { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" } ], - "id": 1089, + "id": 1253, "name": "_processWithdraw", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1120, - "src": "3551:16:8", + "referencedDeclaration": 1279, + "src": "3616:16:5", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_address_payable_$_t_uint256_$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (address payable,address payable,uint256,uint256,address)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_address_payable_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address payable,address payable,uint256,uint256)" } }, - "id": 1097, + "id": 1258, "isConstant": false, "isLValue": false, "isPure": false, @@ -3438,15 +3442,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3551:73:8", + "src": "3616:53:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1098, + "id": 1259, "nodeType": "ExpressionStatement", - "src": "3551:73:8" + "src": "3616:53:5" }, { "eventCall": { @@ -3454,12 +3458,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1100, + "id": 1261, "name": "_recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "3646:10:8", + "referencedDeclaration": 1191, + "src": "3691:10:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3467,12 +3471,12 @@ }, { "argumentTypes": null, - "id": 1101, + "id": 1262, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "3658:14:8", + "referencedDeclaration": 1189, + "src": "3703:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3480,12 +3484,12 @@ }, { "argumentTypes": null, - "id": 1102, + "id": 1263, "name": "_relayer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "3674:8:8", + "referencedDeclaration": 1193, + "src": "3719:8:5", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3493,12 +3497,12 @@ }, { "argumentTypes": null, - "id": 1103, + "id": 1264, "name": "_fee", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "3684:4:8", + "referencedDeclaration": 1195, + "src": "3729:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3524,18 +3528,18 @@ "typeString": "uint256" } ], - "id": 1099, + "id": 1260, "name": "Withdrawal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 938, - "src": "3635:10:8", + "referencedDeclaration": 1102, + "src": "3680:10:5", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,bytes32,address,uint256)" } }, - "id": 1104, + "id": 1265, "isConstant": false, "isLValue": false, "isPure": false, @@ -3543,56 +3547,56 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3635:54:8", + "src": "3680:54:5", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1105, + "id": 1266, "nodeType": "EmitStatement", - "src": "3630:59:8" + "src": "3675:59:5" } ] }, "documentation": "@dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs\n`input` array consists of:\n- merkle root of all deposits in the contract\n- hash of unique deposit nullifier to prevent double spends\n- the recipient of funds\n- optional fee that goes to the transaction sender (usually a relay)", - "id": 1107, + "id": 1268, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 1036, + "id": 1200, "modifierName": { "argumentTypes": null, - "id": 1035, + "id": 1199, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3254, - "src": "3075:12:8", + "referencedDeclaration": 1392, + "src": "3140:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "3075:12:8" + "src": "3140:12:5" } ], "name": "withdraw", "nodeType": "FunctionDefinition", "parameters": { - "id": 1034, + "id": 1198, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1021, + "id": 1185, "name": "_proof", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2911:21:8", + "scope": 1268, + "src": "2976:21:5", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -3600,10 +3604,10 @@ "typeString": "bytes" }, "typeName": { - "id": 1020, + "id": 1184, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2911:5:8", + "src": "2976:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -3614,11 +3618,11 @@ }, { "constant": false, - "id": 1023, + "id": 1187, "name": "_root", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2934:13:8", + "scope": 1268, + "src": "2999:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3626,10 +3630,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1022, + "id": 1186, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2934:7:8", + "src": "2999:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3640,11 +3644,11 @@ }, { "constant": false, - "id": 1025, + "id": 1189, "name": "_nullifierHash", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2949:22:8", + "scope": 1268, + "src": "3014:22:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3652,10 +3656,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1024, + "id": 1188, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2949:7:8", + "src": "3014:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3666,11 +3670,11 @@ }, { "constant": false, - "id": 1027, + "id": 1191, "name": "_recipient", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "2973:26:8", + "scope": 1268, + "src": "3038:26:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3678,10 +3682,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1026, + "id": 1190, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2973:15:8", + "src": "3038:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3693,11 +3697,11 @@ }, { "constant": false, - "id": 1029, + "id": 1193, "name": "_relayer", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "3001:24:8", + "scope": 1268, + "src": "3066:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3705,10 +3709,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1028, + "id": 1192, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3001:15:8", + "src": "3066:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3720,11 +3724,11 @@ }, { "constant": false, - "id": 1031, + "id": 1195, "name": "_fee", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "3027:12:8", + "scope": 1268, + "src": "3092:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3732,10 +3736,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1030, + "id": 1194, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3027:7:8", + "src": "3092:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3746,11 +3750,11 @@ }, { "constant": false, - "id": 1033, + "id": 1197, "name": "_refund", "nodeType": "VariableDeclaration", - "scope": 1107, - "src": "3041:15:8", + "scope": 1268, + "src": "3106:15:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3758,10 +3762,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1032, + "id": 1196, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3041:7:8", + "src": "3106:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3771,16 +3775,16 @@ "visibility": "internal" } ], - "src": "2910:147:8" + "src": "2975:147:5" }, "returnParameters": { - "id": 1037, + "id": 1201, "nodeType": "ParameterList", "parameters": [], - "src": "3088:0:8" + "src": "3153:0:5" }, - "scope": 1204, - "src": "2893:801:8", + "scope": 1363, + "src": "2958:781:5", "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -3788,23 +3792,23 @@ { "body": null, "documentation": "@dev this function is defined in a child contract ", - "id": 1120, + "id": 1279, "implemented": false, "kind": "function", "modifiers": [], "name": "_processWithdraw", "nodeType": "FunctionDefinition", "parameters": { - "id": 1118, + "id": 1277, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1109, + "id": 1270, "name": "_recipient", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3783:26:8", + "scope": 1279, + "src": "3828:26:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3812,10 +3816,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1108, + "id": 1269, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3783:15:8", + "src": "3828:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3827,11 +3831,11 @@ }, { "constant": false, - "id": 1111, + "id": 1272, "name": "_relayer", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3811:24:8", + "scope": 1279, + "src": "3856:24:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3839,10 +3843,10 @@ "typeString": "address payable" }, "typeName": { - "id": 1110, + "id": 1271, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3811:15:8", + "src": "3856:15:5", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3854,11 +3858,11 @@ }, { "constant": false, - "id": 1113, + "id": 1274, "name": "_relayer_fee", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3837:20:8", + "scope": 1279, + "src": "3882:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3866,10 +3870,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1112, + "id": 1273, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3837:7:8", + "src": "3882:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3880,11 +3884,11 @@ }, { "constant": false, - "id": 1115, + "id": 1276, "name": "_refund", "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3859:15:8", + "scope": 1279, + "src": "3904:15:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3892,10 +3896,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1114, + "id": 1275, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3859:7:8", + "src": "3904:7:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3903,80 +3907,53 @@ }, "value": null, "visibility": "internal" - }, - { - "constant": false, - "id": 1117, - "name": "_feeTo", - "nodeType": "VariableDeclaration", - "scope": 1120, - "src": "3876:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1116, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3876:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" } ], - "src": "3782:109:8" + "src": "3827:93:5" }, "returnParameters": { - "id": 1119, + "id": 1278, "nodeType": "ParameterList", "parameters": [], - "src": "3900:0:8" + "src": "3929:0:5" }, - "scope": 1204, - "src": "3757:144:8", + "scope": 1363, + "src": "3802:128:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 1131, + "id": 1290, "nodeType": "Block", - "src": "4018:49:8", + "src": "4047:49:5", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1127, + "id": 1286, "name": "nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 898, - "src": "4031:15:8", + "referencedDeclaration": 1062, + "src": "4060:15:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1129, + "id": 1288, "indexExpression": { "argumentTypes": null, - "id": 1128, + "id": 1287, "name": "_nullifierHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1122, - "src": "4047:14:8", + "referencedDeclaration": 1281, + "src": "4076:14:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3987,37 +3964,37 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4031:31:8", + "src": "4060:31:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 1126, - "id": 1130, + "functionReturnParameters": 1285, + "id": 1289, "nodeType": "Return", - "src": "4024:38:8" + "src": "4053:38:5" } ] }, "documentation": "@dev whether a note is already spent ", - "id": 1132, + "id": 1291, "implemented": true, "kind": "function", "modifiers": [], "name": "isSpent", "nodeType": "FunctionDefinition", "parameters": { - "id": 1123, + "id": 1282, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1122, + "id": 1281, "name": "_nullifierHash", "nodeType": "VariableDeclaration", - "scope": 1132, - "src": "3968:22:8", + "scope": 1291, + "src": "3997:22:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4025,10 +4002,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1121, + "id": 1280, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3968:7:8", + "src": "3997:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4038,19 +4015,19 @@ "visibility": "internal" } ], - "src": "3967:24:8" + "src": "3996:24:5" }, "returnParameters": { - "id": 1126, + "id": 1285, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1125, + "id": 1284, "name": "", "nodeType": "VariableDeclaration", - "scope": 1132, - "src": "4012:4:8", + "scope": 1291, + "src": "4041:4:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4058,10 +4035,10 @@ "typeString": "bool" }, "typeName": { - "id": 1124, + "id": 1283, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4012:4:8", + "src": "4041:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4071,36 +4048,36 @@ "visibility": "internal" } ], - "src": "4011:6:8" + "src": "4040:6:5" }, - "scope": 1204, - "src": "3951:116:8", + "scope": 1363, + "src": "3980:116:5", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 1176, + "id": 1335, "nodeType": "Block", - "src": "4230:191:8", + "src": "4259:191:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1148, + "id": 1307, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 1141, + "id": 1300, "name": "spent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1139, - "src": "4236:5:8", + "referencedDeclaration": 1298, + "src": "4265:5:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", "typeString": "bool[] memory" @@ -4115,18 +4092,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1145, + "id": 1304, "name": "_nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1135, - "src": "4255:16:8", + "referencedDeclaration": 1294, + "src": "4284:16:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", "typeString": "bytes32[] calldata" } }, - "id": 1146, + "id": 1305, "isConstant": false, "isLValue": false, "isPure": false, @@ -4134,7 +4111,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4255:23:8", + "src": "4284:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4148,39 +4125,39 @@ "typeString": "uint256" } ], - "id": 1144, + "id": 1303, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", - "src": "4244:10:8", + "src": "4273:10:5", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bool_$dyn_memory_$", "typeString": "function (uint256) pure returns (bool[] memory)" }, "typeName": { "baseType": { - "id": 1142, + "id": 1301, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4248:4:8", + "src": "4277:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1143, + "id": 1302, "length": null, "nodeType": "ArrayTypeName", - "src": "4248:6:8", + "src": "4277:6:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr", "typeString": "bool[]" } } }, - "id": 1147, + "id": 1306, "isConstant": false, "isLValue": false, "isPure": false, @@ -4188,27 +4165,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4244:35:8", + "src": "4273:35:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory", "typeString": "bool[] memory" } }, - "src": "4236:43:8", + "src": "4265:43:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", "typeString": "bool[] memory" } }, - "id": 1149, + "id": 1308, "nodeType": "ExpressionStatement", - "src": "4236:43:8" + "src": "4265:43:5" }, { "body": { - "id": 1174, + "id": 1333, "nodeType": "Block", - "src": "4335:82:8", + "src": "4364:82:5", "statements": [ { "condition": { @@ -4218,26 +4195,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1162, + "id": 1321, "name": "_nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1135, - "src": "4355:16:8", + "referencedDeclaration": 1294, + "src": "4384:16:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", "typeString": "bytes32[] calldata" } }, - "id": 1164, + "id": 1323, "indexExpression": { "argumentTypes": null, - "id": 1163, + "id": 1322, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4372:1:8", + "referencedDeclaration": 1310, + "src": "4401:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4248,7 +4225,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4355:19:8", + "src": "4384:19:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4262,18 +4239,18 @@ "typeString": "bytes32" } ], - "id": 1161, + "id": 1320, "name": "isSpent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1132, - "src": "4347:7:8", + "referencedDeclaration": 1291, + "src": "4376:7:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$", "typeString": "function (bytes32) view returns (bool)" } }, - "id": 1165, + "id": 1324, "isConstant": false, "isLValue": false, "isPure": false, @@ -4281,25 +4258,25 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4347:28:8", + "src": "4376:28:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 1173, + "id": 1332, "nodeType": "IfStatement", - "src": "4343:68:8", + "src": "4372:68:5", "trueBody": { - "id": 1172, + "id": 1331, "nodeType": "Block", - "src": "4377:34:8", + "src": "4406:34:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1170, + "id": 1329, "isConstant": false, "isLValue": false, "isPure": false, @@ -4308,26 +4285,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1166, + "id": 1325, "name": "spent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1139, - "src": "4387:5:8", + "referencedDeclaration": 1298, + "src": "4416:5:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", "typeString": "bool[] memory" } }, - "id": 1168, + "id": 1327, "indexExpression": { "argumentTypes": null, - "id": 1167, + "id": 1326, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4393:1:8", + "referencedDeclaration": 1310, + "src": "4422:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4338,7 +4315,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4387:8:8", + "src": "4416:8:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4349,14 +4326,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1169, + "id": 1328, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "4398:4:8", + "src": "4427:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -4364,15 +4341,15 @@ }, "value": "true" }, - "src": "4387:15:8", + "src": "4416:15:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1171, + "id": 1330, "nodeType": "ExpressionStatement", - "src": "4387:15:8" + "src": "4416:15:5" } ] } @@ -4385,19 +4362,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1157, + "id": 1316, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1154, + "id": 1313, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4301:1:8", + "referencedDeclaration": 1310, + "src": "4330:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4409,18 +4386,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1155, + "id": 1314, "name": "_nullifierHashes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1135, - "src": "4305:16:8", + "referencedDeclaration": 1294, + "src": "4334:16:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", "typeString": "bytes32[] calldata" } }, - "id": 1156, + "id": 1315, "isConstant": false, "isLValue": false, "isPure": false, @@ -4428,31 +4405,31 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4305:23:8", + "src": "4334:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4301:27:8", + "src": "4330:27:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1175, + "id": 1334, "initializationExpression": { "assignments": [ - 1151 + 1310 ], "declarations": [ { "constant": false, - "id": 1151, + "id": 1310, "name": "i", "nodeType": "VariableDeclaration", - "scope": 1175, - "src": "4289:6:8", + "scope": 1334, + "src": "4318:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4460,10 +4437,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1150, + "id": 1309, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4289:4:8", + "src": "4318:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4473,18 +4450,18 @@ "visibility": "internal" } ], - "id": 1153, + "id": 1312, "initialValue": { "argumentTypes": null, "hexValue": "30", - "id": 1152, + "id": 1311, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4298:1:8", + "src": "4327:1:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4493,12 +4470,12 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "4289:10:8" + "src": "4318:10:5" }, "loopExpression": { "expression": { "argumentTypes": null, - "id": 1159, + "id": 1318, "isConstant": false, "isLValue": false, "isPure": false, @@ -4506,15 +4483,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "4330:3:8", + "src": "4359:3:5", "subExpression": { "argumentTypes": null, - "id": 1158, + "id": 1317, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1151, - "src": "4330:1:8", + "referencedDeclaration": 1310, + "src": "4359:1:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4525,33 +4502,33 @@ "typeString": "uint256" } }, - "id": 1160, + "id": 1319, "nodeType": "ExpressionStatement", - "src": "4330:3:8" + "src": "4359:3:5" }, "nodeType": "ForStatement", - "src": "4285:132:8" + "src": "4314:132:5" } ] }, "documentation": "@dev whether an array of notes is already spent ", - "id": 1177, + "id": 1336, "implemented": true, "kind": "function", "modifiers": [], "name": "isSpentArray", "nodeType": "FunctionDefinition", "parameters": { - "id": 1136, + "id": 1295, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1135, + "id": 1294, "name": "_nullifierHashes", "nodeType": "VariableDeclaration", - "scope": 1177, - "src": "4150:35:8", + "scope": 1336, + "src": "4179:35:5", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -4560,19 +4537,19 @@ }, "typeName": { "baseType": { - "id": 1133, + "id": 1292, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4150:7:8", + "src": "4179:7:5", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 1134, + "id": 1293, "length": null, "nodeType": "ArrayTypeName", - "src": "4150:9:8", + "src": "4179:9:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", "typeString": "bytes32[]" @@ -4582,19 +4559,19 @@ "visibility": "internal" } ], - "src": "4149:37:8" + "src": "4178:37:5" }, "returnParameters": { - "id": 1140, + "id": 1299, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1139, + "id": 1298, "name": "spent", "nodeType": "VariableDeclaration", - "scope": 1177, - "src": "4209:19:8", + "scope": 1336, + "src": "4238:19:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -4603,19 +4580,19 @@ }, "typeName": { "baseType": { - "id": 1137, + "id": 1296, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4209:4:8", + "src": "4238:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1138, + "id": 1297, "length": null, "nodeType": "ArrayTypeName", - "src": "4209:6:8", + "src": "4238:6:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr", "typeString": "bool[]" @@ -4625,38 +4602,38 @@ "visibility": "internal" } ], - "src": "4208:21:8" + "src": "4237:21:5" }, - "scope": 1204, - "src": "4128:293:8", + "scope": 1363, + "src": "4157:293:5", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1190, + "id": 1349, "nodeType": "Block", - "src": "4719:45:8", + "src": "4748:45:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1188, + "id": 1347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 1184, + "id": 1343, "name": "verifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "4725:8:8", + "referencedDeclaration": 1068, + "src": "4754:8:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, @@ -4667,12 +4644,12 @@ "arguments": [ { "argumentTypes": null, - "id": 1186, + "id": 1345, "name": "_newVerifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1179, - "src": "4746:12:8", + "referencedDeclaration": 1338, + "src": "4775:12:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4686,18 +4663,18 @@ "typeString": "address" } ], - "id": 1185, + "id": 1344, "name": "IVerifier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 882, - "src": "4736:9:8", + "referencedDeclaration": 1041, + "src": "4765:9:5", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IVerifier_$882_$", + "typeIdentifier": "t_type$_t_contract$_IVerifier_$1041_$", "typeString": "type(contract IVerifier)" } }, - "id": 1187, + "id": 1346, "isConstant": false, "isLValue": false, "isPure": false, @@ -4705,62 +4682,62 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4736:23:8", + "src": "4765:23:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "src": "4725:34:8", + "src": "4754:34:5", "typeDescriptions": { - "typeIdentifier": "t_contract$_IVerifier_$882", + "typeIdentifier": "t_contract$_IVerifier_$1041", "typeString": "contract IVerifier" } }, - "id": 1189, + "id": 1348, "nodeType": "ExpressionStatement", - "src": "4725:34:8" + "src": "4754:34:5" } ] }, "documentation": "@dev allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held.\nAfter that operator rights are supposed to be transferred to zero address", - "id": 1191, + "id": 1350, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 1182, + "id": 1341, "modifierName": { "argumentTypes": null, - "id": 1181, + "id": 1340, "name": "onlyOperator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 920, - "src": "4706:12:8", + "referencedDeclaration": 1084, + "src": "4735:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "4706:12:8" + "src": "4735:12:5" } ], "name": "updateVerifier", "nodeType": "FunctionDefinition", "parameters": { - "id": 1180, + "id": 1339, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1179, + "id": 1338, "name": "_newVerifier", "nodeType": "VariableDeclaration", - "scope": 1191, - "src": "4675:20:8", + "scope": 1350, + "src": "4704:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4768,10 +4745,10 @@ "typeString": "address" }, "typeName": { - "id": 1178, + "id": 1337, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4675:7:8", + "src": "4704:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4782,42 +4759,42 @@ "visibility": "internal" } ], - "src": "4674:22:8" + "src": "4703:22:5" }, "returnParameters": { - "id": 1183, + "id": 1342, "nodeType": "ParameterList", "parameters": [], - "src": "4719:0:8" + "src": "4748:0:5" }, - "scope": 1204, - "src": "4651:113:8", + "scope": 1363, + "src": "4680:113:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { - "id": 1202, + "id": 1361, "nodeType": "Block", - "src": "4882:34:8", + "src": "4911:34:5", "statements": [ { "expression": { "argumentTypes": null, - "id": 1200, + "id": 1359, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 1198, + "id": 1357, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "4888:8:8", + "referencedDeclaration": 1072, + "src": "4917:8:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4827,67 +4804,67 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 1199, + "id": 1358, "name": "_newOperator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1193, - "src": "4899:12:8", + "referencedDeclaration": 1352, + "src": "4928:12:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4888:23:8", + "src": "4917:23:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1201, + "id": 1360, "nodeType": "ExpressionStatement", - "src": "4888:23:8" + "src": "4917:23:5" } ] }, "documentation": "@dev operator can change his address ", - "id": 1203, + "id": 1362, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 1196, + "id": 1355, "modifierName": { "argumentTypes": null, - "id": 1195, + "id": 1354, "name": "onlyOperator", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 920, - "src": "4869:12:8", + "referencedDeclaration": 1084, + "src": "4898:12:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "4869:12:8" + "src": "4898:12:5" } ], "name": "changeOperator", "nodeType": "FunctionDefinition", "parameters": { - "id": 1194, + "id": 1353, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1193, + "id": 1352, "name": "_newOperator", "nodeType": "VariableDeclaration", - "scope": 1203, - "src": "4838:20:8", + "scope": 1362, + "src": "4867:20:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4895,10 +4872,10 @@ "typeString": "address" }, "typeName": { - "id": 1192, + "id": 1351, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4838:7:8", + "src": "4867:7:5", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4909,39 +4886,39 @@ "visibility": "internal" } ], - "src": "4837:22:8" + "src": "4866:22:5" }, "returnParameters": { - "id": 1197, + "id": 1356, "nodeType": "ParameterList", "parameters": [], - "src": "4882:0:8" + "src": "4911:0:5" }, - "scope": 1204, - "src": "4814:102:8", + "scope": 1363, + "src": "4843:102:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], - "scope": 1205, - "src": "318:4600:8" + "scope": 1364, + "src": "383:4564:5" } ], - "src": "0:4919:8" + "src": "0:4948:5" }, "legacyAST": { "attributes": { "absolutePath": "/home/home/dotfiles/tornado-core/contracts/Tornado.sol", "exportedSymbols": { "IFeeManager": [ - 888 + 1052 ], "IVerifier": [ - 882 + 1041 ], "Tornado": [ - 1204 + 1363 ] } }, @@ -4954,39 +4931,39 @@ ".17" ] }, - "id": 868, + "id": 1027, "name": "PragmaDirective", - "src": "0:23:8" + "src": "0:23:5" }, { "attributes": { - "SourceUnit": 686, + "SourceUnit": 839, "absolutePath": "/home/home/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol", "file": "./MerkleTreeWithHistory.sol", - "scope": 1205, + "scope": 1364, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 869, + "id": 1028, "name": "ImportDirective", - "src": "25:37:8" + "src": "25:37:5" }, { "attributes": { - "SourceUnit": 3256, + "SourceUnit": 1394, "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "scope": 1205, + "scope": 1364, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 870, + "id": 1029, "name": "ImportDirective", - "src": "63:59:8" + "src": "63:59:5" }, { "attributes": { @@ -5000,10 +4977,10 @@ "documentation": null, "fullyImplemented": false, "linearizedBaseContracts": [ - 882 + 1041 ], "name": "IVerifier", - "scope": 1205 + "scope": 1364 }, "children": [ { @@ -5017,7 +4994,7 @@ null ], "name": "verifyProof", - "scope": 882, + "scope": 1041, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -5029,7 +5006,7 @@ "attributes": { "constant": false, "name": "_proof", - "scope": 881, + "scope": 1040, "stateVariable": false, "storageLocation": "memory", "type": "bytes", @@ -5042,20 +5019,20 @@ "name": "bytes", "type": "bytes" }, - "id": 871, + "id": 1030, "name": "ElementaryTypeName", - "src": "168:5:8" + "src": "168:5:5" } ], - "id": 872, + "id": 1031, "name": "VariableDeclaration", - "src": "168:19:8" + "src": "168:19:5" }, { "attributes": { "constant": false, "name": "_input", - "scope": 881, + "scope": 1040, "stateVariable": false, "storageLocation": "memory", "type": "uint256[6]", @@ -5073,9 +5050,9 @@ "name": "uint256", "type": "uint256" }, - "id": 873, + "id": 1032, "name": "ElementaryTypeName", - "src": "189:7:8" + "src": "189:7:5" }, { "attributes": { @@ -5090,24 +5067,24 @@ "type": "int_const 6", "value": "6" }, - "id": 874, + "id": 1033, "name": "Literal", - "src": "197:1:8" + "src": "197:1:5" } ], - "id": 875, + "id": 1034, "name": "ArrayTypeName", - "src": "189:10:8" + "src": "189:10:5" } ], - "id": 876, + "id": 1035, "name": "VariableDeclaration", - "src": "189:24:8" + "src": "189:24:5" } ], - "id": 877, + "id": 1036, "name": "ParameterList", - "src": "167:47:8" + "src": "167:47:5" }, { "children": [ @@ -5115,7 +5092,7 @@ "attributes": { "constant": false, "name": "", - "scope": 881, + "scope": 1040, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -5128,29 +5105,29 @@ "name": "bool", "type": "bool" }, - "id": 878, + "id": 1037, "name": "ElementaryTypeName", - "src": "230:4:8" + "src": "230:4:5" } ], - "id": 879, + "id": 1038, "name": "VariableDeclaration", - "src": "230:4:8" + "src": "230:4:5" } ], - "id": 880, + "id": 1039, "name": "ParameterList", - "src": "229:6:8" + "src": "229:6:5" } ], - "id": 881, + "id": 1040, "name": "FunctionDefinition", - "src": "147:89:8" + "src": "147:89:5" } ], - "id": 882, + "id": 1041, "name": "ContractDefinition", - "src": "124:114:8" + "src": "124:114:5" }, { "attributes": { @@ -5164,10 +5141,10 @@ "documentation": null, "fullyImplemented": false, "linearizedBaseContracts": [ - 888 + 1052 ], "name": "IFeeManager", - "scope": 1205 + "scope": 1364 }, "children": [ { @@ -5181,7 +5158,7 @@ null ], "name": "feeTo", - "scope": 888, + "scope": 1052, "stateMutability": "view", "superFunction": null, "visibility": "external" @@ -5194,9 +5171,9 @@ ] }, "children": [], - "id": 883, + "id": 1042, "name": "ParameterList", - "src": "279:2:8" + "src": "279:2:5" }, { "children": [ @@ -5204,7 +5181,7 @@ "attributes": { "constant": false, "name": "", - "scope": 887, + "scope": 1046, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5218,46 +5195,112 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 884, + "id": 1043, "name": "ElementaryTypeName", - "src": "305:7:8" + "src": "305:7:5" } ], - "id": 885, + "id": 1044, "name": "VariableDeclaration", - "src": "305:7:8" + "src": "305:7:5" } ], - "id": 886, + "id": 1045, "name": "ParameterList", - "src": "304:9:8" + "src": "304:9:5" } ], - "id": 887, + "id": 1046, "name": "FunctionDefinition", - "src": "265:49:8" + "src": "265:49:5" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "protocolFeeDivisor", + "scope": 1052, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1047, + "name": "ParameterList", + "src": "344:2:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1051, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1048, + "name": "ElementaryTypeName", + "src": "370:7:5" + } + ], + "id": 1049, + "name": "VariableDeclaration", + "src": "370:7:5" + } + ], + "id": 1050, + "name": "ParameterList", + "src": "369:9:5" + } + ], + "id": 1051, + "name": "FunctionDefinition", + "src": "317:62:5" } ], - "id": 888, + "id": 1052, "name": "ContractDefinition", - "src": "240:76:8" + "src": "240:141:5" }, { "attributes": { "contractDependencies": [ - 685, - 3255 + 838, + 1393 ], "contractKind": "contract", "documentation": null, "fullyImplemented": false, "linearizedBaseContracts": [ - 1204, - 3255, - 685 + 1363, + 1393, + 838 ], "name": "Tornado", - "scope": 1205 + "scope": 1364 }, "children": [ { @@ -5269,17 +5312,17 @@ "attributes": { "contractScope": null, "name": "MerkleTreeWithHistory", - "referencedDeclaration": 685, + "referencedDeclaration": 838, "type": "contract MerkleTreeWithHistory" }, - "id": 889, + "id": 1053, "name": "UserDefinedTypeName", - "src": "338:21:8" + "src": "403:21:5" } ], - "id": 890, + "id": 1054, "name": "InheritanceSpecifier", - "src": "338:21:8" + "src": "403:21:5" }, { "attributes": { @@ -5290,23 +5333,23 @@ "attributes": { "contractScope": null, "name": "ReentrancyGuard", - "referencedDeclaration": 3255, + "referencedDeclaration": 1393, "type": "contract ReentrancyGuard" }, - "id": 891, + "id": 1055, "name": "UserDefinedTypeName", - "src": "361:15:8" + "src": "426:15:5" } ], - "id": 892, + "id": 1056, "name": "InheritanceSpecifier", - "src": "361:15:8" + "src": "426:15:5" }, { "attributes": { "constant": false, "name": "denomination", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -5319,20 +5362,20 @@ "name": "uint256", "type": "uint256" }, - "id": 893, + "id": 1057, "name": "ElementaryTypeName", - "src": "381:7:8" + "src": "446:7:5" } ], - "id": 894, + "id": 1058, "name": "VariableDeclaration", - "src": "381:27:8" + "src": "446:27:5" }, { "attributes": { "constant": false, "name": "nullifierHashes", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => bool)", @@ -5350,34 +5393,34 @@ "name": "bytes32", "type": "bytes32" }, - "id": 895, + "id": 1059, "name": "ElementaryTypeName", - "src": "420:7:8" + "src": "485:7:5" }, { "attributes": { "name": "bool", "type": "bool" }, - "id": 896, + "id": 1060, "name": "ElementaryTypeName", - "src": "431:4:8" + "src": "496:4:5" } ], - "id": 897, + "id": 1061, "name": "Mapping", - "src": "412:24:8" + "src": "477:24:5" } ], - "id": 898, + "id": 1062, "name": "VariableDeclaration", - "src": "412:47:8" + "src": "477:47:5" }, { "attributes": { "constant": false, "name": "commitments", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => bool)", @@ -5395,34 +5438,34 @@ "name": "bytes32", "type": "bytes32" }, - "id": 899, + "id": 1063, "name": "ElementaryTypeName", - "src": "562:7:8" + "src": "627:7:5" }, { "attributes": { "name": "bool", "type": "bool" }, - "id": 900, + "id": 1064, "name": "ElementaryTypeName", - "src": "573:4:8" + "src": "638:4:5" } ], - "id": 901, + "id": 1065, "name": "Mapping", - "src": "554:24:8" + "src": "619:24:5" } ], - "id": 902, + "id": 1066, "name": "VariableDeclaration", - "src": "554:43:8" + "src": "619:43:5" }, { "attributes": { "constant": false, "name": "verifier", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "contract IVerifier", @@ -5434,23 +5477,23 @@ "attributes": { "contractScope": null, "name": "IVerifier", - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "contract IVerifier" }, - "id": 903, + "id": 1067, "name": "UserDefinedTypeName", - "src": "601:9:8" + "src": "666:9:5" } ], - "id": 904, + "id": 1068, "name": "VariableDeclaration", - "src": "601:25:8" + "src": "666:25:5" }, { "attributes": { "constant": false, "name": "feeManager", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "contract IFeeManager", @@ -5462,23 +5505,23 @@ "attributes": { "contractScope": null, "name": "IFeeManager", - "referencedDeclaration": 888, + "referencedDeclaration": 1052, "type": "contract IFeeManager" }, - "id": 905, + "id": 1069, "name": "UserDefinedTypeName", - "src": "630:11:8" + "src": "695:11:5" } ], - "id": 906, + "id": 1070, "name": "VariableDeclaration", - "src": "630:29:8" + "src": "695:29:5" }, { "attributes": { "constant": false, "name": "operator", - "scope": 1204, + "scope": 1363, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -5492,14 +5535,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 907, + "id": 1071, "name": "ElementaryTypeName", - "src": "819:7:8" + "src": "884:7:5" } ], - "id": 908, + "id": 1072, "name": "VariableDeclaration", - "src": "819:23:8" + "src": "884:23:5" }, { "attributes": { @@ -5515,9 +5558,9 @@ ] }, "children": [], - "id": 909, + "id": 1073, "name": "ParameterList", - "src": "868:0:8" + "src": "933:0:5" }, { "children": [ @@ -5551,16 +5594,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 910, + "id": 1074, "name": "Identifier", - "src": "874:7:8" + "src": "939:7:5" }, { "attributes": { @@ -5595,18 +5638,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3270, + "referencedDeclaration": 1408, "type": "msg", "value": "msg" }, - "id": 911, + "id": 1075, "name": "Identifier", - "src": "882:3:8" + "src": "947:3:5" } ], - "id": 912, + "id": 1076, "name": "MemberAccess", - "src": "882:10:8" + "src": "947:10:5" }, { "attributes": { @@ -5614,18 +5657,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 908, + "referencedDeclaration": 1072, "type": "address", "value": "operator" }, - "id": 913, + "id": 1077, "name": "Identifier", - "src": "896:8:8" + "src": "961:8:5" } ], - "id": 914, + "id": 1078, "name": "BinaryOperation", - "src": "882:22:8" + "src": "947:22:5" }, { "attributes": { @@ -5640,34 +5683,34 @@ "type": "literal_string \"Only operator can call this function.\"", "value": "Only operator can call this function." }, - "id": 915, + "id": 1079, "name": "Literal", - "src": "906:39:8" + "src": "971:39:5" } ], - "id": 916, + "id": 1080, "name": "FunctionCall", - "src": "874:72:8" + "src": "939:72:5" } ], - "id": 917, + "id": 1081, "name": "ExpressionStatement", - "src": "874:72:8" + "src": "939:72:5" }, { - "id": 918, + "id": 1082, "name": "PlaceholderStatement", - "src": "952:1:8" + "src": "1017:1:5" } ], - "id": 919, + "id": 1083, "name": "Block", - "src": "868:90:8" + "src": "933:90:5" } ], - "id": 920, + "id": 1084, "name": "ModifierDefinition", - "src": "846:112:8" + "src": "911:112:5" }, { "attributes": { @@ -5683,7 +5726,7 @@ "constant": false, "indexed": true, "name": "commitment", - "scope": 928, + "scope": 1092, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5696,21 +5739,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 921, + "id": 1085, "name": "ElementaryTypeName", - "src": "976:7:8" + "src": "1041:7:5" } ], - "id": 922, + "id": 1086, "name": "VariableDeclaration", - "src": "976:26:8" + "src": "1041:26:5" }, { "attributes": { "constant": false, "indexed": false, "name": "leafIndex", - "scope": 928, + "scope": 1092, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -5723,21 +5766,21 @@ "name": "uint32", "type": "uint32" }, - "id": 923, + "id": 1087, "name": "ElementaryTypeName", - "src": "1004:6:8" + "src": "1069:6:5" } ], - "id": 924, + "id": 1088, "name": "VariableDeclaration", - "src": "1004:16:8" + "src": "1069:16:5" }, { "attributes": { "constant": false, "indexed": false, "name": "timestamp", - "scope": 928, + "scope": 1092, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5750,24 +5793,24 @@ "name": "uint256", "type": "uint256" }, - "id": 925, + "id": 1089, "name": "ElementaryTypeName", - "src": "1022:7:8" + "src": "1087:7:5" } ], - "id": 926, + "id": 1090, "name": "VariableDeclaration", - "src": "1022:17:8" + "src": "1087:17:5" } ], - "id": 927, + "id": 1091, "name": "ParameterList", - "src": "975:65:8" + "src": "1040:65:5" } ], - "id": 928, + "id": 1092, "name": "EventDefinition", - "src": "962:79:8" + "src": "1027:79:5" }, { "attributes": { @@ -5783,7 +5826,7 @@ "constant": false, "indexed": false, "name": "to", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5797,21 +5840,21 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 929, + "id": 1093, "name": "ElementaryTypeName", - "src": "1061:7:8" + "src": "1126:7:5" } ], - "id": 930, + "id": 1094, "name": "VariableDeclaration", - "src": "1061:10:8" + "src": "1126:10:5" }, { "attributes": { "constant": false, "indexed": false, "name": "nullifierHash", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5824,21 +5867,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 931, + "id": 1095, "name": "ElementaryTypeName", - "src": "1073:7:8" + "src": "1138:7:5" } ], - "id": 932, + "id": 1096, "name": "VariableDeclaration", - "src": "1073:21:8" + "src": "1138:21:5" }, { "attributes": { "constant": false, "indexed": true, "name": "relayer", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5852,21 +5895,21 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 933, + "id": 1097, "name": "ElementaryTypeName", - "src": "1096:7:8" + "src": "1161:7:5" } ], - "id": 934, + "id": 1098, "name": "VariableDeclaration", - "src": "1096:23:8" + "src": "1161:23:5" }, { "attributes": { "constant": false, "indexed": false, "name": "fee", - "scope": 938, + "scope": 1102, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5879,24 +5922,24 @@ "name": "uint256", "type": "uint256" }, - "id": 935, + "id": 1099, "name": "ElementaryTypeName", - "src": "1121:7:8" + "src": "1186:7:5" } ], - "id": 936, + "id": 1100, "name": "VariableDeclaration", - "src": "1121:11:8" + "src": "1186:11:5" } ], - "id": 937, + "id": 1101, "name": "ParameterList", - "src": "1060:73:8" + "src": "1125:73:5" } ], - "id": 938, + "id": 1102, "name": "EventDefinition", - "src": "1044:90:8" + "src": "1109:90:5" }, { "attributes": { @@ -5905,7 +5948,7 @@ "isConstructor": true, "kind": "constructor", "name": "", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -5917,7 +5960,7 @@ "attributes": { "constant": false, "name": "_verifier", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "contract IVerifier", @@ -5929,23 +5972,23 @@ "attributes": { "contractScope": null, "name": "IVerifier", - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "contract IVerifier" }, - "id": 939, + "id": 1103, "name": "UserDefinedTypeName", - "src": "1450:9:8" + "src": "1515:9:5" } ], - "id": 940, + "id": 1104, "name": "VariableDeclaration", - "src": "1450:19:8" + "src": "1515:19:5" }, { "attributes": { "constant": false, "name": "_feeManager", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "contract IFeeManager", @@ -5957,23 +6000,23 @@ "attributes": { "contractScope": null, "name": "IFeeManager", - "referencedDeclaration": 888, + "referencedDeclaration": 1052, "type": "contract IFeeManager" }, - "id": 941, + "id": 1105, "name": "UserDefinedTypeName", - "src": "1475:11:8" + "src": "1540:11:5" } ], - "id": 942, + "id": 1106, "name": "VariableDeclaration", - "src": "1475:23:8" + "src": "1540:23:5" }, { "attributes": { "constant": false, "name": "_denomination", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5986,20 +6029,20 @@ "name": "uint256", "type": "uint256" }, - "id": 943, + "id": 1107, "name": "ElementaryTypeName", - "src": "1504:7:8" + "src": "1569:7:5" } ], - "id": 944, + "id": 1108, "name": "VariableDeclaration", - "src": "1504:21:8" + "src": "1569:21:5" }, { "attributes": { "constant": false, "name": "_merkleTreeHeight", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -6012,20 +6055,20 @@ "name": "uint32", "type": "uint32" }, - "id": 945, + "id": 1109, "name": "ElementaryTypeName", - "src": "1531:6:8" + "src": "1596:6:5" } ], - "id": 946, + "id": 1110, "name": "VariableDeclaration", - "src": "1531:24:8" + "src": "1596:24:5" }, { "attributes": { "constant": false, "name": "_operator", - "scope": 978, + "scope": 1142, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -6039,19 +6082,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 947, + "id": 1111, "name": "ElementaryTypeName", - "src": "1561:7:8" + "src": "1626:7:5" } ], - "id": 948, + "id": 1112, "name": "VariableDeclaration", - "src": "1561:17:8" + "src": "1626:17:5" } ], - "id": 949, + "id": 1113, "name": "ParameterList", - "src": "1444:138:8" + "src": "1509:138:5" }, { "attributes": { @@ -6060,9 +6103,9 @@ ] }, "children": [], - "id": 953, + "id": 1117, "name": "ParameterList", - "src": "1631:0:8" + "src": "1696:0:5" }, { "children": [ @@ -6072,13 +6115,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 685, + "referencedDeclaration": 838, "type": "type(contract MerkleTreeWithHistory)", "value": "MerkleTreeWithHistory" }, - "id": 950, + "id": 1114, "name": "Identifier", - "src": "1583:21:8" + "src": "1648:21:5" }, { "attributes": { @@ -6086,18 +6129,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 946, + "referencedDeclaration": 1110, "type": "uint32", "value": "_merkleTreeHeight" }, - "id": 951, + "id": 1115, "name": "Identifier", - "src": "1605:17:8" + "src": "1670:17:5" } ], - "id": 952, + "id": 1116, "name": "ModifierInvocation", - "src": "1583:40:8" + "src": "1648:40:5" }, { "children": [ @@ -6131,16 +6174,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 954, + "id": 1118, "name": "Identifier", - "src": "1637:7:8" + "src": "1702:7:5" }, { "attributes": { @@ -6163,13 +6206,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 944, + "referencedDeclaration": 1108, "type": "uint256", "value": "_denomination" }, - "id": 955, + "id": 1119, "name": "Identifier", - "src": "1645:13:8" + "src": "1710:13:5" }, { "attributes": { @@ -6184,14 +6227,14 @@ "type": "int_const 0", "value": "0" }, - "id": 956, + "id": 1120, "name": "Literal", - "src": "1661:1:8" + "src": "1726:1:5" } ], - "id": 957, + "id": 1121, "name": "BinaryOperation", - "src": "1645:17:8" + "src": "1710:17:5" }, { "attributes": { @@ -6206,19 +6249,19 @@ "type": "literal_string \"denomination should be greater than 0\"", "value": "denomination should be greater than 0" }, - "id": 958, + "id": 1122, "name": "Literal", - "src": "1664:39:8" + "src": "1729:39:5" } ], - "id": 959, + "id": 1123, "name": "FunctionCall", - "src": "1637:67:8" + "src": "1702:67:5" } ], - "id": 960, + "id": 1124, "name": "ExpressionStatement", - "src": "1637:67:8" + "src": "1702:67:5" }, { "children": [ @@ -6239,13 +6282,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 904, + "referencedDeclaration": 1068, "type": "contract IVerifier", "value": "verifier" }, - "id": 961, + "id": 1125, "name": "Identifier", - "src": "1710:8:8" + "src": "1775:8:5" }, { "attributes": { @@ -6253,23 +6296,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 940, + "referencedDeclaration": 1104, "type": "contract IVerifier", "value": "_verifier" }, - "id": 962, + "id": 1126, "name": "Identifier", - "src": "1721:9:8" + "src": "1786:9:5" } ], - "id": 963, + "id": 1127, "name": "Assignment", - "src": "1710:20:8" + "src": "1775:20:5" } ], - "id": 964, + "id": 1128, "name": "ExpressionStatement", - "src": "1710:20:8" + "src": "1775:20:5" }, { "children": [ @@ -6290,13 +6333,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 906, + "referencedDeclaration": 1070, "type": "contract IFeeManager", "value": "feeManager" }, - "id": 965, + "id": 1129, "name": "Identifier", - "src": "1736:10:8" + "src": "1801:10:5" }, { "attributes": { @@ -6304,23 +6347,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 942, + "referencedDeclaration": 1106, "type": "contract IFeeManager", "value": "_feeManager" }, - "id": 966, + "id": 1130, "name": "Identifier", - "src": "1749:11:8" + "src": "1814:11:5" } ], - "id": 967, + "id": 1131, "name": "Assignment", - "src": "1736:24:8" + "src": "1801:24:5" } ], - "id": 968, + "id": 1132, "name": "ExpressionStatement", - "src": "1736:24:8" + "src": "1801:24:5" }, { "children": [ @@ -6341,13 +6384,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 908, + "referencedDeclaration": 1072, "type": "address", "value": "operator" }, - "id": 969, + "id": 1133, "name": "Identifier", - "src": "1766:8:8" + "src": "1831:8:5" }, { "attributes": { @@ -6355,23 +6398,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 948, + "referencedDeclaration": 1112, "type": "address", "value": "_operator" }, - "id": 970, + "id": 1134, "name": "Identifier", - "src": "1777:9:8" + "src": "1842:9:5" } ], - "id": 971, + "id": 1135, "name": "Assignment", - "src": "1766:20:8" + "src": "1831:20:5" } ], - "id": 972, + "id": 1136, "name": "ExpressionStatement", - "src": "1766:20:8" + "src": "1831:20:5" }, { "children": [ @@ -6392,13 +6435,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 894, + "referencedDeclaration": 1058, "type": "uint256", "value": "denomination" }, - "id": 973, + "id": 1137, "name": "Identifier", - "src": "1792:12:8" + "src": "1857:12:5" }, { "attributes": { @@ -6406,33 +6449,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 944, + "referencedDeclaration": 1108, "type": "uint256", "value": "_denomination" }, - "id": 974, + "id": 1138, "name": "Identifier", - "src": "1807:13:8" + "src": "1872:13:5" } ], - "id": 975, + "id": 1139, "name": "Assignment", - "src": "1792:28:8" + "src": "1857:28:5" } ], - "id": 976, + "id": 1140, "name": "ExpressionStatement", - "src": "1792:28:8" + "src": "1857:28:5" } ], - "id": 977, + "id": 1141, "name": "Block", - "src": "1631:194:8" + "src": "1696:194:5" } ], - "id": 978, + "id": 1142, "name": "FunctionDefinition", - "src": "1433:392:8" + "src": "1498:392:5" }, { "attributes": { @@ -6441,7 +6484,7 @@ "isConstructor": false, "kind": "function", "name": "deposit", - "scope": 1204, + "scope": 1363, "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -6453,7 +6496,7 @@ "attributes": { "constant": false, "name": "_commitment", - "scope": 1016, + "scope": 1180, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -6466,19 +6509,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 979, + "id": 1143, "name": "ElementaryTypeName", - "src": "2090:7:8" + "src": "2155:7:5" } ], - "id": 980, + "id": 1144, "name": "VariableDeclaration", - "src": "2090:19:8" + "src": "2155:19:5" } ], - "id": 981, + "id": 1145, "name": "ParameterList", - "src": "2089:21:8" + "src": "2154:21:5" }, { "attributes": { @@ -6487,9 +6530,9 @@ ] }, "children": [], - "id": 984, + "id": 1148, "name": "ParameterList", - "src": "2141:0:8" + "src": "2206:0:5" }, { "attributes": { @@ -6502,18 +6545,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3254, + "referencedDeclaration": 1392, "type": "modifier ()", "value": "nonReentrant" }, - "id": 982, + "id": 1146, "name": "Identifier", - "src": "2128:12:8" + "src": "2193:12:5" } ], - "id": 983, + "id": 1147, "name": "ModifierInvocation", - "src": "2128:12:8" + "src": "2193:12:5" }, { "children": [ @@ -6547,16 +6590,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 985, + "id": 1149, "name": "Identifier", - "src": "2147:7:8" + "src": "2212:7:5" }, { "attributes": { @@ -6586,13 +6629,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 902, + "referencedDeclaration": 1066, "type": "mapping(bytes32 => bool)", "value": "commitments" }, - "id": 986, + "id": 1150, "name": "Identifier", - "src": "2156:11:8" + "src": "2221:11:5" }, { "attributes": { @@ -6600,23 +6643,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 987, + "id": 1151, "name": "Identifier", - "src": "2168:11:8" + "src": "2233:11:5" } ], - "id": 988, + "id": 1152, "name": "IndexAccess", - "src": "2156:24:8" + "src": "2221:24:5" } ], - "id": 989, + "id": 1153, "name": "UnaryOperation", - "src": "2155:25:8" + "src": "2220:25:5" }, { "attributes": { @@ -6631,24 +6674,24 @@ "type": "literal_string \"The commitment has been submitted\"", "value": "The commitment has been submitted" }, - "id": 990, + "id": 1154, "name": "Literal", - "src": "2182:35:8" + "src": "2247:35:5" } ], - "id": 991, + "id": 1155, "name": "FunctionCall", - "src": "2147:71:8" + "src": "2212:71:5" } ], - "id": 992, + "id": 1156, "name": "ExpressionStatement", - "src": "2147:71:8" + "src": "2212:71:5" }, { "attributes": { "assignments": [ - 994 + 1158 ] }, "children": [ @@ -6656,7 +6699,7 @@ "attributes": { "constant": false, "name": "insertedIndex", - "scope": 1015, + "scope": 1179, "stateVariable": false, "storageLocation": "default", "type": "uint32", @@ -6669,14 +6712,14 @@ "name": "uint32", "type": "uint32" }, - "id": 993, + "id": 1157, "name": "ElementaryTypeName", - "src": "2225:6:8" + "src": "2290:6:5" } ], - "id": 994, + "id": 1158, "name": "VariableDeclaration", - "src": "2225:20:8" + "src": "2290:20:5" }, { "attributes": { @@ -6704,13 +6747,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 627, + "referencedDeclaration": 780, "type": "function (bytes32) returns (uint32)", "value": "_insert" }, - "id": 995, + "id": 1159, "name": "Identifier", - "src": "2248:7:8" + "src": "2313:7:5" }, { "attributes": { @@ -6718,23 +6761,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 996, + "id": 1160, "name": "Identifier", - "src": "2256:11:8" + "src": "2321:11:5" } ], - "id": 997, + "id": 1161, "name": "FunctionCall", - "src": "2248:20:8" + "src": "2313:20:5" } ], - "id": 998, + "id": 1162, "name": "VariableDeclarationStatement", - "src": "2225:43:8" + "src": "2290:43:5" }, { "children": [ @@ -6765,13 +6808,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 902, + "referencedDeclaration": 1066, "type": "mapping(bytes32 => bool)", "value": "commitments" }, - "id": 999, + "id": 1163, "name": "Identifier", - "src": "2274:11:8" + "src": "2339:11:5" }, { "attributes": { @@ -6779,18 +6822,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 1000, + "id": 1164, "name": "Identifier", - "src": "2286:11:8" + "src": "2351:11:5" } ], - "id": 1001, + "id": 1165, "name": "IndexAccess", - "src": "2274:24:8" + "src": "2339:24:5" }, { "attributes": { @@ -6805,19 +6848,19 @@ "type": "bool", "value": "true" }, - "id": 1002, + "id": 1166, "name": "Literal", - "src": "2301:4:8" + "src": "2366:4:5" } ], - "id": 1003, + "id": 1167, "name": "Assignment", - "src": "2274:31:8" + "src": "2339:31:5" } ], - "id": 1004, + "id": 1168, "name": "ExpressionStatement", - "src": "2274:31:8" + "src": "2339:31:5" }, { "children": [ @@ -6847,23 +6890,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1019, + "referencedDeclaration": 1183, "type": "function ()", "value": "_processDeposit" }, - "id": 1005, + "id": 1169, "name": "Identifier", - "src": "2311:15:8" + "src": "2376:15:5" } ], - "id": 1006, + "id": 1170, "name": "FunctionCall", - "src": "2311:17:8" + "src": "2376:17:5" } ], - "id": 1007, + "id": 1171, "name": "ExpressionStatement", - "src": "2311:17:8" + "src": "2376:17:5" }, { "children": [ @@ -6901,13 +6944,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 928, + "referencedDeclaration": 1092, "type": "function (bytes32,uint32,uint256)", "value": "Deposit" }, - "id": 1008, + "id": 1172, "name": "Identifier", - "src": "2340:7:8" + "src": "2405:7:5" }, { "attributes": { @@ -6915,13 +6958,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 980, + "referencedDeclaration": 1144, "type": "bytes32", "value": "_commitment" }, - "id": 1009, + "id": 1173, "name": "Identifier", - "src": "2348:11:8" + "src": "2413:11:5" }, { "attributes": { @@ -6929,13 +6972,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 994, + "referencedDeclaration": 1158, "type": "uint32", "value": "insertedIndex" }, - "id": 1010, + "id": 1174, "name": "Identifier", - "src": "2361:13:8" + "src": "2426:13:5" }, { "attributes": { @@ -6955,38 +6998,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3260, + "referencedDeclaration": 1398, "type": "block", "value": "block" }, - "id": 1011, + "id": 1175, "name": "Identifier", - "src": "2376:5:8" + "src": "2441:5:5" } ], - "id": 1012, + "id": 1176, "name": "MemberAccess", - "src": "2376:15:8" + "src": "2441:15:5" } ], - "id": 1013, + "id": 1177, "name": "FunctionCall", - "src": "2340:52:8" + "src": "2405:52:5" } ], - "id": 1014, + "id": 1178, "name": "EmitStatement", - "src": "2335:57:8" + "src": "2400:57:5" } ], - "id": 1015, + "id": 1179, "name": "Block", - "src": "2141:256:8" + "src": "2206:256:5" } ], - "id": 1016, + "id": 1180, "name": "FunctionDefinition", - "src": "2073:324:8" + "src": "2138:324:5" }, { "attributes": { @@ -6999,7 +7042,7 @@ null ], "name": "_processDeposit", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" @@ -7012,9 +7055,9 @@ ] }, "children": [], - "id": 1017, + "id": 1181, "name": "ParameterList", - "src": "2484:2:8" + "src": "2549:2:5" }, { "attributes": { @@ -7023,14 +7066,14 @@ ] }, "children": [], - "id": 1018, + "id": 1182, "name": "ParameterList", - "src": "2495:0:8" + "src": "2560:0:5" } ], - "id": 1019, + "id": 1183, "name": "FunctionDefinition", - "src": "2460:36:8" + "src": "2525:36:5" }, { "attributes": { @@ -7039,7 +7082,7 @@ "isConstructor": false, "kind": "function", "name": "withdraw", - "scope": 1204, + "scope": 1363, "stateMutability": "payable", "superFunction": null, "visibility": "external" @@ -7051,7 +7094,7 @@ "attributes": { "constant": false, "name": "_proof", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "calldata", "type": "bytes", @@ -7064,20 +7107,20 @@ "name": "bytes", "type": "bytes" }, - "id": 1020, + "id": 1184, "name": "ElementaryTypeName", - "src": "2911:5:8" + "src": "2976:5:5" } ], - "id": 1021, + "id": 1185, "name": "VariableDeclaration", - "src": "2911:21:8" + "src": "2976:21:5" }, { "attributes": { "constant": false, "name": "_root", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7090,20 +7133,20 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1022, + "id": 1186, "name": "ElementaryTypeName", - "src": "2934:7:8" + "src": "2999:7:5" } ], - "id": 1023, + "id": 1187, "name": "VariableDeclaration", - "src": "2934:13:8" + "src": "2999:13:5" }, { "attributes": { "constant": false, "name": "_nullifierHash", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7116,20 +7159,20 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1024, + "id": 1188, "name": "ElementaryTypeName", - "src": "2949:7:8" + "src": "3014:7:5" } ], - "id": 1025, + "id": 1189, "name": "VariableDeclaration", - "src": "2949:22:8" + "src": "3014:22:5" }, { "attributes": { "constant": false, "name": "_recipient", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -7143,20 +7186,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1026, + "id": 1190, "name": "ElementaryTypeName", - "src": "2973:15:8" + "src": "3038:15:5" } ], - "id": 1027, + "id": 1191, "name": "VariableDeclaration", - "src": "2973:26:8" + "src": "3038:26:5" }, { "attributes": { "constant": false, "name": "_relayer", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -7170,20 +7213,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1028, + "id": 1192, "name": "ElementaryTypeName", - "src": "3001:15:8" + "src": "3066:15:5" } ], - "id": 1029, + "id": 1193, "name": "VariableDeclaration", - "src": "3001:24:8" + "src": "3066:24:5" }, { "attributes": { "constant": false, "name": "_fee", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -7196,20 +7239,20 @@ "name": "uint256", "type": "uint256" }, - "id": 1030, + "id": 1194, "name": "ElementaryTypeName", - "src": "3027:7:8" + "src": "3092:7:5" } ], - "id": 1031, + "id": 1195, "name": "VariableDeclaration", - "src": "3027:12:8" + "src": "3092:12:5" }, { "attributes": { "constant": false, "name": "_refund", - "scope": 1107, + "scope": 1268, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -7222,19 +7265,19 @@ "name": "uint256", "type": "uint256" }, - "id": 1032, + "id": 1196, "name": "ElementaryTypeName", - "src": "3041:7:8" + "src": "3106:7:5" } ], - "id": 1033, + "id": 1197, "name": "VariableDeclaration", - "src": "3041:15:8" + "src": "3106:15:5" } ], - "id": 1034, + "id": 1198, "name": "ParameterList", - "src": "2910:147:8" + "src": "2975:147:5" }, { "attributes": { @@ -7243,9 +7286,9 @@ ] }, "children": [], - "id": 1037, + "id": 1201, "name": "ParameterList", - "src": "3088:0:8" + "src": "3153:0:5" }, { "attributes": { @@ -7258,18 +7301,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 3254, + "referencedDeclaration": 1392, "type": "modifier ()", "value": "nonReentrant" }, - "id": 1035, + "id": 1199, "name": "Identifier", - "src": "3075:12:8" + "src": "3140:12:5" } ], - "id": 1036, + "id": 1200, "name": "ModifierInvocation", - "src": "3075:12:8" + "src": "3140:12:5" }, { "children": [ @@ -7303,16 +7346,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1038, + "id": 1202, "name": "Identifier", - "src": "3094:7:8" + "src": "3159:7:5" }, { "attributes": { @@ -7335,13 +7378,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1039, + "id": 1203, "name": "Identifier", - "src": "3102:4:8" + "src": "3167:4:5" }, { "attributes": { @@ -7349,18 +7392,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 894, + "referencedDeclaration": 1058, "type": "uint256", "value": "denomination" }, - "id": 1040, + "id": 1204, "name": "Identifier", - "src": "3110:12:8" + "src": "3175:12:5" } ], - "id": 1041, + "id": 1205, "name": "BinaryOperation", - "src": "3102:20:8" + "src": "3167:20:5" }, { "attributes": { @@ -7375,19 +7418,19 @@ "type": "literal_string \"Fee exceeds transfer value\"", "value": "Fee exceeds transfer value" }, - "id": 1042, + "id": 1206, "name": "Literal", - "src": "3124:28:8" + "src": "3189:28:5" } ], - "id": 1043, + "id": 1207, "name": "FunctionCall", - "src": "3094:59:8" + "src": "3159:59:5" } ], - "id": 1044, + "id": 1208, "name": "ExpressionStatement", - "src": "3094:59:8" + "src": "3159:59:5" }, { "children": [ @@ -7419,16 +7462,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1045, + "id": 1209, "name": "Identifier", - "src": "3159:7:8" + "src": "3224:7:5" }, { "attributes": { @@ -7458,13 +7501,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 898, + "referencedDeclaration": 1062, "type": "mapping(bytes32 => bool)", "value": "nullifierHashes" }, - "id": 1046, + "id": 1210, "name": "Identifier", - "src": "3168:15:8" + "src": "3233:15:5" }, { "attributes": { @@ -7472,23 +7515,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1047, + "id": 1211, "name": "Identifier", - "src": "3184:14:8" + "src": "3249:14:5" } ], - "id": 1048, + "id": 1212, "name": "IndexAccess", - "src": "3168:31:8" + "src": "3233:31:5" } ], - "id": 1049, + "id": 1213, "name": "UnaryOperation", - "src": "3167:32:8" + "src": "3232:32:5" }, { "attributes": { @@ -7503,19 +7546,19 @@ "type": "literal_string \"The note has been already spent\"", "value": "The note has been already spent" }, - "id": 1050, + "id": 1214, "name": "Literal", - "src": "3201:33:8" + "src": "3266:33:5" } ], - "id": 1051, + "id": 1215, "name": "FunctionCall", - "src": "3159:76:8" + "src": "3224:76:5" } ], - "id": 1052, + "id": 1216, "name": "ExpressionStatement", - "src": "3159:76:8" + "src": "3224:76:5" }, { "children": [ @@ -7547,16 +7590,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1053, + "id": 1217, "name": "Identifier", - "src": "3241:7:8" + "src": "3306:7:5" }, { "attributes": { @@ -7584,13 +7627,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 674, + "referencedDeclaration": 827, "type": "function (bytes32) view returns (bool)", "value": "isKnownRoot" }, - "id": 1054, + "id": 1218, "name": "Identifier", - "src": "3249:11:8" + "src": "3314:11:5" }, { "attributes": { @@ -7598,18 +7641,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1023, + "referencedDeclaration": 1187, "type": "bytes32", "value": "_root" }, - "id": 1055, + "id": 1219, "name": "Identifier", - "src": "3261:5:8" + "src": "3326:5:5" } ], - "id": 1056, + "id": 1220, "name": "FunctionCall", - "src": "3249:18:8" + "src": "3314:18:5" }, { "attributes": { @@ -7624,19 +7667,19 @@ "type": "literal_string \"Cannot find your merkle root\"", "value": "Cannot find your merkle root" }, - "id": 1057, + "id": 1221, "name": "Literal", - "src": "3269:30:8" + "src": "3334:30:5" } ], - "id": 1058, + "id": 1222, "name": "FunctionCall", - "src": "3241:59:8" + "src": "3306:59:5" } ], - "id": 1059, + "id": 1223, "name": "ExpressionStatement", - "src": "3241:59:8" + "src": "3306:59:5" }, { "children": [ @@ -7668,16 +7711,16 @@ } ], "overloadedDeclarations": [ - 3273, - 3274 + 1411, + 1412 ], - "referencedDeclaration": 3274, + "referencedDeclaration": 1412, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1060, + "id": 1224, "name": "Identifier", - "src": "3339:7:8" + "src": "3404:7:5" }, { "attributes": { @@ -7711,7 +7754,7 @@ "isPure": false, "lValueRequested": false, "member_name": "verifyProof", - "referencedDeclaration": 881, + "referencedDeclaration": 1040, "type": "function (bytes memory,uint256[6] memory) external returns (bool)" }, "children": [ @@ -7721,18 +7764,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 904, + "referencedDeclaration": 1068, "type": "contract IVerifier", "value": "verifier" }, - "id": 1061, + "id": 1225, "name": "Identifier", - "src": "3347:8:8" + "src": "3412:8:5" } ], - "id": 1062, + "id": 1226, "name": "MemberAccess", - "src": "3347:20:8" + "src": "3412:20:5" }, { "attributes": { @@ -7740,13 +7783,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1021, + "referencedDeclaration": 1185, "type": "bytes calldata", "value": "_proof" }, - "id": 1063, + "id": 1227, "name": "Identifier", - "src": "3368:6:8" + "src": "3433:6:5" }, { "attributes": { @@ -7789,9 +7832,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1064, + "id": 1228, "name": "ElementaryTypeNameExpression", - "src": "3377:7:8" + "src": "3442:7:5" }, { "attributes": { @@ -7799,18 +7842,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1023, + "referencedDeclaration": 1187, "type": "bytes32", "value": "_root" }, - "id": 1065, + "id": 1229, "name": "Identifier", - "src": "3385:5:8" + "src": "3450:5:5" } ], - "id": 1066, + "id": 1230, "name": "FunctionCall", - "src": "3377:14:8" + "src": "3442:14:5" }, { "attributes": { @@ -7842,9 +7885,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1067, + "id": 1231, "name": "ElementaryTypeNameExpression", - "src": "3393:7:8" + "src": "3458:7:5" }, { "attributes": { @@ -7852,18 +7895,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1068, + "id": 1232, "name": "Identifier", - "src": "3401:14:8" + "src": "3466:14:5" } ], - "id": 1069, + "id": 1233, "name": "FunctionCall", - "src": "3393:23:8" + "src": "3458:23:5" }, { "attributes": { @@ -7895,9 +7938,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1070, + "id": 1234, "name": "ElementaryTypeNameExpression", - "src": "3418:7:8" + "src": "3483:7:5" }, { "attributes": { @@ -7905,18 +7948,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1027, + "referencedDeclaration": 1191, "type": "address payable", "value": "_recipient" }, - "id": 1071, + "id": 1235, "name": "Identifier", - "src": "3426:10:8" + "src": "3491:10:5" } ], - "id": 1072, + "id": 1236, "name": "FunctionCall", - "src": "3418:19:8" + "src": "3483:19:5" }, { "attributes": { @@ -7948,9 +7991,9 @@ "type": "type(uint256)", "value": "uint256" }, - "id": 1073, + "id": 1237, "name": "ElementaryTypeNameExpression", - "src": "3439:7:8" + "src": "3504:7:5" }, { "attributes": { @@ -7958,18 +8001,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1029, + "referencedDeclaration": 1193, "type": "address payable", "value": "_relayer" }, - "id": 1074, + "id": 1238, "name": "Identifier", - "src": "3447:8:8" + "src": "3512:8:5" } ], - "id": 1075, + "id": 1239, "name": "FunctionCall", - "src": "3439:17:8" + "src": "3504:17:5" }, { "attributes": { @@ -7977,13 +8020,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1076, + "id": 1240, "name": "Identifier", - "src": "3458:4:8" + "src": "3523:4:5" }, { "attributes": { @@ -7991,23 +8034,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1033, + "referencedDeclaration": 1197, "type": "uint256", "value": "_refund" }, - "id": 1077, + "id": 1241, "name": "Identifier", - "src": "3464:7:8" + "src": "3529:7:5" } ], - "id": 1078, + "id": 1242, "name": "TupleExpression", - "src": "3376:96:8" + "src": "3441:96:5" } ], - "id": 1079, + "id": 1243, "name": "FunctionCall", - "src": "3347:126:8" + "src": "3412:126:5" }, { "attributes": { @@ -8022,19 +8065,19 @@ "type": "literal_string \"Invalid withdraw proof\"", "value": "Invalid withdraw proof" }, - "id": 1080, + "id": 1244, "name": "Literal", - "src": "3475:24:8" + "src": "3540:24:5" } ], - "id": 1081, + "id": 1245, "name": "FunctionCall", - "src": "3339:161:8" + "src": "3404:161:5" } ], - "id": 1082, + "id": 1246, "name": "ExpressionStatement", - "src": "3339:161:8" + "src": "3404:161:5" }, { "children": [ @@ -8065,13 +8108,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 898, + "referencedDeclaration": 1062, "type": "mapping(bytes32 => bool)", "value": "nullifierHashes" }, - "id": 1083, + "id": 1247, "name": "Identifier", - "src": "3507:15:8" + "src": "3572:15:5" }, { "attributes": { @@ -8079,18 +8122,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1084, + "id": 1248, "name": "Identifier", - "src": "3523:14:8" + "src": "3588:14:5" } ], - "id": 1085, + "id": 1249, "name": "IndexAccess", - "src": "3507:31:8" + "src": "3572:31:5" }, { "attributes": { @@ -8105,19 +8148,19 @@ "type": "bool", "value": "true" }, - "id": 1086, + "id": 1250, "name": "Literal", - "src": "3541:4:8" + "src": "3606:4:5" } ], - "id": 1087, + "id": 1251, "name": "Assignment", - "src": "3507:38:8" + "src": "3572:38:5" } ], - "id": 1088, + "id": 1252, "name": "ExpressionStatement", - "src": "3507:38:8" + "src": "3572:38:5" }, { "children": [ @@ -8154,22 +8197,18 @@ { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" } ], "overloadedDeclarations": [ null ], - "referencedDeclaration": 1120, - "type": "function (address payable,address payable,uint256,uint256,address)", + "referencedDeclaration": 1279, + "type": "function (address payable,address payable,uint256,uint256)", "value": "_processWithdraw" }, - "id": 1089, + "id": 1253, "name": "Identifier", - "src": "3551:16:8" + "src": "3616:16:5" }, { "attributes": { @@ -8177,13 +8216,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1027, + "referencedDeclaration": 1191, "type": "address payable", "value": "_recipient" }, - "id": 1090, + "id": 1254, "name": "Identifier", - "src": "3568:10:8" + "src": "3633:10:5" }, { "attributes": { @@ -8191,13 +8230,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1029, + "referencedDeclaration": 1193, "type": "address payable", "value": "_relayer" }, - "id": 1091, + "id": 1255, "name": "Identifier", - "src": "3580:8:8" + "src": "3645:8:5" }, { "attributes": { @@ -8205,13 +8244,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1092, + "id": 1256, "name": "Identifier", - "src": "3590:4:8" + "src": "3655:4:5" }, { "attributes": { @@ -8219,79 +8258,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1033, + "referencedDeclaration": 1197, "type": "uint256", "value": "_refund" }, - "id": 1093, + "id": 1257, "name": "Identifier", - "src": "3596:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "feeTo", - "referencedDeclaration": 887, - "type": "function () view external returns (address)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 906, - "type": "contract IFeeManager", - "value": "feeManager" - }, - "id": 1094, - "name": "Identifier", - "src": "3605:10:8" - } - ], - "id": 1095, - "name": "MemberAccess", - "src": "3605:16:8" - } - ], - "id": 1096, - "name": "FunctionCall", - "src": "3605:18:8" + "src": "3661:7:5" } ], - "id": 1097, + "id": 1258, "name": "FunctionCall", - "src": "3551:73:8" + "src": "3616:53:5" } ], - "id": 1098, + "id": 1259, "name": "ExpressionStatement", - "src": "3551:73:8" + "src": "3616:53:5" }, { "children": [ @@ -8333,13 +8316,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 938, + "referencedDeclaration": 1102, "type": "function (address,bytes32,address,uint256)", "value": "Withdrawal" }, - "id": 1099, + "id": 1260, "name": "Identifier", - "src": "3635:10:8" + "src": "3680:10:5" }, { "attributes": { @@ -8347,13 +8330,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1027, + "referencedDeclaration": 1191, "type": "address payable", "value": "_recipient" }, - "id": 1100, + "id": 1261, "name": "Identifier", - "src": "3646:10:8" + "src": "3691:10:5" }, { "attributes": { @@ -8361,13 +8344,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1025, + "referencedDeclaration": 1189, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1101, + "id": 1262, "name": "Identifier", - "src": "3658:14:8" + "src": "3703:14:5" }, { "attributes": { @@ -8375,13 +8358,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1029, + "referencedDeclaration": 1193, "type": "address payable", "value": "_relayer" }, - "id": 1102, + "id": 1263, "name": "Identifier", - "src": "3674:8:8" + "src": "3719:8:5" }, { "attributes": { @@ -8389,33 +8372,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1031, + "referencedDeclaration": 1195, "type": "uint256", "value": "_fee" }, - "id": 1103, + "id": 1264, "name": "Identifier", - "src": "3684:4:8" + "src": "3729:4:5" } ], - "id": 1104, + "id": 1265, "name": "FunctionCall", - "src": "3635:54:8" + "src": "3680:54:5" } ], - "id": 1105, + "id": 1266, "name": "EmitStatement", - "src": "3630:59:8" + "src": "3675:59:5" } ], - "id": 1106, + "id": 1267, "name": "Block", - "src": "3088:606:8" + "src": "3153:586:5" } ], - "id": 1107, + "id": 1268, "name": "FunctionDefinition", - "src": "2893:801:8" + "src": "2958:781:5" }, { "attributes": { @@ -8428,7 +8411,7 @@ null ], "name": "_processWithdraw", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" @@ -8440,7 +8423,7 @@ "attributes": { "constant": false, "name": "_recipient", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -8454,20 +8437,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1108, + "id": 1269, "name": "ElementaryTypeName", - "src": "3783:15:8" + "src": "3828:15:5" } ], - "id": 1109, + "id": 1270, "name": "VariableDeclaration", - "src": "3783:26:8" + "src": "3828:26:5" }, { "attributes": { "constant": false, "name": "_relayer", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "address payable", @@ -8481,20 +8464,20 @@ "stateMutability": "payable", "type": "address payable" }, - "id": 1110, + "id": 1271, "name": "ElementaryTypeName", - "src": "3811:15:8" + "src": "3856:15:5" } ], - "id": 1111, + "id": 1272, "name": "VariableDeclaration", - "src": "3811:24:8" + "src": "3856:24:5" }, { "attributes": { "constant": false, "name": "_relayer_fee", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8507,20 +8490,20 @@ "name": "uint256", "type": "uint256" }, - "id": 1112, + "id": 1273, "name": "ElementaryTypeName", - "src": "3837:7:8" + "src": "3882:7:5" } ], - "id": 1113, + "id": 1274, "name": "VariableDeclaration", - "src": "3837:20:8" + "src": "3882:20:5" }, { "attributes": { "constant": false, "name": "_refund", - "scope": 1120, + "scope": 1279, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8533,46 +8516,19 @@ "name": "uint256", "type": "uint256" }, - "id": 1114, + "id": 1275, "name": "ElementaryTypeName", - "src": "3859:7:8" + "src": "3904:7:5" } ], - "id": 1115, + "id": 1276, "name": "VariableDeclaration", - "src": "3859:15:8" - }, - { - "attributes": { - "constant": false, - "name": "_feeTo", - "scope": 1120, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1116, - "name": "ElementaryTypeName", - "src": "3876:7:8" - } - ], - "id": 1117, - "name": "VariableDeclaration", - "src": "3876:14:8" + "src": "3904:15:5" } ], - "id": 1118, + "id": 1277, "name": "ParameterList", - "src": "3782:109:8" + "src": "3827:93:5" }, { "attributes": { @@ -8581,14 +8537,14 @@ ] }, "children": [], - "id": 1119, + "id": 1278, "name": "ParameterList", - "src": "3900:0:8" + "src": "3929:0:5" } ], - "id": 1120, + "id": 1279, "name": "FunctionDefinition", - "src": "3757:144:8" + "src": "3802:128:5" }, { "attributes": { @@ -8600,7 +8556,7 @@ null ], "name": "isSpent", - "scope": 1204, + "scope": 1363, "stateMutability": "view", "superFunction": null, "visibility": "public" @@ -8612,7 +8568,7 @@ "attributes": { "constant": false, "name": "_nullifierHash", - "scope": 1132, + "scope": 1291, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8625,19 +8581,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1121, + "id": 1280, "name": "ElementaryTypeName", - "src": "3968:7:8" + "src": "3997:7:5" } ], - "id": 1122, + "id": 1281, "name": "VariableDeclaration", - "src": "3968:22:8" + "src": "3997:22:5" } ], - "id": 1123, + "id": 1282, "name": "ParameterList", - "src": "3967:24:8" + "src": "3996:24:5" }, { "children": [ @@ -8645,7 +8601,7 @@ "attributes": { "constant": false, "name": "", - "scope": 1132, + "scope": 1291, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -8658,25 +8614,25 @@ "name": "bool", "type": "bool" }, - "id": 1124, + "id": 1283, "name": "ElementaryTypeName", - "src": "4012:4:8" + "src": "4041:4:5" } ], - "id": 1125, + "id": 1284, "name": "VariableDeclaration", - "src": "4012:4:8" + "src": "4041:4:5" } ], - "id": 1126, + "id": 1285, "name": "ParameterList", - "src": "4011:6:8" + "src": "4040:6:5" }, { "children": [ { "attributes": { - "functionReturnParameters": 1126 + "functionReturnParameters": 1285 }, "children": [ { @@ -8695,13 +8651,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 898, + "referencedDeclaration": 1062, "type": "mapping(bytes32 => bool)", "value": "nullifierHashes" }, - "id": 1127, + "id": 1286, "name": "Identifier", - "src": "4031:15:8" + "src": "4060:15:5" }, { "attributes": { @@ -8709,33 +8665,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1122, + "referencedDeclaration": 1281, "type": "bytes32", "value": "_nullifierHash" }, - "id": 1128, + "id": 1287, "name": "Identifier", - "src": "4047:14:8" + "src": "4076:14:5" } ], - "id": 1129, + "id": 1288, "name": "IndexAccess", - "src": "4031:31:8" + "src": "4060:31:5" } ], - "id": 1130, + "id": 1289, "name": "Return", - "src": "4024:38:8" + "src": "4053:38:5" } ], - "id": 1131, + "id": 1290, "name": "Block", - "src": "4018:49:8" + "src": "4047:49:5" } ], - "id": 1132, + "id": 1291, "name": "FunctionDefinition", - "src": "3951:116:8" + "src": "3980:116:5" }, { "attributes": { @@ -8747,7 +8703,7 @@ null ], "name": "isSpentArray", - "scope": 1204, + "scope": 1363, "stateMutability": "view", "superFunction": null, "visibility": "external" @@ -8759,7 +8715,7 @@ "attributes": { "constant": false, "name": "_nullifierHashes", - "scope": 1177, + "scope": 1336, "stateVariable": false, "storageLocation": "calldata", "type": "bytes32[]", @@ -8778,24 +8734,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1133, + "id": 1292, "name": "ElementaryTypeName", - "src": "4150:7:8" + "src": "4179:7:5" } ], - "id": 1134, + "id": 1293, "name": "ArrayTypeName", - "src": "4150:9:8" + "src": "4179:9:5" } ], - "id": 1135, + "id": 1294, "name": "VariableDeclaration", - "src": "4150:35:8" + "src": "4179:35:5" } ], - "id": 1136, + "id": 1295, "name": "ParameterList", - "src": "4149:37:8" + "src": "4178:37:5" }, { "children": [ @@ -8803,7 +8759,7 @@ "attributes": { "constant": false, "name": "spent", - "scope": 1177, + "scope": 1336, "stateVariable": false, "storageLocation": "memory", "type": "bool[]", @@ -8822,24 +8778,24 @@ "name": "bool", "type": "bool" }, - "id": 1137, + "id": 1296, "name": "ElementaryTypeName", - "src": "4209:4:8" + "src": "4238:4:5" } ], - "id": 1138, + "id": 1297, "name": "ArrayTypeName", - "src": "4209:6:8" + "src": "4238:6:5" } ], - "id": 1139, + "id": 1298, "name": "VariableDeclaration", - "src": "4209:19:8" + "src": "4238:19:5" } ], - "id": 1140, + "id": 1299, "name": "ParameterList", - "src": "4208:21:8" + "src": "4237:21:5" }, { "children": [ @@ -8862,13 +8818,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1139, + "referencedDeclaration": 1298, "type": "bool[] memory", "value": "spent" }, - "id": 1141, + "id": 1300, "name": "Identifier", - "src": "4236:5:8" + "src": "4265:5:5" }, { "attributes": { @@ -8911,19 +8867,19 @@ "name": "bool", "type": "bool" }, - "id": 1142, + "id": 1301, "name": "ElementaryTypeName", - "src": "4248:4:8" + "src": "4277:4:5" } ], - "id": 1143, + "id": 1302, "name": "ArrayTypeName", - "src": "4248:6:8" + "src": "4277:6:5" } ], - "id": 1144, + "id": 1303, "name": "NewExpression", - "src": "4244:10:8" + "src": "4273:10:5" }, { "attributes": { @@ -8943,40 +8899,40 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1135, + "referencedDeclaration": 1294, "type": "bytes32[] calldata", "value": "_nullifierHashes" }, - "id": 1145, + "id": 1304, "name": "Identifier", - "src": "4255:16:8" + "src": "4284:16:5" } ], - "id": 1146, + "id": 1305, "name": "MemberAccess", - "src": "4255:23:8" + "src": "4284:23:5" } ], - "id": 1147, + "id": 1306, "name": "FunctionCall", - "src": "4244:35:8" + "src": "4273:35:5" } ], - "id": 1148, + "id": 1307, "name": "Assignment", - "src": "4236:43:8" + "src": "4265:43:5" } ], - "id": 1149, + "id": 1308, "name": "ExpressionStatement", - "src": "4236:43:8" + "src": "4265:43:5" }, { "children": [ { "attributes": { "assignments": [ - 1151 + 1310 ] }, "children": [ @@ -8984,7 +8940,7 @@ "attributes": { "constant": false, "name": "i", - "scope": 1175, + "scope": 1334, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8997,14 +8953,14 @@ "name": "uint", "type": "uint256" }, - "id": 1150, + "id": 1309, "name": "ElementaryTypeName", - "src": "4289:4:8" + "src": "4318:4:5" } ], - "id": 1151, + "id": 1310, "name": "VariableDeclaration", - "src": "4289:6:8" + "src": "4318:6:5" }, { "attributes": { @@ -9019,14 +8975,14 @@ "type": "int_const 0", "value": "0" }, - "id": 1152, + "id": 1311, "name": "Literal", - "src": "4298:1:8" + "src": "4327:1:5" } ], - "id": 1153, + "id": 1312, "name": "VariableDeclarationStatement", - "src": "4289:10:8" + "src": "4318:10:5" }, { "attributes": { @@ -9049,13 +9005,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1154, + "id": 1313, "name": "Identifier", - "src": "4301:1:8" + "src": "4330:1:5" }, { "attributes": { @@ -9075,23 +9031,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1135, + "referencedDeclaration": 1294, "type": "bytes32[] calldata", "value": "_nullifierHashes" }, - "id": 1155, + "id": 1314, "name": "Identifier", - "src": "4305:16:8" + "src": "4334:16:5" } ], - "id": 1156, + "id": 1315, "name": "MemberAccess", - "src": "4305:23:8" + "src": "4334:23:5" } ], - "id": 1157, + "id": 1316, "name": "BinaryOperation", - "src": "4301:27:8" + "src": "4330:27:5" }, { "children": [ @@ -9113,23 +9069,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1158, + "id": 1317, "name": "Identifier", - "src": "4330:1:8" + "src": "4359:1:5" } ], - "id": 1159, + "id": 1318, "name": "UnaryOperation", - "src": "4330:3:8" + "src": "4359:3:5" } ], - "id": 1160, + "id": 1319, "name": "ExpressionStatement", - "src": "4330:3:8" + "src": "4359:3:5" }, { "children": [ @@ -9164,13 +9120,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1132, + "referencedDeclaration": 1291, "type": "function (bytes32) view returns (bool)", "value": "isSpent" }, - "id": 1161, + "id": 1320, "name": "Identifier", - "src": "4347:7:8" + "src": "4376:7:5" }, { "attributes": { @@ -9188,13 +9144,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1135, + "referencedDeclaration": 1294, "type": "bytes32[] calldata", "value": "_nullifierHashes" }, - "id": 1162, + "id": 1321, "name": "Identifier", - "src": "4355:16:8" + "src": "4384:16:5" }, { "attributes": { @@ -9202,23 +9158,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1163, + "id": 1322, "name": "Identifier", - "src": "4372:1:8" + "src": "4401:1:5" } ], - "id": 1164, + "id": 1323, "name": "IndexAccess", - "src": "4355:19:8" + "src": "4384:19:5" } ], - "id": 1165, + "id": 1324, "name": "FunctionCall", - "src": "4347:28:8" + "src": "4376:28:5" }, { "children": [ @@ -9251,13 +9207,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1139, + "referencedDeclaration": 1298, "type": "bool[] memory", "value": "spent" }, - "id": 1166, + "id": 1325, "name": "Identifier", - "src": "4387:5:8" + "src": "4416:5:5" }, { "attributes": { @@ -9265,18 +9221,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1151, + "referencedDeclaration": 1310, "type": "uint256", "value": "i" }, - "id": 1167, + "id": 1326, "name": "Identifier", - "src": "4393:1:8" + "src": "4422:1:5" } ], - "id": 1168, + "id": 1327, "name": "IndexAccess", - "src": "4387:8:8" + "src": "4416:8:5" }, { "attributes": { @@ -9291,49 +9247,49 @@ "type": "bool", "value": "true" }, - "id": 1169, + "id": 1328, "name": "Literal", - "src": "4398:4:8" + "src": "4427:4:5" } ], - "id": 1170, + "id": 1329, "name": "Assignment", - "src": "4387:15:8" + "src": "4416:15:5" } ], - "id": 1171, + "id": 1330, "name": "ExpressionStatement", - "src": "4387:15:8" + "src": "4416:15:5" } ], - "id": 1172, + "id": 1331, "name": "Block", - "src": "4377:34:8" + "src": "4406:34:5" } ], - "id": 1173, + "id": 1332, "name": "IfStatement", - "src": "4343:68:8" + "src": "4372:68:5" } ], - "id": 1174, + "id": 1333, "name": "Block", - "src": "4335:82:8" + "src": "4364:82:5" } ], - "id": 1175, + "id": 1334, "name": "ForStatement", - "src": "4285:132:8" + "src": "4314:132:5" } ], - "id": 1176, + "id": 1335, "name": "Block", - "src": "4230:191:8" + "src": "4259:191:5" } ], - "id": 1177, + "id": 1336, "name": "FunctionDefinition", - "src": "4128:293:8" + "src": "4157:293:5" }, { "attributes": { @@ -9342,7 +9298,7 @@ "isConstructor": false, "kind": "function", "name": "updateVerifier", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" @@ -9354,7 +9310,7 @@ "attributes": { "constant": false, "name": "_newVerifier", - "scope": 1191, + "scope": 1350, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -9368,19 +9324,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1178, + "id": 1337, "name": "ElementaryTypeName", - "src": "4675:7:8" + "src": "4704:7:5" } ], - "id": 1179, + "id": 1338, "name": "VariableDeclaration", - "src": "4675:20:8" + "src": "4704:20:5" } ], - "id": 1180, + "id": 1339, "name": "ParameterList", - "src": "4674:22:8" + "src": "4703:22:5" }, { "attributes": { @@ -9389,9 +9345,9 @@ ] }, "children": [], - "id": 1183, + "id": 1342, "name": "ParameterList", - "src": "4719:0:8" + "src": "4748:0:5" }, { "attributes": { @@ -9404,18 +9360,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 920, + "referencedDeclaration": 1084, "type": "modifier ()", "value": "onlyOperator" }, - "id": 1181, + "id": 1340, "name": "Identifier", - "src": "4706:12:8" + "src": "4735:12:5" } ], - "id": 1182, + "id": 1341, "name": "ModifierInvocation", - "src": "4706:12:8" + "src": "4735:12:5" }, { "children": [ @@ -9438,13 +9394,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 904, + "referencedDeclaration": 1068, "type": "contract IVerifier", "value": "verifier" }, - "id": 1184, + "id": 1343, "name": "Identifier", - "src": "4725:8:8" + "src": "4754:8:5" }, { "attributes": { @@ -9472,13 +9428,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 882, + "referencedDeclaration": 1041, "type": "type(contract IVerifier)", "value": "IVerifier" }, - "id": 1185, + "id": 1344, "name": "Identifier", - "src": "4736:9:8" + "src": "4765:9:5" }, { "attributes": { @@ -9486,38 +9442,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1179, + "referencedDeclaration": 1338, "type": "address", "value": "_newVerifier" }, - "id": 1186, + "id": 1345, "name": "Identifier", - "src": "4746:12:8" + "src": "4775:12:5" } ], - "id": 1187, + "id": 1346, "name": "FunctionCall", - "src": "4736:23:8" + "src": "4765:23:5" } ], - "id": 1188, + "id": 1347, "name": "Assignment", - "src": "4725:34:8" + "src": "4754:34:5" } ], - "id": 1189, + "id": 1348, "name": "ExpressionStatement", - "src": "4725:34:8" + "src": "4754:34:5" } ], - "id": 1190, + "id": 1349, "name": "Block", - "src": "4719:45:8" + "src": "4748:45:5" } ], - "id": 1191, + "id": 1350, "name": "FunctionDefinition", - "src": "4651:113:8" + "src": "4680:113:5" }, { "attributes": { @@ -9526,7 +9482,7 @@ "isConstructor": false, "kind": "function", "name": "changeOperator", - "scope": 1204, + "scope": 1363, "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" @@ -9538,7 +9494,7 @@ "attributes": { "constant": false, "name": "_newOperator", - "scope": 1203, + "scope": 1362, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -9552,19 +9508,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1192, + "id": 1351, "name": "ElementaryTypeName", - "src": "4838:7:8" + "src": "4867:7:5" } ], - "id": 1193, + "id": 1352, "name": "VariableDeclaration", - "src": "4838:20:8" + "src": "4867:20:5" } ], - "id": 1194, + "id": 1353, "name": "ParameterList", - "src": "4837:22:8" + "src": "4866:22:5" }, { "attributes": { @@ -9573,9 +9529,9 @@ ] }, "children": [], - "id": 1197, + "id": 1356, "name": "ParameterList", - "src": "4882:0:8" + "src": "4911:0:5" }, { "attributes": { @@ -9588,18 +9544,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 920, + "referencedDeclaration": 1084, "type": "modifier ()", "value": "onlyOperator" }, - "id": 1195, + "id": 1354, "name": "Identifier", - "src": "4869:12:8" + "src": "4898:12:5" } ], - "id": 1196, + "id": 1355, "name": "ModifierInvocation", - "src": "4869:12:8" + "src": "4898:12:5" }, { "children": [ @@ -9622,13 +9578,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 908, + "referencedDeclaration": 1072, "type": "address", "value": "operator" }, - "id": 1198, + "id": 1357, "name": "Identifier", - "src": "4888:8:8" + "src": "4917:8:5" }, { "attributes": { @@ -9636,43 +9592,43 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1193, + "referencedDeclaration": 1352, "type": "address", "value": "_newOperator" }, - "id": 1199, + "id": 1358, "name": "Identifier", - "src": "4899:12:8" + "src": "4928:12:5" } ], - "id": 1200, + "id": 1359, "name": "Assignment", - "src": "4888:23:8" + "src": "4917:23:5" } ], - "id": 1201, + "id": 1360, "name": "ExpressionStatement", - "src": "4888:23:8" + "src": "4917:23:5" } ], - "id": 1202, + "id": 1361, "name": "Block", - "src": "4882:34:8" + "src": "4911:34:5" } ], - "id": 1203, + "id": 1362, "name": "FunctionDefinition", - "src": "4814:102:8" + "src": "4843:102:5" } ], - "id": 1204, + "id": 1363, "name": "ContractDefinition", - "src": "318:4600:8" + "src": "383:4564:5" } ], - "id": 1205, + "id": 1364, "name": "SourceUnit", - "src": "0:4919:8" + "src": "0:4948:5" }, "compiler": { "name": "solc", @@ -9680,7 +9636,7 @@ }, "networks": {}, "schemaVersion": "3.3.4", - "updatedAt": "2021-04-04T20:21:29.876Z", + "updatedAt": "2021-04-12T00:15:10.071Z", "devdoc": { "methods": { "changeOperator(address)": { diff --git a/contracts/ERC20Tornado.sol b/contracts/ERC20Tornado.sol index bce15bf..73c44b7 100644 --- a/contracts/ERC20Tornado.sol +++ b/contracts/ERC20Tornado.sol @@ -12,10 +12,10 @@ pragma solidity 0.5.17; import "./Tornado.sol"; +import "./SafeMath.sol"; contract ERC20Tornado is Tornado { address public token; - uint256 public protocolFee; constructor( IVerifier _verifier, @@ -26,8 +26,6 @@ contract ERC20Tornado is Tornado { address _token ) Tornado(_verifier, _feeManager, _denomination, _merkleTreeHeight, _operator) public { token = _token; - // 0.5% fee - protocolFee = _denomination / 200; } function _processDeposit() internal { @@ -35,13 +33,17 @@ contract ERC20Tornado is Tornado { _safeErc20TransferFrom(msg.sender, address(this), denomination); } - function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund, address _feeTo) internal { + function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund) internal { require(msg.value == _refund, "Incorrect refund amount received by the contract"); - bool feeOn = _feeTo != address(0); + address feeTo = feeManager.feeTo(); + uint256 protocolFeeDivisor = feeManager.protocolFeeDivisor(); + + bool feeOn = feeTo != address(0) && protocolFeeDivisor != 0; if (feeOn) { + uint256 protocolFee = SafeMath.div(denomination, protocolFeeDivisor); _safeErc20Transfer(_recipient, denomination - _relayer_fee - protocolFee); - _safeErc20Transfer(_feeTo, protocolFee); + _safeErc20Transfer(feeTo, protocolFee); } else { _safeErc20Transfer(_recipient, denomination - _relayer_fee); } diff --git a/contracts/FeeManager.sol b/contracts/FeeManager.sol index 4c92349..081dd5c 100644 --- a/contracts/FeeManager.sol +++ b/contracts/FeeManager.sol @@ -1,11 +1,16 @@ pragma solidity 0.5.17; contract FeeManager { + // Maximum fee of 0.5% + uint256 public MIN_PROTOCOL_FEE_DIVISOR = 200; + address public feeTo; address public feeToSetter; + uint256 public protocolFeeDivisor; constructor(address _feeToSetter) public { feeToSetter = _feeToSetter; + protocolFeeDivisor = 0; } function setFeeTo(address _feeTo) external { @@ -17,4 +22,15 @@ contract FeeManager { require(msg.sender == feeToSetter, 'Poof: FORBIDDEN'); feeToSetter = _feeToSetter; } + + function setProtocolFeeDivisor(uint256 _protocolFeeDivisor) external { + require(msg.sender == feeToSetter, 'Poof: FORBIDDEN'); + require(_protocolFeeDivisor >= MIN_PROTOCOL_FEE_DIVISOR, 'Poof: Protocol fee too high'); + protocolFeeDivisor = _protocolFeeDivisor; + } + + function clearFee() external { + require(msg.sender == feeToSetter, 'Poof: FORBIDDEN'); + protocolFeeDivisor = 0; + } } diff --git a/contracts/SafeMath.sol b/contracts/SafeMath.sol new file mode 100644 index 0000000..e46f5b8 --- /dev/null +++ b/contracts/SafeMath.sol @@ -0,0 +1,157 @@ +pragma solidity ^0.5.0; + +// Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.5.0/contracts/math/SafeMath.sol +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + return sub(a, b, "SafeMath: subtraction overflow"); + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + * + * _Available since v2.4.0._ + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b <= a, errorMessage); + uint256 c = a - b; + + return c; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + return div(a, b, "SafeMath: division by zero"); + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts with custom message on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + * + * _Available since v2.4.0._ + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b > 0, errorMessage); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + return mod(a, b, "SafeMath: modulo by zero"); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts with custom message when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + * + * _Available since v2.4.0._ + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b != 0, errorMessage); + return a % b; + } +} diff --git a/contracts/Tornado.sol b/contracts/Tornado.sol index c1a69da..865e4b3 100644 --- a/contracts/Tornado.sol +++ b/contracts/Tornado.sol @@ -9,6 +9,7 @@ contract IVerifier { contract IFeeManager { function feeTo() external view returns (address); + function protocolFeeDivisor() external view returns (uint256); } contract Tornado is MerkleTreeWithHistory, ReentrancyGuard { @@ -83,12 +84,12 @@ contract Tornado is MerkleTreeWithHistory, ReentrancyGuard { require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(_recipient), uint256(_relayer), _fee, _refund]), "Invalid withdraw proof"); nullifierHashes[_nullifierHash] = true; - _processWithdraw(_recipient, _relayer, _fee, _refund, feeManager.feeTo()); + _processWithdraw(_recipient, _relayer, _fee, _refund); emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee); } /** @dev this function is defined in a child contract */ - function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund, address _feeTo) internal; + function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _relayer_fee, uint256 _refund) internal; /** @dev whether a note is already spent */ function isSpent(bytes32 _nullifierHash) public view returns(bool) { diff --git a/test/ERC20Tornado.test.js b/test/ERC20Tornado.test.js index cb791bb..49de4fd 100644 --- a/test/ERC20Tornado.test.js +++ b/test/ERC20Tornado.test.js @@ -196,6 +196,7 @@ contract('ERC20Tornado', accounts => { it("should give fees when feeTo is set", async () => { await feeManager.setFeeTo(accounts[5]); + await feeManager.setProtocolFeeDivisor(200); const balanceFeeToBefore = await token.balanceOf(accounts[5]); const deposit = generateDeposit(); diff --git a/test/FeeManager.test.js b/test/FeeManager.test.js new file mode 100644 index 0000000..15dbae8 --- /dev/null +++ b/test/FeeManager.test.js @@ -0,0 +1,107 @@ +const FeeManager = artifacts.require('./FeeManager.sol') +const {toBN} = require('web3-utils') + +const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000" + +const expectEqual = (actual, expected) => assert(expected === actual, `Expected ${expected}, got: ${actual}`) + +contract('FeeManager', accounts => { + let feeManager + + before(async () => { + feeManager = await FeeManager.deployed() + }) + + describe("#setFeeTo", () => { + it('should fail when sender is not `feeToSetter`', async () => { + try { + await feeManager.setFeeTo(accounts[1], {from: accounts[1]}) + } catch (e) { + assert(e.message.includes("Poof: FORBIDDEN"), `Unexpected error: ${e.message}`) + } + + const feeTo = await feeManager.feeTo() + expectEqual(feeTo, ZERO_ADDRESS) + }) + + it('should work', async () => { + await feeManager.setFeeTo(accounts[1], {from: accounts[0]}) + const feeTo = await feeManager.feeTo() + expectEqual(feeTo, accounts[1]) + }) + }) + + describe("#setFeeToSetter", () => { + it('should fail when sender is not `feeToSetter`', async () => { + try { + await feeManager.setFeeToSetter(accounts[1], {from: accounts[1]}) + } catch (e) { + assert(e.message.includes("Poof: FORBIDDEN"), `Unexpected error: ${e.message}`) + } + + const feeToSetter = await feeManager.feeToSetter() + expectEqual(feeToSetter, accounts[0]) + }) + + it('should work', async () => { + await feeManager.setFeeToSetter(accounts[1], {from: accounts[0]}) + const feeToSetter1 = await feeManager.feeToSetter() + expectEqual(feeToSetter1, accounts[1]) + + await feeManager.setFeeToSetter(accounts[0], {from: accounts[1]}) + const feeToSetter2 = await feeManager.feeToSetter() + expectEqual(feeToSetter2, accounts[0]) + }) + }) + + describe("#setProtocolFeeDivisor", () => { + it('should fail when sender is not `feeToSetter`', async () => { + try { + await feeManager.setProtocolFeeDivisor(200, {from: accounts[1]}) + } catch (e) { + assert(e.message.includes("Poof: FORBIDDEN"), `Unexpected error: ${e.message}`) + } + + const protocolFeeDivisor = await feeManager.protocolFeeDivisor() + expectEqual(protocolFeeDivisor.toString(), "0") + }) + + it('should fail when protocolFeeDivisor < `MIN_PROTOCOL_FEE_DIVISOR`', async () => { + try { + await feeManager.setProtocolFeeDivisor(199, {from: accounts[0]}) + } catch (e) { + assert(e.message.includes("Poof: Protocol fee too high"), `Unexpected error: ${e.message}`) + } + + const protocolFeeDivisor = await feeManager.protocolFeeDivisor() + expectEqual(protocolFeeDivisor.toString(), "0") + }) + + it('should work', async () => { + await feeManager.setProtocolFeeDivisor(200, {from: accounts[0]}) + const protocolFeeDivisor1 = await feeManager.protocolFeeDivisor() + expectEqual(protocolFeeDivisor1.toString(), "200") + + await feeManager.setProtocolFeeDivisor(500, {from: accounts[0]}) + const protocolFeeDivisor2 = await feeManager.protocolFeeDivisor() + expectEqual(protocolFeeDivisor2.toString(), "500") + + await feeManager.clearFee({from: accounts[0]}) + const protocolFeeDivisor3 = await feeManager.protocolFeeDivisor() + expectEqual(protocolFeeDivisor3.toString(), "0") + }) + }) + + describe("#clearFee", () => { + it('should fail when sender is not `feeToSetter`', async () => { + try { + await feeManager.clearFee({from: accounts[1]}) + } catch (e) { + assert(e.message.includes("Poof: FORBIDDEN"), `Unexpected error: ${e.message}`) + } + + const protocolFeeDivisor = await feeManager.protocolFeeDivisor() + expectEqual(protocolFeeDivisor.toString(), "0") + }) + }) +})