From 0f8bc85c8331742bf25141660e2e4537b7bfea8a Mon Sep 17 00:00:00 2001 From: Brian Li Date: Sun, 21 Mar 2021 18:59:10 -0700 Subject: [PATCH] Deploy mainnet --- .env.example | 2 +- README.md | 3 + client/contracts/CELOTornado.-1.json | 7219 ++++++++++++++++++++++++++ client/contracts/CELOTornado.0.json | 7219 ++++++++++++++++++++++++++ client/contracts/CELOTornado.1.json | 7219 ++++++++++++++++++++++++++ client/contracts/CELOTornado.2.json | 7219 ++++++++++++++++++++++++++ client/contracts/CELOTornado.3.json | 7219 ++++++++++++++++++++++++++ client/contracts/CELOTornado.4.json | 7219 ++++++++++++++++++++++++++ client/contracts/CELOTornado.5.json | 7219 ++++++++++++++++++++++++++ client/contracts/ERC20Mock.json | 2 +- client/contracts/ERC20Tornado.json | 10 +- client/contracts/ETHTornado.json | 10 +- client/contracts/Hasher.json | 8 +- client/contracts/Migrations.json | 2 +- client/contracts/Verifier.json | 8 +- truffle-config.js | 1 - 16 files changed, 50567 insertions(+), 12 deletions(-) create mode 100644 client/contracts/CELOTornado.-1.json create mode 100644 client/contracts/CELOTornado.0.json create mode 100644 client/contracts/CELOTornado.1.json create mode 100644 client/contracts/CELOTornado.2.json create mode 100644 client/contracts/CELOTornado.3.json create mode 100644 client/contracts/CELOTornado.4.json create mode 100644 client/contracts/CELOTornado.5.json diff --git a/.env.example b/.env.example index 7958d46..da37380 100644 --- a/.env.example +++ b/.env.example @@ -4,7 +4,7 @@ ETH_AMOUNT=100000000000000000 TOKEN_AMOUNT=100000000000000000 PRIVATE_KEY= ERC20_TOKEN= -# RPC_URL=https://explorer.celo.org +# RPC_URL=https://forno.celo.org # RPC_URL=https://alfajores-forno.celo-testnet.org # CELO on Alfajores diff --git a/README.md b/README.md index c0a201b..0de32c3 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,6 @@ Poof cash contracts are a fork of Tornado cash contracts starting from commit: 77af0c5bddfcf9d973efbc38278a249bb0173da3 Only the migrations scripts have been updated. + +Notes: + - Please use node @ v11.15.0 diff --git a/client/contracts/CELOTornado.-1.json b/client/contracts/CELOTornado.-1.json new file mode 100644 index 0000000..a8fd052 --- /dev/null +++ b/client/contracts/CELOTornado.-1.json @@ -0,0 +1,7219 @@ +{ + "contractName": "ERC20Tornado", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVerifier", + "name": "_verifier", + "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": [ + { + "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" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"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\":[{\"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\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0x708938fd083239d2e9cd17e457cf25a2150bb900082fad58af8b689f786aef9c\",\"urls\":[\"bzz-raw://f345afd62002f883c60c032cd0cb051663dc8a3e59a52bf44109633b96cb3685\",\"dweb:/ipfs/QmNwjnH2uyNoq9GPjNUv6Z1mgtiR5rY3K7EHY74RBjXMpw\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x09c70432243629ef44697fd3d0ca89d3578e2b1c9f46d90757371edb163c14da\",\"urls\":[\"bzz-raw://d2a2c9fa85c32cb15793282792cd25c71804a10aa5a911e41f3bcd07f5df117e\",\"dweb:/ipfs/QmeQ1s6ypNnP7fossR4x9svuuLjcSBtQ5spUTmWGZY5Ljr\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001d1238038062001d12833981810160405260a08110156200004757600080fd5b50805160208201516040830151606084015160809094015192939192909190848484848163ffffffff8116620000af5760405162461bcd60e51b815260040180806020018281038252602781526020018062001c896027913960400191505060405180910390fd5b60208163ffffffff1610620000f65760405162461bcd60e51b815260040180806020018281038252602281526020018062001cd06022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001c48833981519152909101819055815480830183559282905260008051602062001cf28339815191529092018290555b60005463ffffffff9081169082161015620001e4576200019a82806001600160e01b036200029f16565b60028054600181810190925560008051602062001c488339815191520182905580548082018255600082905260008051602062001cf2833981519152018290559092500162000170565b50620001fa81806001600160e01b036200029f16565b60046000015550506068805460ff19166001179055826200024d5760405162461bcd60e51b815260040180806020018281038252602581526020018062001c236025913960400191505060405180910390fd5b606c80546001600160a01b039586166001600160a01b031991821617909155606d80549286169282169290921790915560699290925550606e8054939092169216919091179055506200048c92505050565b600060008051602062001cb0833981519152831062000305576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001cb08339815191528210620003545760405162461bcd60e51b815260040180806020018281038252602181526020018062001c686021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003af57600080fd5b505af4158015620003c4573d6000803e3d6000fd5b505050506040513d6040811015620003db57600080fd5b508051602090910151909250905060008051602062001cb0833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200045557600080fd5b505af41580156200046a573d6000803e3d6000fd5b505050506040513d60408110156200048157600080fd5b505195945050505050565b611787806200049c6000396000f3fe60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c63430005110032", + "sourceMap": "805:2189:0:-;;;1430:34:2;;;-1:-1:-1;;;;;;1468:27:2;;;867:237:0;5:2:-1;;;;30:1;27;20:12;5:2;867:237:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;867:237: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;;;2260:17:8;2252:67;;;;-1:-1:-1;;;2252:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2325:8;:20;;-1:-1:-1;;;;;2325:20:8;;;-1:-1:-1;;;;;;2325:20:8;;;;;;;2351:8;:20;;;;;;;;;;;;;;;2377:12;:28;;;;-1:-1:-1;1085:5:0;:14;;;;;;;;;;;;;;-1:-1:-1;805:2189:0;;-1:-1:-1;;;805:2189: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:2189:0:-;;;;;;;", + "deployedSourceMap": "805:2189:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5355:102:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5355:102:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5355:102:8;-1:-1:-1;;;;;5355:102:8;;:::i;:::-;;1089:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:47:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1089:47:8;;:::i;:::-;;;;;;;;;;;;;;;;;;3478:781;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3478:781:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;3478:781:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3478:781: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;3478:781:8;;-1:-1:-1;3478:781:8;-1:-1:-1;3478:781:8;;;;;;;;-1:-1:-1;;;;;3478:781:8;;;;;;;;;;;;;;;;;;;;;;;;:::i;1278:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1278:25:8;;;:::i;:::-;;;;-1:-1:-1;;;;;1278: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;:::-;;;;;;;;;;;;;;;;;;;1463:23:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1463: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;1231:43:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1231:43:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1231:43:8;;:::i;1058:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1058:27:8;;;:::i;1430:34:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:2;;;:::i;5192:113:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5192:113:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5192:113:8;-1:-1:-1;;;;;5192:113:8;;:::i;4669:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4669:293:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4669:293:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4669:293:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4669: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;4669:293:8;;-1:-1:-1;4669:293:8;-1:-1:-1;4669: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;4669:293:8;;;;;;;;;;;;;;;;;2658:324;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2658: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;4492:116:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4492:116:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4492: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;5355:102:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5429:8;:23;;-1:-1:-1;;;;;;5429:23:8;-1:-1:-1;;;;;5429:23:8;;;;;;;;;;5355:102::o;1089:47::-;;;;;;;;;;;;;;;:::o;3478:781::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;3695:12:8;;3687:20;;;3679:59;;;;;-1:-1:-1;;;3679:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3753:31;;;;:15;:31;;;;;;;;3752:32;3744:76;;;;;-1:-1:-1;;;3744:76:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3834:18;3846:5;3834:11;:18::i;:::-;3826:59;;;;;-1:-1:-1;;;3826:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3932:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4003:19:8;;;3932:126;;;;4024:17;;;3932:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3932:126:8;;:8;;;;;:20;;3953:6;;;;3932: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;3932: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;;3932:126:8;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3932:126:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3932:126:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3932:126:8;3924:161;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;;;;4092:31;;;;:15;:31;;;;;:38;;-1:-1:-1;;4092:38:8;4126:4;4092:38;;;4136:53;4153:10;4165:8;4175:4;4181:7;4136:16;:53::i;:::-;4200:54;;;-1:-1:-1;;;;;4200:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;-1:-1:-1;;;;;;3478:781:8:o;1278:25::-;;;-1:-1:-1;;;;;1278: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;1463:23:8:-;;;-1:-1:-1;;;;;1463: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;1231:43:8:-;;;;;;;;;;;;;;;:::o;1058:27::-;;;;:::o;1430:34:2:-;;;;;;:::o;5192:113:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5266:8;:34;;-1:-1:-1;;;;;;5266:34:8;-1:-1:-1;;;;;5266:34:8;;;;;;;;;;5192:113::o;4669:293::-;4785:35;;;;;;;;;;;;;;;;4750:19;;4796:16;4785:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4785:35:8;-1:-1:-1;4777:43:8;-1:-1:-1;4830:6:8;4826:132;4842:27;;;4826:132;;;4888:28;4896:16;;4913:1;4896:19;;;;;;;;;;;;;4888:7;:28::i;:::-;4884:68;;;4939:4;4928:5;4934:1;4928:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4884:68;4871:3;;4826:132;;;;4669:293;;;;:::o;2658:324::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;2070:5;2741:24:8;;;:11;:24;;;;;;2056:19:18;2741:24:8;2740:25;2732:71;;;;-1:-1:-1;;;2732:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2810:20;2833;2841:11;2833:7;:20::i;:::-;2859:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2859:31:8;2886:4;2859:31;;;2810:43;-1:-1:-1;2896:17:8;:15;:17::i;:::-;2925:52;;;;;;;;2961:15;2925:52;;;;;;2933:11;;2925:52;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;2658: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;4492:116:8:-;4553:4;4572:31;;;:15;:31;;;;;;;;;4492: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;1303:547:0:-;1450:7;1437:9;:20;1429:81;;;;-1:-1:-1;;;1429:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1517:51;1536:10;1563:4;1548:12;;:19;1517:18;:51::i;:::-;1578:8;;1574:63;;1596:34;1615:8;1625:4;1596:18;:34::i;:::-;1647:11;;1643:203;;1687:34;;1669:12;;-1:-1:-1;;;;;1687:15:0;;;1709:7;;1669:12;1687:34;1669:12;1687:34;1709:7;1687: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;;1668:53:0;;;1734:7;1729:111;;1805:26;;-1:-1:-1;;;;;1805:17:0;;;:26;;;;;1823:7;;1805:26;;;;1823:7;1805:17;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1805:26:0;1729:111;1643:203;;1303:547;;;;:::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;1108:191:0:-;1158:9;:14;1150:75;;;;-1:-1:-1;;;1150:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1231:63;1254:10;1274:4;1281:12;;1231:22;:63::i;:::-;1108:191::o;2448:544::-;2557:5;;2568:63;;;-1:-1:-1;;;;;2568:63:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2568:63:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2557:75:0;;;;2522:12;;2536:17;;2557:5;;;2568:63;2557: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;;;2557: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;;2521:111:0;;;;2646:7;2638:37;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;;;;2775:11;;:15;2771:217;;2808:4;:11;2823:2;2808:17;2800:72;;;;-1:-1:-1;;;2800:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2901:4;2890:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2890:24:0;;-1:-1:-1;2890:24:0;2922:59;;;;-1:-1:-1;;;2922:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1854:590;1982:5;;1993:74;;;-1:-1:-1;;;;;1993:74:0;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1993:74:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1982:86:0;;;;1947:12;;1961:17;;1982:5;;;1993:74;1982: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;;;1982: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;;1946:122:0;;;;2082:7;2074:45;;;;;-1:-1:-1;;;2074:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2219:11;;:15;2215:225;;2252:4;:11;2267:2;2252:17;2244:72;;;;-1:-1:-1;;;2244:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2345:4;2334:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2334:24:0;;-1:-1:-1;2334:24:0;2366:67;;;;-1:-1:-1;;;2366:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "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\n constructor(\n IVerifier _verifier,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator,\n address _token\n ) Tornado(_verifier, _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 _fee, uint256 _refund) internal {\n require(msg.value == _refund, \"Incorrect refund amount received by the contract\");\n\n _safeErc20Transfer(_recipient, denomination - _fee);\n if (_fee > 0) {\n _safeErc20Transfer(_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": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "ast": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + }, + "id": 228, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "755:23:0" + }, + { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 228, + "sourceUnit": 1195, + "src": "780:23:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3, + "name": "Tornado", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1194, + "src": "830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Tornado_$1194", + "typeString": "contract Tornado" + } + }, + "id": 4, + "nodeType": "InheritanceSpecifier", + "src": "830:7:0" + } + ], + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 227, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 6, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "842:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "842:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 29, + "nodeType": "Block", + "src": "1079:25:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 25, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 26, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1093:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1085:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 28, + "nodeType": "ExpressionStatement", + "src": "1085:14:0" + } + ] + }, + "documentation": null, + "id": 30, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19, + "name": "_verifier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1016:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + { + "argumentTypes": null, + "id": 20, + "name": "_denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "1027:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 21, + "name": "_merkleTreeHeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "1042:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 22, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "1061:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 23, + "modifierName": { + "argumentTypes": null, + "id": 18, + "name": "Tornado", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1194, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Tornado_$1194_$", + "typeString": "type(contract Tornado)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1008:63:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "name": "_verifier", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "884:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + }, + "typeName": { + "contractScope": null, + "id": 7, + "name": "IVerifier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 891, + "src": "884:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10, + "name": "_denomination", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "909:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "909:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12, + "name": "_merkleTreeHeight", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "936:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "936:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14, + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "966:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "989:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "989:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "878:129:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [], + "src": "1079:0:0" + }, + "scope": 227, + "src": "867:237:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1144:155:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 34, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1158:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1158:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1158:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1174:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + }, + "value": "ETH value is supposed to be 0 for ERC20 instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "id": 33, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1150:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1150:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 42, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1254:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1254:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "1274:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "id": 44, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1266:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1266:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 47, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1281:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 41, + "name": "_safeErc20TransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "1231:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "1231:63:0" + } + ] + }, + "documentation": null, + "id": 51, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:2:0" + }, + "returnParameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1144:0:0" + }, + "scope": 227, + "src": "1108:191:0", + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + { + "body": { + "id": 112, + "nodeType": "Block", + "src": "1423:427:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 63, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1437:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1437:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 65, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1437:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1459:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + }, + "value": "Incorrect refund amount received by the contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "id": 62, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1429:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 69, + "nodeType": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 71, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1536:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 72, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1548:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 73, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1563:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1548:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 70, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1517:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1517:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 76, + "nodeType": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 77, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1578:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1585:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1578:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 86, + "nodeType": "IfStatement", + "src": "1574:63:0", + "trueBody": { + "id": 85, + "nodeType": "Block", + "src": "1588:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1615:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 82, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1625:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 80, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1596:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 84, + "nodeType": "ExpressionStatement", + "src": "1596:34:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 87, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1647:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1657:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1647:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 111, + "nodeType": "IfStatement", + "src": "1643:203:0", + "trueBody": { + "id": 110, + "nodeType": "Block", + "src": "1660:186:0", + "statements": [ + { + "assignments": [ + 91, + null + ], + "declarations": [ + { + "constant": false, + "id": 91, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "1669:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 90, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1669:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 99, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "arguments": [ + { + "argumentTypes": null, + "id": 95, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1709:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 92, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1687:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687: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": 98, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1733:8:0", + "subExpression": { + "argumentTypes": null, + "id": 100, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 91, + "src": "1734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 109, + "nodeType": "IfStatement", + "src": "1729:111:0", + "trueBody": { + "id": 108, + "nodeType": "Block", + "src": "1743:97:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 105, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1823:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 102, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1805:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 107, + "nodeType": "ExpressionStatement", + "src": "1805:26:0" + } + ] + } + } + ] + } + } + ] + }, + "documentation": null, + "id": 113, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processWithdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 53, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1329:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1329:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "_relayer", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1357:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 54, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1383:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 56, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1383:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "_refund", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1397:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1397:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1328:85:0" + }, + "returnParameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [], + "src": "1423:0:0" + }, + "scope": 227, + "src": "1303:547:0", + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "1940:504:0", + "statements": [ + { + "assignments": [ + 123, + 125 + ], + "declarations": [ + { + "constant": false, + "id": 123, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1947:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 122, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1947:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 125, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1961:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 124, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1961:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 136, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30783233623837326464", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2016:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + "value": "0x23b872dd" + }, + { + "argumentTypes": null, + "id": 131, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "2047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 132, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2054:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 133, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2059:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 128, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "1993:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1993:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1993:74:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 126, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1982: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": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1982:86:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 138, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2082:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + }, + "value": "not enough allowed tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "id": 137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 141, + "nodeType": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 142, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2219:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2219:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2233:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2219:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "2215:225:0", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "2236:204:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 147, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2252:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2252:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2267:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2252:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2271:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 146, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2244:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2244:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 154, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2324:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 159, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2351:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 155, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2334:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2324:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 164, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2383:49:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + }, + "value": "not enough allowed tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "id": 163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2366:67:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 167, + "nodeType": "ExpressionStatement", + "src": "2366:67:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20TransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 115, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1886:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1886:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 117, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1901:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1901:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 119, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1914:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1914:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1885:45:0" + }, + "returnParameters": { + "id": 121, + "nodeType": "ParameterList", + "parameters": [], + "src": "1940:0:0" + }, + "scope": 227, + "src": "1854:590:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 225, + "nodeType": "Block", + "src": "2515:477:0", + "statements": [ + { + "assignments": [ + 179, + 181 + ], + "declarations": [ + { + "constant": false, + "id": 179, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2522:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2522:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 181, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2536:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 180, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2536:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30786139303539636262", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2591:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + "value": "0xa9059cbb" + }, + { + "argumentTypes": null, + "id": 187, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "2618:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 188, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "2623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 184, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2568:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2568:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2568:63:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 182, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2557:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2557: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": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 193, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2646:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e73", + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2655:19:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + }, + "value": "not enough tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2638:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2638:37:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 197, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2775:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2775:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2789:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2775:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 224, + "nodeType": "IfStatement", + "src": "2771:217:0", + "trueBody": { + "id": 223, + "nodeType": "Block", + "src": "2792:196:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 202, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2808:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2808:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2823:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2808:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2827:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2800:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2800:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2880:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 212, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2901:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2908:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 214, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2907:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 210, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2890:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2890:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2890:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2880:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 219, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2939:41:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + }, + "value": "not enough tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "id": 218, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2922:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2922:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "2922:59:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20Transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2476:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2476:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2489:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2489:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2475:30:0" + }, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "2515:0:0" + }, + "scope": 227, + "src": "2448:544:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 228, + "src": "805:2189:0" + } + ], + "src": "755:2240:0" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".17" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "755:23:0" + }, + { + "attributes": { + "SourceUnit": 1195, + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "scope": 228, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "780:23:0" + }, + { + "attributes": { + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "scope": 228 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Tornado", + "referencedDeclaration": 1194, + "type": "contract Tornado" + }, + "id": 3, + "name": "UserDefinedTypeName", + "src": "830:7:0" + } + ], + "id": 4, + "name": "InheritanceSpecifier", + "src": "830:7:0" + }, + { + "attributes": { + "constant": false, + "name": "token", + "scope": 227, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5, + "name": "ElementaryTypeName", + "src": "842:7:0" + } + ], + "id": 6, + "name": "VariableDeclaration", + "src": "842:20:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "name": "", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_verifier", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IVerifier", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IVerifier", + "referencedDeclaration": 891, + "type": "contract IVerifier" + }, + "id": 7, + "name": "UserDefinedTypeName", + "src": "884:9:0" + } + ], + "id": 8, + "name": "VariableDeclaration", + "src": "884:19:0" + }, + { + "attributes": { + "constant": false, + "name": "_denomination", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 9, + "name": "ElementaryTypeName", + "src": "909:7:0" + } + ], + "id": 10, + "name": "VariableDeclaration", + "src": "909:21:0" + }, + { + "attributes": { + "constant": false, + "name": "_merkleTreeHeight", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint32", + "type": "uint32" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "936:6:0" + } + ], + "id": 12, + "name": "VariableDeclaration", + "src": "936:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_operator", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 13, + "name": "ElementaryTypeName", + "src": "966:7:0" + } + ], + "id": 14, + "name": "VariableDeclaration", + "src": "966:17:0" + }, + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "989:7:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "989:14:0" + } + ], + "id": 17, + "name": "ParameterList", + "src": "878:129:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 24, + "name": "ParameterList", + "src": "1079:0:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1194, + "type": "type(contract Tornado)", + "value": "Tornado" + }, + "id": 18, + "name": "Identifier", + "src": "1008:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 8, + "type": "contract IVerifier", + "value": "_verifier" + }, + "id": 19, + "name": "Identifier", + "src": "1016:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "uint256", + "value": "_denomination" + }, + "id": 20, + "name": "Identifier", + "src": "1027:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint32", + "value": "_merkleTreeHeight" + }, + "id": 21, + "name": "Identifier", + "src": "1042:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "address", + "value": "_operator" + }, + "id": 22, + "name": "Identifier", + "src": "1061:9:0" + } + ], + "id": 23, + "name": "ModifierInvocation", + "src": "1008:63:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6, + "type": "address", + "value": "token" + }, + "id": 25, + "name": "Identifier", + "src": "1085:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 16, + "type": "address", + "value": "_token" + }, + "id": 26, + "name": "Identifier", + "src": "1093:6:0" + } + ], + "id": 27, + "name": "Assignment", + "src": "1085:14:0" + } + ], + "id": 28, + "name": "ExpressionStatement", + "src": "1085:14:0" + } + ], + "id": 29, + "name": "Block", + "src": "1079:25:0" + } + ], + "id": 30, + "name": "FunctionDefinition", + "src": "867:237:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processDeposit", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 31, + "name": "ParameterList", + "src": "1132:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 32, + "name": "ParameterList", + "src": "1144:0:0" + }, + { + "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_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 33, + "name": "Identifier", + "src": "1150:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 34, + "name": "Identifier", + "src": "1158:3:0" + } + ], + "id": 35, + "name": "MemberAccess", + "src": "1158:9: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": 36, + "name": "Literal", + "src": "1171:1:0" + } + ], + "id": 37, + "name": "BinaryOperation", + "src": "1158:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "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": 38, + "name": "Literal", + "src": "1174:50:0" + } + ], + "id": 39, + "name": "FunctionCall", + "src": "1150:75:0" + } + ], + "id": 40, + "name": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 171, + "type": "function (address,address,uint256)", + "value": "_safeErc20TransferFrom" + }, + "id": 41, + "name": "Identifier", + "src": "1231:22:0" + }, + { + "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": 3260, + "type": "msg", + "value": "msg" + }, + "id": 42, + "name": "Identifier", + "src": "1254:3:0" + } + ], + "id": 43, + "name": "MemberAccess", + "src": "1254:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 44, + "name": "ElementaryTypeNameExpression", + "src": "1266:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3284, + "type": "contract ERC20Tornado", + "value": "this" + }, + "id": 45, + "name": "Identifier", + "src": "1274:4:0" + } + ], + "id": 46, + "name": "FunctionCall", + "src": "1266:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 47, + "name": "Identifier", + "src": "1281:12:0" + } + ], + "id": 48, + "name": "FunctionCall", + "src": "1231:63:0" + } + ], + "id": 49, + "name": "ExpressionStatement", + "src": "1231:63:0" + } + ], + "id": 50, + "name": "Block", + "src": "1144:155:0" + } + ], + "id": 51, + "name": "FunctionDefinition", + "src": "1108:191:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processWithdraw", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_recipient", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 52, + "name": "ElementaryTypeName", + "src": "1329:15:0" + } + ], + "id": 53, + "name": "VariableDeclaration", + "src": "1329:26:0" + }, + { + "attributes": { + "constant": false, + "name": "_relayer", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 54, + "name": "ElementaryTypeName", + "src": "1357:15:0" + } + ], + "id": 55, + "name": "VariableDeclaration", + "src": "1357:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_fee", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 56, + "name": "ElementaryTypeName", + "src": "1383:7:0" + } + ], + "id": 57, + "name": "VariableDeclaration", + "src": "1383:12:0" + }, + { + "attributes": { + "constant": false, + "name": "_refund", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 58, + "name": "ElementaryTypeName", + "src": "1397:7:0" + } + ], + "id": 59, + "name": "VariableDeclaration", + "src": "1397:15:0" + } + ], + "id": 60, + "name": "ParameterList", + "src": "1328:85:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 61, + "name": "ParameterList", + "src": "1423:0:0" + }, + { + "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_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 62, + "name": "Identifier", + "src": "1429:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 63, + "name": "Identifier", + "src": "1437:3:0" + } + ], + "id": 64, + "name": "MemberAccess", + "src": "1437:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 65, + "name": "Identifier", + "src": "1450:7:0" + } + ], + "id": 66, + "name": "BinaryOperation", + "src": "1437:20:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Incorrect refund amount received by the contract\"", + "value": "Incorrect refund amount received by the contract" + }, + "id": 67, + "name": "Literal", + "src": "1459:50:0" + } + ], + "id": 68, + "name": "FunctionCall", + "src": "1429:81:0" + } + ], + "id": 69, + "name": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 70, + "name": "Identifier", + "src": "1517:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 71, + "name": "Identifier", + "src": "1536:10: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": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 72, + "name": "Identifier", + "src": "1548:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 73, + "name": "Identifier", + "src": "1563:4:0" + } + ], + "id": 74, + "name": "BinaryOperation", + "src": "1548:19:0" + } + ], + "id": 75, + "name": "FunctionCall", + "src": "1517:51:0" + } + ], + "id": 76, + "name": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "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": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 77, + "name": "Identifier", + "src": "1578:4: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": 78, + "name": "Literal", + "src": "1585:1:0" + } + ], + "id": 79, + "name": "BinaryOperation", + "src": "1578:8:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 80, + "name": "Identifier", + "src": "1596:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 81, + "name": "Identifier", + "src": "1615:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 82, + "name": "Identifier", + "src": "1625:4:0" + } + ], + "id": 83, + "name": "FunctionCall", + "src": "1596:34:0" + } + ], + "id": 84, + "name": "ExpressionStatement", + "src": "1596:34:0" + } + ], + "id": 85, + "name": "Block", + "src": "1588:49:0" + } + ], + "id": 86, + "name": "IfStatement", + "src": "1574:63:0" + }, + { + "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": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 87, + "name": "Identifier", + "src": "1647: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": 88, + "name": "Literal", + "src": "1657:1:0" + } + ], + "id": 89, + "name": "BinaryOperation", + "src": "1647:11:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 91, + null + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 110, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 90, + "name": "ElementaryTypeName", + "src": "1669:4:0" + } + ], + "id": 91, + "name": "VariableDeclaration", + "src": "1669:12:0" + }, + { + "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": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 92, + "name": "Identifier", + "src": "1687:10:0" + } + ], + "id": 93, + "name": "MemberAccess", + "src": "1687:15:0" + } + ], + "id": 94, + "name": "MemberAccess", + "src": "1687:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 95, + "name": "Identifier", + "src": "1709:7:0" + } + ], + "id": 96, + "name": "FunctionCall", + "src": "1687:30:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"\"", + "value": "" + }, + "id": 97, + "name": "Literal", + "src": "1718:2:0" + } + ], + "id": 98, + "name": "FunctionCall", + "src": "1687:34:0" + } + ], + "id": 99, + "name": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 91, + "type": "bool", + "value": "success" + }, + "id": 100, + "name": "Identifier", + "src": "1734:7:0" + } + ], + "id": 101, + "name": "UnaryOperation", + "src": "1733:8:0" + }, + { + "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_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 102, + "name": "Identifier", + "src": "1805:8:0" + } + ], + "id": 104, + "name": "MemberAccess", + "src": "1805:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 105, + "name": "Identifier", + "src": "1823:7:0" + } + ], + "id": 106, + "name": "FunctionCall", + "src": "1805:26:0" + } + ], + "id": 107, + "name": "ExpressionStatement", + "src": "1805:26:0" + } + ], + "id": 108, + "name": "Block", + "src": "1743:97:0" + } + ], + "id": 109, + "name": "IfStatement", + "src": "1729:111:0" + } + ], + "id": 110, + "name": "Block", + "src": "1660:186:0" + } + ], + "id": 111, + "name": "IfStatement", + "src": "1643:203:0" + } + ], + "id": 112, + "name": "Block", + "src": "1423:427:0" + } + ], + "id": 113, + "name": "FunctionDefinition", + "src": "1303:547:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20TransferFrom", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 114, + "name": "ElementaryTypeName", + "src": "1886:7:0" + } + ], + "id": 115, + "name": "VariableDeclaration", + "src": "1886:13:0" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 116, + "name": "ElementaryTypeName", + "src": "1901:7:0" + } + ], + "id": 117, + "name": "VariableDeclaration", + "src": "1901:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 118, + "name": "ElementaryTypeName", + "src": "1914:7:0" + } + ], + "id": 119, + "name": "VariableDeclaration", + "src": "1914:15:0" + } + ], + "id": 120, + "name": "ParameterList", + "src": "1885:45:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 121, + "name": "ParameterList", + "src": "1940:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 123, + 125 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 170, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 122, + "name": "ElementaryTypeName", + "src": "1947:4:0" + } + ], + "id": 123, + "name": "VariableDeclaration", + "src": "1947:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 170, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 124, + "name": "ElementaryTypeName", + "src": "1961:5:0" + } + ], + "id": 125, + "name": "VariableDeclaration", + "src": "1961:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 126, + "name": "Identifier", + "src": "1982:5:0" + } + ], + "id": 127, + "name": "MemberAccess", + "src": "1982:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 128, + "name": "Identifier", + "src": "1993:3:0" + } + ], + "id": 129, + "name": "MemberAccess", + "src": "1993:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30783233623837326464", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 599290589", + "value": "0x23b872dd" + }, + "id": 130, + "name": "Literal", + "src": "2016:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 115, + "type": "address", + "value": "_from" + }, + "id": 131, + "name": "Identifier", + "src": "2047:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 117, + "type": "address", + "value": "_to" + }, + "id": 132, + "name": "Identifier", + "src": "2054:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 119, + "type": "uint256", + "value": "_amount" + }, + "id": 133, + "name": "Identifier", + "src": "2059:7:0" + } + ], + "id": 134, + "name": "FunctionCall", + "src": "1993:74:0" + } + ], + "id": 135, + "name": "FunctionCall", + "src": "1982:86:0" + } + ], + "id": 136, + "name": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "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_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 137, + "name": "Identifier", + "src": "2074:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 138, + "name": "Identifier", + "src": "2082:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens\"", + "value": "not enough allowed tokens" + }, + "id": 139, + "name": "Literal", + "src": "2091:27:0" + } + ], + "id": 140, + "name": "FunctionCall", + "src": "2074:45:0" + } + ], + "id": 141, + "name": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 142, + "name": "Identifier", + "src": "2219:4:0" + } + ], + "id": 143, + "name": "MemberAccess", + "src": "2219:11: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": 144, + "name": "Literal", + "src": "2233:1:0" + } + ], + "id": 145, + "name": "BinaryOperation", + "src": "2219:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 146, + "name": "Identifier", + "src": "2244:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 147, + "name": "Identifier", + "src": "2252:4:0" + } + ], + "id": 148, + "name": "MemberAccess", + "src": "2252:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 149, + "name": "Literal", + "src": "2267:2:0" + } + ], + "id": 150, + "name": "BinaryOperation", + "src": "2252:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 151, + "name": "Literal", + "src": "2271:44:0" + } + ], + "id": 152, + "name": "FunctionCall", + "src": "2244:72:0" + } + ], + "id": 153, + "name": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 154, + "name": "Identifier", + "src": "2324:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 155, + "name": "Identifier", + "src": "2334:3:0" + } + ], + "id": 156, + "name": "MemberAccess", + "src": "2334:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 157, + "name": "Identifier", + "src": "2345:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 158, + "name": "ElementaryTypeNameExpression", + "src": "2352:4:0" + } + ], + "id": 159, + "name": "TupleExpression", + "src": "2351:6:0" + } + ], + "id": 160, + "name": "FunctionCall", + "src": "2334:24:0" + } + ], + "id": 161, + "name": "Assignment", + "src": "2324:34:0" + } + ], + "id": 162, + "name": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "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_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 163, + "name": "Identifier", + "src": "2366:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 164, + "name": "Identifier", + "src": "2374:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens. Token returns false.\"", + "value": "not enough allowed tokens. Token returns false." + }, + "id": 165, + "name": "Literal", + "src": "2383:49:0" + } + ], + "id": 166, + "name": "FunctionCall", + "src": "2366:67:0" + } + ], + "id": 167, + "name": "ExpressionStatement", + "src": "2366:67:0" + } + ], + "id": 168, + "name": "Block", + "src": "2236:204:0" + } + ], + "id": 169, + "name": "IfStatement", + "src": "2215:225:0" + } + ], + "id": 170, + "name": "Block", + "src": "1940:504:0" + } + ], + "id": 171, + "name": "FunctionDefinition", + "src": "1854:590:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20Transfer", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 172, + "name": "ElementaryTypeName", + "src": "2476:7:0" + } + ], + "id": 173, + "name": "VariableDeclaration", + "src": "2476:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 174, + "name": "ElementaryTypeName", + "src": "2489:7:0" + } + ], + "id": 175, + "name": "VariableDeclaration", + "src": "2489:15:0" + } + ], + "id": 176, + "name": "ParameterList", + "src": "2475:30:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 177, + "name": "ParameterList", + "src": "2515:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 179, + 181 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 225, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 178, + "name": "ElementaryTypeName", + "src": "2522:4:0" + } + ], + "id": 179, + "name": "VariableDeclaration", + "src": "2522:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 225, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 180, + "name": "ElementaryTypeName", + "src": "2536:5:0" + } + ], + "id": 181, + "name": "VariableDeclaration", + "src": "2536:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 182, + "name": "Identifier", + "src": "2557:5:0" + } + ], + "id": 183, + "name": "MemberAccess", + "src": "2557:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 184, + "name": "Identifier", + "src": "2568:3:0" + } + ], + "id": 185, + "name": "MemberAccess", + "src": "2568:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30786139303539636262", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2835717307", + "value": "0xa9059cbb" + }, + "id": 186, + "name": "Literal", + "src": "2591:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 173, + "type": "address", + "value": "_to" + }, + "id": 187, + "name": "Identifier", + "src": "2618:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 175, + "type": "uint256", + "value": "_amount" + }, + "id": 188, + "name": "Identifier", + "src": "2623:7:0" + } + ], + "id": 189, + "name": "FunctionCall", + "src": "2568:63:0" + } + ], + "id": 190, + "name": "FunctionCall", + "src": "2557:75:0" + } + ], + "id": 191, + "name": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "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_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 192, + "name": "Identifier", + "src": "2638:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 193, + "name": "Identifier", + "src": "2646:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens\"", + "value": "not enough tokens" + }, + "id": 194, + "name": "Literal", + "src": "2655:19:0" + } + ], + "id": 195, + "name": "FunctionCall", + "src": "2638:37:0" + } + ], + "id": 196, + "name": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 197, + "name": "Identifier", + "src": "2775:4:0" + } + ], + "id": 198, + "name": "MemberAccess", + "src": "2775:11: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": 199, + "name": "Literal", + "src": "2789:1:0" + } + ], + "id": 200, + "name": "BinaryOperation", + "src": "2775:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 201, + "name": "Identifier", + "src": "2800:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 202, + "name": "Identifier", + "src": "2808:4:0" + } + ], + "id": 203, + "name": "MemberAccess", + "src": "2808:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 204, + "name": "Literal", + "src": "2823:2:0" + } + ], + "id": 205, + "name": "BinaryOperation", + "src": "2808:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 206, + "name": "Literal", + "src": "2827:44:0" + } + ], + "id": 207, + "name": "FunctionCall", + "src": "2800:72:0" + } + ], + "id": 208, + "name": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 209, + "name": "Identifier", + "src": "2880:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 210, + "name": "Identifier", + "src": "2890:3:0" + } + ], + "id": 211, + "name": "MemberAccess", + "src": "2890:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 212, + "name": "Identifier", + "src": "2901:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 213, + "name": "ElementaryTypeNameExpression", + "src": "2908:4:0" + } + ], + "id": 214, + "name": "TupleExpression", + "src": "2907:6:0" + } + ], + "id": 215, + "name": "FunctionCall", + "src": "2890:24:0" + } + ], + "id": 216, + "name": "Assignment", + "src": "2880:34:0" + } + ], + "id": 217, + "name": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "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_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 218, + "name": "Identifier", + "src": "2922:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 219, + "name": "Identifier", + "src": "2930:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens. Token returns false.\"", + "value": "not enough tokens. Token returns false." + }, + "id": 220, + "name": "Literal", + "src": "2939:41:0" + } + ], + "id": 221, + "name": "FunctionCall", + "src": "2922:59:0" + } + ], + "id": 222, + "name": "ExpressionStatement", + "src": "2922:59:0" + } + ], + "id": 223, + "name": "Block", + "src": "2792:196:0" + } + ], + "id": 224, + "name": "IfStatement", + "src": "2771:217:0" + } + ], + "id": 225, + "name": "Block", + "src": "2515:477:0" + } + ], + "id": 226, + "name": "FunctionDefinition", + "src": "2448:544:0" + } + ], + "id": 227, + "name": "ContractDefinition", + "src": "805:2189:0" + } + ], + "id": 228, + "name": "SourceUnit", + "src": "755:2240:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.17+commit.d19bba13.Emscripten.clang" + }, + "networks": { + "42220": { + "events": {}, + "links": { + "Hasher": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d" + }, + "address": "0xBdD116cF6B447d038B83b018a1E3f044163b6b44", + "transactionHash": "0x302d0b86874738819e5ee682f19d85c9ecb68c0c16b23d42750cdea699f1a2f0" + } + }, + "schemaVersion": "3.3.4", + "updatedAt": "2021-03-22T01:51:01.738Z", + "networkType": "ethereum", + "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/CELOTornado.0.json b/client/contracts/CELOTornado.0.json new file mode 100644 index 0000000..0f9c915 --- /dev/null +++ b/client/contracts/CELOTornado.0.json @@ -0,0 +1,7219 @@ +{ + "contractName": "ERC20Tornado", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVerifier", + "name": "_verifier", + "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": [ + { + "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" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"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\":[{\"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\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0x708938fd083239d2e9cd17e457cf25a2150bb900082fad58af8b689f786aef9c\",\"urls\":[\"bzz-raw://f345afd62002f883c60c032cd0cb051663dc8a3e59a52bf44109633b96cb3685\",\"dweb:/ipfs/QmNwjnH2uyNoq9GPjNUv6Z1mgtiR5rY3K7EHY74RBjXMpw\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x09c70432243629ef44697fd3d0ca89d3578e2b1c9f46d90757371edb163c14da\",\"urls\":[\"bzz-raw://d2a2c9fa85c32cb15793282792cd25c71804a10aa5a911e41f3bcd07f5df117e\",\"dweb:/ipfs/QmeQ1s6ypNnP7fossR4x9svuuLjcSBtQ5spUTmWGZY5Ljr\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001d1238038062001d12833981810160405260a08110156200004757600080fd5b50805160208201516040830151606084015160809094015192939192909190848484848163ffffffff8116620000af5760405162461bcd60e51b815260040180806020018281038252602781526020018062001c896027913960400191505060405180910390fd5b60208163ffffffff1610620000f65760405162461bcd60e51b815260040180806020018281038252602281526020018062001cd06022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001c48833981519152909101819055815480830183559282905260008051602062001cf28339815191529092018290555b60005463ffffffff9081169082161015620001e4576200019a82806001600160e01b036200029f16565b60028054600181810190925560008051602062001c488339815191520182905580548082018255600082905260008051602062001cf2833981519152018290559092500162000170565b50620001fa81806001600160e01b036200029f16565b60046000015550506068805460ff19166001179055826200024d5760405162461bcd60e51b815260040180806020018281038252602581526020018062001c236025913960400191505060405180910390fd5b606c80546001600160a01b039586166001600160a01b031991821617909155606d80549286169282169290921790915560699290925550606e8054939092169216919091179055506200048c92505050565b600060008051602062001cb0833981519152831062000305576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001cb08339815191528210620003545760405162461bcd60e51b815260040180806020018281038252602181526020018062001c686021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003af57600080fd5b505af4158015620003c4573d6000803e3d6000fd5b505050506040513d6040811015620003db57600080fd5b508051602090910151909250905060008051602062001cb0833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200045557600080fd5b505af41580156200046a573d6000803e3d6000fd5b505050506040513d60408110156200048157600080fd5b505195945050505050565b611787806200049c6000396000f3fe60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c63430005110032", + "sourceMap": "805:2189:0:-;;;1430:34:2;;;-1:-1:-1;;;;;;1468:27:2;;;867:237:0;5:2:-1;;;;30:1;27;20:12;5:2;867:237:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;867:237: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;;;2260:17:8;2252:67;;;;-1:-1:-1;;;2252:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2325:8;:20;;-1:-1:-1;;;;;2325:20:8;;;-1:-1:-1;;;;;;2325:20:8;;;;;;;2351:8;:20;;;;;;;;;;;;;;;2377:12;:28;;;;-1:-1:-1;1085:5:0;:14;;;;;;;;;;;;;;-1:-1:-1;805:2189:0;;-1:-1:-1;;;805:2189: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:2189:0:-;;;;;;;", + "deployedSourceMap": "805:2189:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5355:102:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5355:102:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5355:102:8;-1:-1:-1;;;;;5355:102:8;;:::i;:::-;;1089:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:47:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1089:47:8;;:::i;:::-;;;;;;;;;;;;;;;;;;3478:781;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3478:781:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;3478:781:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3478:781: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;3478:781:8;;-1:-1:-1;3478:781:8;-1:-1:-1;3478:781:8;;;;;;;;-1:-1:-1;;;;;3478:781:8;;;;;;;;;;;;;;;;;;;;;;;;:::i;1278:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1278:25:8;;;:::i;:::-;;;;-1:-1:-1;;;;;1278: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;:::-;;;;;;;;;;;;;;;;;;;1463:23:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1463: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;1231:43:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1231:43:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1231:43:8;;:::i;1058:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1058:27:8;;;:::i;1430:34:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:2;;;:::i;5192:113:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5192:113:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5192:113:8;-1:-1:-1;;;;;5192:113:8;;:::i;4669:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4669:293:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4669:293:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4669:293:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4669: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;4669:293:8;;-1:-1:-1;4669:293:8;-1:-1:-1;4669: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;4669:293:8;;;;;;;;;;;;;;;;;2658:324;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2658: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;4492:116:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4492:116:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4492: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;5355:102:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5429:8;:23;;-1:-1:-1;;;;;;5429:23:8;-1:-1:-1;;;;;5429:23:8;;;;;;;;;;5355:102::o;1089:47::-;;;;;;;;;;;;;;;:::o;3478:781::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;3695:12:8;;3687:20;;;3679:59;;;;;-1:-1:-1;;;3679:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3753:31;;;;:15;:31;;;;;;;;3752:32;3744:76;;;;;-1:-1:-1;;;3744:76:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3834:18;3846:5;3834:11;:18::i;:::-;3826:59;;;;;-1:-1:-1;;;3826:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3932:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4003:19:8;;;3932:126;;;;4024:17;;;3932:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3932:126:8;;:8;;;;;:20;;3953:6;;;;3932: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;3932: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;;3932:126:8;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3932:126:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3932:126:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3932:126:8;3924:161;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;;;;4092:31;;;;:15;:31;;;;;:38;;-1:-1:-1;;4092:38:8;4126:4;4092:38;;;4136:53;4153:10;4165:8;4175:4;4181:7;4136:16;:53::i;:::-;4200:54;;;-1:-1:-1;;;;;4200:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;-1:-1:-1;;;;;;3478:781:8:o;1278:25::-;;;-1:-1:-1;;;;;1278: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;1463:23:8:-;;;-1:-1:-1;;;;;1463: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;1231:43:8:-;;;;;;;;;;;;;;;:::o;1058:27::-;;;;:::o;1430:34:2:-;;;;;;:::o;5192:113:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5266:8;:34;;-1:-1:-1;;;;;;5266:34:8;-1:-1:-1;;;;;5266:34:8;;;;;;;;;;5192:113::o;4669:293::-;4785:35;;;;;;;;;;;;;;;;4750:19;;4796:16;4785:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4785:35:8;-1:-1:-1;4777:43:8;-1:-1:-1;4830:6:8;4826:132;4842:27;;;4826:132;;;4888:28;4896:16;;4913:1;4896:19;;;;;;;;;;;;;4888:7;:28::i;:::-;4884:68;;;4939:4;4928:5;4934:1;4928:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4884:68;4871:3;;4826:132;;;;4669:293;;;;:::o;2658:324::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;2070:5;2741:24:8;;;:11;:24;;;;;;2056:19:18;2741:24:8;2740:25;2732:71;;;;-1:-1:-1;;;2732:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2810:20;2833;2841:11;2833:7;:20::i;:::-;2859:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2859:31:8;2886:4;2859:31;;;2810:43;-1:-1:-1;2896:17:8;:15;:17::i;:::-;2925:52;;;;;;;;2961:15;2925:52;;;;;;2933:11;;2925:52;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;2658: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;4492:116:8:-;4553:4;4572:31;;;:15;:31;;;;;;;;;4492: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;1303:547:0:-;1450:7;1437:9;:20;1429:81;;;;-1:-1:-1;;;1429:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1517:51;1536:10;1563:4;1548:12;;:19;1517:18;:51::i;:::-;1578:8;;1574:63;;1596:34;1615:8;1625:4;1596:18;:34::i;:::-;1647:11;;1643:203;;1687:34;;1669:12;;-1:-1:-1;;;;;1687:15:0;;;1709:7;;1669:12;1687:34;1669:12;1687:34;1709:7;1687: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;;1668:53:0;;;1734:7;1729:111;;1805:26;;-1:-1:-1;;;;;1805:17:0;;;:26;;;;;1823:7;;1805:26;;;;1823:7;1805:17;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1805:26:0;1729:111;1643:203;;1303:547;;;;:::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;1108:191:0:-;1158:9;:14;1150:75;;;;-1:-1:-1;;;1150:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1231:63;1254:10;1274:4;1281:12;;1231:22;:63::i;:::-;1108:191::o;2448:544::-;2557:5;;2568:63;;;-1:-1:-1;;;;;2568:63:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2568:63:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2557:75:0;;;;2522:12;;2536:17;;2557:5;;;2568:63;2557: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;;;2557: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;;2521:111:0;;;;2646:7;2638:37;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;;;;2775:11;;:15;2771:217;;2808:4;:11;2823:2;2808:17;2800:72;;;;-1:-1:-1;;;2800:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2901:4;2890:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2890:24:0;;-1:-1:-1;2890:24:0;2922:59;;;;-1:-1:-1;;;2922:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1854:590;1982:5;;1993:74;;;-1:-1:-1;;;;;1993:74:0;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1993:74:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1982:86:0;;;;1947:12;;1961:17;;1982:5;;;1993:74;1982: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;;;1982: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;;1946:122:0;;;;2082:7;2074:45;;;;;-1:-1:-1;;;2074:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2219:11;;:15;2215:225;;2252:4;:11;2267:2;2252:17;2244:72;;;;-1:-1:-1;;;2244:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2345:4;2334:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2334:24:0;;-1:-1:-1;2334:24:0;2366:67;;;;-1:-1:-1;;;2366:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "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\n constructor(\n IVerifier _verifier,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator,\n address _token\n ) Tornado(_verifier, _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 _fee, uint256 _refund) internal {\n require(msg.value == _refund, \"Incorrect refund amount received by the contract\");\n\n _safeErc20Transfer(_recipient, denomination - _fee);\n if (_fee > 0) {\n _safeErc20Transfer(_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": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "ast": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + }, + "id": 228, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "755:23:0" + }, + { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 228, + "sourceUnit": 1195, + "src": "780:23:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3, + "name": "Tornado", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1194, + "src": "830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Tornado_$1194", + "typeString": "contract Tornado" + } + }, + "id": 4, + "nodeType": "InheritanceSpecifier", + "src": "830:7:0" + } + ], + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 227, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 6, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "842:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "842:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 29, + "nodeType": "Block", + "src": "1079:25:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 25, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 26, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1093:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1085:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 28, + "nodeType": "ExpressionStatement", + "src": "1085:14:0" + } + ] + }, + "documentation": null, + "id": 30, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19, + "name": "_verifier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1016:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + { + "argumentTypes": null, + "id": 20, + "name": "_denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "1027:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 21, + "name": "_merkleTreeHeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "1042:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 22, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "1061:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 23, + "modifierName": { + "argumentTypes": null, + "id": 18, + "name": "Tornado", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1194, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Tornado_$1194_$", + "typeString": "type(contract Tornado)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1008:63:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "name": "_verifier", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "884:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + }, + "typeName": { + "contractScope": null, + "id": 7, + "name": "IVerifier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 891, + "src": "884:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10, + "name": "_denomination", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "909:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "909:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12, + "name": "_merkleTreeHeight", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "936:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "936:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14, + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "966:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "989:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "989:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "878:129:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [], + "src": "1079:0:0" + }, + "scope": 227, + "src": "867:237:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1144:155:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 34, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1158:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1158:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1158:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1174:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + }, + "value": "ETH value is supposed to be 0 for ERC20 instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "id": 33, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1150:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1150:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 42, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1254:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1254:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "1274:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "id": 44, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1266:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1266:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 47, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1281:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 41, + "name": "_safeErc20TransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "1231:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "1231:63:0" + } + ] + }, + "documentation": null, + "id": 51, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:2:0" + }, + "returnParameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1144:0:0" + }, + "scope": 227, + "src": "1108:191:0", + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + { + "body": { + "id": 112, + "nodeType": "Block", + "src": "1423:427:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 63, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1437:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1437:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 65, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1437:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1459:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + }, + "value": "Incorrect refund amount received by the contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "id": 62, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1429:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 69, + "nodeType": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 71, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1536:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 72, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1548:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 73, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1563:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1548:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 70, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1517:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1517:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 76, + "nodeType": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 77, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1578:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1585:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1578:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 86, + "nodeType": "IfStatement", + "src": "1574:63:0", + "trueBody": { + "id": 85, + "nodeType": "Block", + "src": "1588:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1615:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 82, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1625:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 80, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1596:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 84, + "nodeType": "ExpressionStatement", + "src": "1596:34:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 87, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1647:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1657:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1647:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 111, + "nodeType": "IfStatement", + "src": "1643:203:0", + "trueBody": { + "id": 110, + "nodeType": "Block", + "src": "1660:186:0", + "statements": [ + { + "assignments": [ + 91, + null + ], + "declarations": [ + { + "constant": false, + "id": 91, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "1669:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 90, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1669:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 99, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "arguments": [ + { + "argumentTypes": null, + "id": 95, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1709:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 92, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1687:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687: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": 98, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1733:8:0", + "subExpression": { + "argumentTypes": null, + "id": 100, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 91, + "src": "1734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 109, + "nodeType": "IfStatement", + "src": "1729:111:0", + "trueBody": { + "id": 108, + "nodeType": "Block", + "src": "1743:97:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 105, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1823:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 102, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1805:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 107, + "nodeType": "ExpressionStatement", + "src": "1805:26:0" + } + ] + } + } + ] + } + } + ] + }, + "documentation": null, + "id": 113, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processWithdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 53, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1329:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1329:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "_relayer", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1357:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 54, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1383:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 56, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1383:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "_refund", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1397:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1397:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1328:85:0" + }, + "returnParameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [], + "src": "1423:0:0" + }, + "scope": 227, + "src": "1303:547:0", + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "1940:504:0", + "statements": [ + { + "assignments": [ + 123, + 125 + ], + "declarations": [ + { + "constant": false, + "id": 123, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1947:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 122, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1947:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 125, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1961:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 124, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1961:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 136, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30783233623837326464", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2016:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + "value": "0x23b872dd" + }, + { + "argumentTypes": null, + "id": 131, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "2047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 132, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2054:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 133, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2059:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 128, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "1993:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1993:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1993:74:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 126, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1982: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": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1982:86:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 138, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2082:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + }, + "value": "not enough allowed tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "id": 137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 141, + "nodeType": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 142, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2219:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2219:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2233:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2219:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "2215:225:0", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "2236:204:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 147, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2252:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2252:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2267:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2252:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2271:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 146, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2244:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2244:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 154, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2324:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 159, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2351:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 155, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2334:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2324:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 164, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2383:49:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + }, + "value": "not enough allowed tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "id": 163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2366:67:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 167, + "nodeType": "ExpressionStatement", + "src": "2366:67:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20TransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 115, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1886:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1886:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 117, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1901:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1901:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 119, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1914:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1914:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1885:45:0" + }, + "returnParameters": { + "id": 121, + "nodeType": "ParameterList", + "parameters": [], + "src": "1940:0:0" + }, + "scope": 227, + "src": "1854:590:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 225, + "nodeType": "Block", + "src": "2515:477:0", + "statements": [ + { + "assignments": [ + 179, + 181 + ], + "declarations": [ + { + "constant": false, + "id": 179, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2522:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2522:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 181, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2536:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 180, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2536:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30786139303539636262", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2591:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + "value": "0xa9059cbb" + }, + { + "argumentTypes": null, + "id": 187, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "2618:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 188, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "2623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 184, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2568:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2568:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2568:63:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 182, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2557:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2557: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": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 193, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2646:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e73", + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2655:19:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + }, + "value": "not enough tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2638:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2638:37:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 197, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2775:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2775:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2789:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2775:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 224, + "nodeType": "IfStatement", + "src": "2771:217:0", + "trueBody": { + "id": 223, + "nodeType": "Block", + "src": "2792:196:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 202, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2808:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2808:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2823:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2808:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2827:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2800:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2800:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2880:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 212, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2901:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2908:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 214, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2907:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 210, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2890:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2890:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2890:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2880:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 219, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2939:41:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + }, + "value": "not enough tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "id": 218, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2922:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2922:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "2922:59:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20Transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2476:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2476:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2489:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2489:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2475:30:0" + }, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "2515:0:0" + }, + "scope": 227, + "src": "2448:544:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 228, + "src": "805:2189:0" + } + ], + "src": "755:2240:0" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".17" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "755:23:0" + }, + { + "attributes": { + "SourceUnit": 1195, + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "scope": 228, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "780:23:0" + }, + { + "attributes": { + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "scope": 228 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Tornado", + "referencedDeclaration": 1194, + "type": "contract Tornado" + }, + "id": 3, + "name": "UserDefinedTypeName", + "src": "830:7:0" + } + ], + "id": 4, + "name": "InheritanceSpecifier", + "src": "830:7:0" + }, + { + "attributes": { + "constant": false, + "name": "token", + "scope": 227, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5, + "name": "ElementaryTypeName", + "src": "842:7:0" + } + ], + "id": 6, + "name": "VariableDeclaration", + "src": "842:20:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "name": "", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_verifier", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IVerifier", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IVerifier", + "referencedDeclaration": 891, + "type": "contract IVerifier" + }, + "id": 7, + "name": "UserDefinedTypeName", + "src": "884:9:0" + } + ], + "id": 8, + "name": "VariableDeclaration", + "src": "884:19:0" + }, + { + "attributes": { + "constant": false, + "name": "_denomination", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 9, + "name": "ElementaryTypeName", + "src": "909:7:0" + } + ], + "id": 10, + "name": "VariableDeclaration", + "src": "909:21:0" + }, + { + "attributes": { + "constant": false, + "name": "_merkleTreeHeight", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint32", + "type": "uint32" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "936:6:0" + } + ], + "id": 12, + "name": "VariableDeclaration", + "src": "936:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_operator", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 13, + "name": "ElementaryTypeName", + "src": "966:7:0" + } + ], + "id": 14, + "name": "VariableDeclaration", + "src": "966:17:0" + }, + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "989:7:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "989:14:0" + } + ], + "id": 17, + "name": "ParameterList", + "src": "878:129:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 24, + "name": "ParameterList", + "src": "1079:0:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1194, + "type": "type(contract Tornado)", + "value": "Tornado" + }, + "id": 18, + "name": "Identifier", + "src": "1008:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 8, + "type": "contract IVerifier", + "value": "_verifier" + }, + "id": 19, + "name": "Identifier", + "src": "1016:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "uint256", + "value": "_denomination" + }, + "id": 20, + "name": "Identifier", + "src": "1027:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint32", + "value": "_merkleTreeHeight" + }, + "id": 21, + "name": "Identifier", + "src": "1042:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "address", + "value": "_operator" + }, + "id": 22, + "name": "Identifier", + "src": "1061:9:0" + } + ], + "id": 23, + "name": "ModifierInvocation", + "src": "1008:63:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6, + "type": "address", + "value": "token" + }, + "id": 25, + "name": "Identifier", + "src": "1085:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 16, + "type": "address", + "value": "_token" + }, + "id": 26, + "name": "Identifier", + "src": "1093:6:0" + } + ], + "id": 27, + "name": "Assignment", + "src": "1085:14:0" + } + ], + "id": 28, + "name": "ExpressionStatement", + "src": "1085:14:0" + } + ], + "id": 29, + "name": "Block", + "src": "1079:25:0" + } + ], + "id": 30, + "name": "FunctionDefinition", + "src": "867:237:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processDeposit", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 31, + "name": "ParameterList", + "src": "1132:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 32, + "name": "ParameterList", + "src": "1144:0:0" + }, + { + "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_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 33, + "name": "Identifier", + "src": "1150:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 34, + "name": "Identifier", + "src": "1158:3:0" + } + ], + "id": 35, + "name": "MemberAccess", + "src": "1158:9: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": 36, + "name": "Literal", + "src": "1171:1:0" + } + ], + "id": 37, + "name": "BinaryOperation", + "src": "1158:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "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": 38, + "name": "Literal", + "src": "1174:50:0" + } + ], + "id": 39, + "name": "FunctionCall", + "src": "1150:75:0" + } + ], + "id": 40, + "name": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 171, + "type": "function (address,address,uint256)", + "value": "_safeErc20TransferFrom" + }, + "id": 41, + "name": "Identifier", + "src": "1231:22:0" + }, + { + "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": 3260, + "type": "msg", + "value": "msg" + }, + "id": 42, + "name": "Identifier", + "src": "1254:3:0" + } + ], + "id": 43, + "name": "MemberAccess", + "src": "1254:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 44, + "name": "ElementaryTypeNameExpression", + "src": "1266:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3284, + "type": "contract ERC20Tornado", + "value": "this" + }, + "id": 45, + "name": "Identifier", + "src": "1274:4:0" + } + ], + "id": 46, + "name": "FunctionCall", + "src": "1266:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 47, + "name": "Identifier", + "src": "1281:12:0" + } + ], + "id": 48, + "name": "FunctionCall", + "src": "1231:63:0" + } + ], + "id": 49, + "name": "ExpressionStatement", + "src": "1231:63:0" + } + ], + "id": 50, + "name": "Block", + "src": "1144:155:0" + } + ], + "id": 51, + "name": "FunctionDefinition", + "src": "1108:191:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processWithdraw", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_recipient", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 52, + "name": "ElementaryTypeName", + "src": "1329:15:0" + } + ], + "id": 53, + "name": "VariableDeclaration", + "src": "1329:26:0" + }, + { + "attributes": { + "constant": false, + "name": "_relayer", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 54, + "name": "ElementaryTypeName", + "src": "1357:15:0" + } + ], + "id": 55, + "name": "VariableDeclaration", + "src": "1357:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_fee", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 56, + "name": "ElementaryTypeName", + "src": "1383:7:0" + } + ], + "id": 57, + "name": "VariableDeclaration", + "src": "1383:12:0" + }, + { + "attributes": { + "constant": false, + "name": "_refund", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 58, + "name": "ElementaryTypeName", + "src": "1397:7:0" + } + ], + "id": 59, + "name": "VariableDeclaration", + "src": "1397:15:0" + } + ], + "id": 60, + "name": "ParameterList", + "src": "1328:85:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 61, + "name": "ParameterList", + "src": "1423:0:0" + }, + { + "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_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 62, + "name": "Identifier", + "src": "1429:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 63, + "name": "Identifier", + "src": "1437:3:0" + } + ], + "id": 64, + "name": "MemberAccess", + "src": "1437:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 65, + "name": "Identifier", + "src": "1450:7:0" + } + ], + "id": 66, + "name": "BinaryOperation", + "src": "1437:20:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Incorrect refund amount received by the contract\"", + "value": "Incorrect refund amount received by the contract" + }, + "id": 67, + "name": "Literal", + "src": "1459:50:0" + } + ], + "id": 68, + "name": "FunctionCall", + "src": "1429:81:0" + } + ], + "id": 69, + "name": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 70, + "name": "Identifier", + "src": "1517:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 71, + "name": "Identifier", + "src": "1536:10: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": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 72, + "name": "Identifier", + "src": "1548:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 73, + "name": "Identifier", + "src": "1563:4:0" + } + ], + "id": 74, + "name": "BinaryOperation", + "src": "1548:19:0" + } + ], + "id": 75, + "name": "FunctionCall", + "src": "1517:51:0" + } + ], + "id": 76, + "name": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "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": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 77, + "name": "Identifier", + "src": "1578:4: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": 78, + "name": "Literal", + "src": "1585:1:0" + } + ], + "id": 79, + "name": "BinaryOperation", + "src": "1578:8:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 80, + "name": "Identifier", + "src": "1596:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 81, + "name": "Identifier", + "src": "1615:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 82, + "name": "Identifier", + "src": "1625:4:0" + } + ], + "id": 83, + "name": "FunctionCall", + "src": "1596:34:0" + } + ], + "id": 84, + "name": "ExpressionStatement", + "src": "1596:34:0" + } + ], + "id": 85, + "name": "Block", + "src": "1588:49:0" + } + ], + "id": 86, + "name": "IfStatement", + "src": "1574:63:0" + }, + { + "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": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 87, + "name": "Identifier", + "src": "1647: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": 88, + "name": "Literal", + "src": "1657:1:0" + } + ], + "id": 89, + "name": "BinaryOperation", + "src": "1647:11:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 91, + null + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 110, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 90, + "name": "ElementaryTypeName", + "src": "1669:4:0" + } + ], + "id": 91, + "name": "VariableDeclaration", + "src": "1669:12:0" + }, + { + "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": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 92, + "name": "Identifier", + "src": "1687:10:0" + } + ], + "id": 93, + "name": "MemberAccess", + "src": "1687:15:0" + } + ], + "id": 94, + "name": "MemberAccess", + "src": "1687:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 95, + "name": "Identifier", + "src": "1709:7:0" + } + ], + "id": 96, + "name": "FunctionCall", + "src": "1687:30:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"\"", + "value": "" + }, + "id": 97, + "name": "Literal", + "src": "1718:2:0" + } + ], + "id": 98, + "name": "FunctionCall", + "src": "1687:34:0" + } + ], + "id": 99, + "name": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 91, + "type": "bool", + "value": "success" + }, + "id": 100, + "name": "Identifier", + "src": "1734:7:0" + } + ], + "id": 101, + "name": "UnaryOperation", + "src": "1733:8:0" + }, + { + "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_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 102, + "name": "Identifier", + "src": "1805:8:0" + } + ], + "id": 104, + "name": "MemberAccess", + "src": "1805:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 105, + "name": "Identifier", + "src": "1823:7:0" + } + ], + "id": 106, + "name": "FunctionCall", + "src": "1805:26:0" + } + ], + "id": 107, + "name": "ExpressionStatement", + "src": "1805:26:0" + } + ], + "id": 108, + "name": "Block", + "src": "1743:97:0" + } + ], + "id": 109, + "name": "IfStatement", + "src": "1729:111:0" + } + ], + "id": 110, + "name": "Block", + "src": "1660:186:0" + } + ], + "id": 111, + "name": "IfStatement", + "src": "1643:203:0" + } + ], + "id": 112, + "name": "Block", + "src": "1423:427:0" + } + ], + "id": 113, + "name": "FunctionDefinition", + "src": "1303:547:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20TransferFrom", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 114, + "name": "ElementaryTypeName", + "src": "1886:7:0" + } + ], + "id": 115, + "name": "VariableDeclaration", + "src": "1886:13:0" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 116, + "name": "ElementaryTypeName", + "src": "1901:7:0" + } + ], + "id": 117, + "name": "VariableDeclaration", + "src": "1901:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 118, + "name": "ElementaryTypeName", + "src": "1914:7:0" + } + ], + "id": 119, + "name": "VariableDeclaration", + "src": "1914:15:0" + } + ], + "id": 120, + "name": "ParameterList", + "src": "1885:45:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 121, + "name": "ParameterList", + "src": "1940:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 123, + 125 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 170, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 122, + "name": "ElementaryTypeName", + "src": "1947:4:0" + } + ], + "id": 123, + "name": "VariableDeclaration", + "src": "1947:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 170, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 124, + "name": "ElementaryTypeName", + "src": "1961:5:0" + } + ], + "id": 125, + "name": "VariableDeclaration", + "src": "1961:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 126, + "name": "Identifier", + "src": "1982:5:0" + } + ], + "id": 127, + "name": "MemberAccess", + "src": "1982:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 128, + "name": "Identifier", + "src": "1993:3:0" + } + ], + "id": 129, + "name": "MemberAccess", + "src": "1993:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30783233623837326464", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 599290589", + "value": "0x23b872dd" + }, + "id": 130, + "name": "Literal", + "src": "2016:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 115, + "type": "address", + "value": "_from" + }, + "id": 131, + "name": "Identifier", + "src": "2047:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 117, + "type": "address", + "value": "_to" + }, + "id": 132, + "name": "Identifier", + "src": "2054:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 119, + "type": "uint256", + "value": "_amount" + }, + "id": 133, + "name": "Identifier", + "src": "2059:7:0" + } + ], + "id": 134, + "name": "FunctionCall", + "src": "1993:74:0" + } + ], + "id": 135, + "name": "FunctionCall", + "src": "1982:86:0" + } + ], + "id": 136, + "name": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "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_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 137, + "name": "Identifier", + "src": "2074:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 138, + "name": "Identifier", + "src": "2082:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens\"", + "value": "not enough allowed tokens" + }, + "id": 139, + "name": "Literal", + "src": "2091:27:0" + } + ], + "id": 140, + "name": "FunctionCall", + "src": "2074:45:0" + } + ], + "id": 141, + "name": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 142, + "name": "Identifier", + "src": "2219:4:0" + } + ], + "id": 143, + "name": "MemberAccess", + "src": "2219:11: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": 144, + "name": "Literal", + "src": "2233:1:0" + } + ], + "id": 145, + "name": "BinaryOperation", + "src": "2219:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 146, + "name": "Identifier", + "src": "2244:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 147, + "name": "Identifier", + "src": "2252:4:0" + } + ], + "id": 148, + "name": "MemberAccess", + "src": "2252:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 149, + "name": "Literal", + "src": "2267:2:0" + } + ], + "id": 150, + "name": "BinaryOperation", + "src": "2252:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 151, + "name": "Literal", + "src": "2271:44:0" + } + ], + "id": 152, + "name": "FunctionCall", + "src": "2244:72:0" + } + ], + "id": 153, + "name": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 154, + "name": "Identifier", + "src": "2324:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 155, + "name": "Identifier", + "src": "2334:3:0" + } + ], + "id": 156, + "name": "MemberAccess", + "src": "2334:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 157, + "name": "Identifier", + "src": "2345:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 158, + "name": "ElementaryTypeNameExpression", + "src": "2352:4:0" + } + ], + "id": 159, + "name": "TupleExpression", + "src": "2351:6:0" + } + ], + "id": 160, + "name": "FunctionCall", + "src": "2334:24:0" + } + ], + "id": 161, + "name": "Assignment", + "src": "2324:34:0" + } + ], + "id": 162, + "name": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "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_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 163, + "name": "Identifier", + "src": "2366:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 164, + "name": "Identifier", + "src": "2374:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens. Token returns false.\"", + "value": "not enough allowed tokens. Token returns false." + }, + "id": 165, + "name": "Literal", + "src": "2383:49:0" + } + ], + "id": 166, + "name": "FunctionCall", + "src": "2366:67:0" + } + ], + "id": 167, + "name": "ExpressionStatement", + "src": "2366:67:0" + } + ], + "id": 168, + "name": "Block", + "src": "2236:204:0" + } + ], + "id": 169, + "name": "IfStatement", + "src": "2215:225:0" + } + ], + "id": 170, + "name": "Block", + "src": "1940:504:0" + } + ], + "id": 171, + "name": "FunctionDefinition", + "src": "1854:590:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20Transfer", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 172, + "name": "ElementaryTypeName", + "src": "2476:7:0" + } + ], + "id": 173, + "name": "VariableDeclaration", + "src": "2476:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 174, + "name": "ElementaryTypeName", + "src": "2489:7:0" + } + ], + "id": 175, + "name": "VariableDeclaration", + "src": "2489:15:0" + } + ], + "id": 176, + "name": "ParameterList", + "src": "2475:30:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 177, + "name": "ParameterList", + "src": "2515:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 179, + 181 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 225, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 178, + "name": "ElementaryTypeName", + "src": "2522:4:0" + } + ], + "id": 179, + "name": "VariableDeclaration", + "src": "2522:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 225, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 180, + "name": "ElementaryTypeName", + "src": "2536:5:0" + } + ], + "id": 181, + "name": "VariableDeclaration", + "src": "2536:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 182, + "name": "Identifier", + "src": "2557:5:0" + } + ], + "id": 183, + "name": "MemberAccess", + "src": "2557:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 184, + "name": "Identifier", + "src": "2568:3:0" + } + ], + "id": 185, + "name": "MemberAccess", + "src": "2568:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30786139303539636262", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2835717307", + "value": "0xa9059cbb" + }, + "id": 186, + "name": "Literal", + "src": "2591:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 173, + "type": "address", + "value": "_to" + }, + "id": 187, + "name": "Identifier", + "src": "2618:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 175, + "type": "uint256", + "value": "_amount" + }, + "id": 188, + "name": "Identifier", + "src": "2623:7:0" + } + ], + "id": 189, + "name": "FunctionCall", + "src": "2568:63:0" + } + ], + "id": 190, + "name": "FunctionCall", + "src": "2557:75:0" + } + ], + "id": 191, + "name": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "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_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 192, + "name": "Identifier", + "src": "2638:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 193, + "name": "Identifier", + "src": "2646:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens\"", + "value": "not enough tokens" + }, + "id": 194, + "name": "Literal", + "src": "2655:19:0" + } + ], + "id": 195, + "name": "FunctionCall", + "src": "2638:37:0" + } + ], + "id": 196, + "name": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 197, + "name": "Identifier", + "src": "2775:4:0" + } + ], + "id": 198, + "name": "MemberAccess", + "src": "2775:11: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": 199, + "name": "Literal", + "src": "2789:1:0" + } + ], + "id": 200, + "name": "BinaryOperation", + "src": "2775:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 201, + "name": "Identifier", + "src": "2800:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 202, + "name": "Identifier", + "src": "2808:4:0" + } + ], + "id": 203, + "name": "MemberAccess", + "src": "2808:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 204, + "name": "Literal", + "src": "2823:2:0" + } + ], + "id": 205, + "name": "BinaryOperation", + "src": "2808:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 206, + "name": "Literal", + "src": "2827:44:0" + } + ], + "id": 207, + "name": "FunctionCall", + "src": "2800:72:0" + } + ], + "id": 208, + "name": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 209, + "name": "Identifier", + "src": "2880:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 210, + "name": "Identifier", + "src": "2890:3:0" + } + ], + "id": 211, + "name": "MemberAccess", + "src": "2890:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 212, + "name": "Identifier", + "src": "2901:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 213, + "name": "ElementaryTypeNameExpression", + "src": "2908:4:0" + } + ], + "id": 214, + "name": "TupleExpression", + "src": "2907:6:0" + } + ], + "id": 215, + "name": "FunctionCall", + "src": "2890:24:0" + } + ], + "id": 216, + "name": "Assignment", + "src": "2880:34:0" + } + ], + "id": 217, + "name": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "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_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 218, + "name": "Identifier", + "src": "2922:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 219, + "name": "Identifier", + "src": "2930:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens. Token returns false.\"", + "value": "not enough tokens. Token returns false." + }, + "id": 220, + "name": "Literal", + "src": "2939:41:0" + } + ], + "id": 221, + "name": "FunctionCall", + "src": "2922:59:0" + } + ], + "id": 222, + "name": "ExpressionStatement", + "src": "2922:59:0" + } + ], + "id": 223, + "name": "Block", + "src": "2792:196:0" + } + ], + "id": 224, + "name": "IfStatement", + "src": "2771:217:0" + } + ], + "id": 225, + "name": "Block", + "src": "2515:477:0" + } + ], + "id": 226, + "name": "FunctionDefinition", + "src": "2448:544:0" + } + ], + "id": 227, + "name": "ContractDefinition", + "src": "805:2189:0" + } + ], + "id": 228, + "name": "SourceUnit", + "src": "755:2240:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.17+commit.d19bba13.Emscripten.clang" + }, + "networks": { + "42220": { + "events": {}, + "links": { + "Hasher": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d" + }, + "address": "0x3eE407835492fa38Fac8Ba47298003d50Ea43f7f", + "transactionHash": "0x5dbec69190df2c544dc25de5da6d76cede1eada04f8ab3ffb1b675f15da3a33d" + } + }, + "schemaVersion": "3.3.4", + "updatedAt": "2021-03-22T01:52:46.670Z", + "networkType": "ethereum", + "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/CELOTornado.1.json b/client/contracts/CELOTornado.1.json new file mode 100644 index 0000000..5221a79 --- /dev/null +++ b/client/contracts/CELOTornado.1.json @@ -0,0 +1,7219 @@ +{ + "contractName": "ERC20Tornado", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVerifier", + "name": "_verifier", + "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": [ + { + "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" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"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\":[{\"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\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0x708938fd083239d2e9cd17e457cf25a2150bb900082fad58af8b689f786aef9c\",\"urls\":[\"bzz-raw://f345afd62002f883c60c032cd0cb051663dc8a3e59a52bf44109633b96cb3685\",\"dweb:/ipfs/QmNwjnH2uyNoq9GPjNUv6Z1mgtiR5rY3K7EHY74RBjXMpw\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x09c70432243629ef44697fd3d0ca89d3578e2b1c9f46d90757371edb163c14da\",\"urls\":[\"bzz-raw://d2a2c9fa85c32cb15793282792cd25c71804a10aa5a911e41f3bcd07f5df117e\",\"dweb:/ipfs/QmeQ1s6ypNnP7fossR4x9svuuLjcSBtQ5spUTmWGZY5Ljr\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001d1238038062001d12833981810160405260a08110156200004757600080fd5b50805160208201516040830151606084015160809094015192939192909190848484848163ffffffff8116620000af5760405162461bcd60e51b815260040180806020018281038252602781526020018062001c896027913960400191505060405180910390fd5b60208163ffffffff1610620000f65760405162461bcd60e51b815260040180806020018281038252602281526020018062001cd06022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001c48833981519152909101819055815480830183559282905260008051602062001cf28339815191529092018290555b60005463ffffffff9081169082161015620001e4576200019a82806001600160e01b036200029f16565b60028054600181810190925560008051602062001c488339815191520182905580548082018255600082905260008051602062001cf2833981519152018290559092500162000170565b50620001fa81806001600160e01b036200029f16565b60046000015550506068805460ff19166001179055826200024d5760405162461bcd60e51b815260040180806020018281038252602581526020018062001c236025913960400191505060405180910390fd5b606c80546001600160a01b039586166001600160a01b031991821617909155606d80549286169282169290921790915560699290925550606e8054939092169216919091179055506200048c92505050565b600060008051602062001cb0833981519152831062000305576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001cb08339815191528210620003545760405162461bcd60e51b815260040180806020018281038252602181526020018062001c686021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003af57600080fd5b505af4158015620003c4573d6000803e3d6000fd5b505050506040513d6040811015620003db57600080fd5b508051602090910151909250905060008051602062001cb0833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200045557600080fd5b505af41580156200046a573d6000803e3d6000fd5b505050506040513d60408110156200048157600080fd5b505195945050505050565b611787806200049c6000396000f3fe60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c63430005110032", + "sourceMap": "805:2189:0:-;;;1430:34:2;;;-1:-1:-1;;;;;;1468:27:2;;;867:237:0;5:2:-1;;;;30:1;27;20:12;5:2;867:237:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;867:237: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;;;2260:17:8;2252:67;;;;-1:-1:-1;;;2252:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2325:8;:20;;-1:-1:-1;;;;;2325:20:8;;;-1:-1:-1;;;;;;2325:20:8;;;;;;;2351:8;:20;;;;;;;;;;;;;;;2377:12;:28;;;;-1:-1:-1;1085:5:0;:14;;;;;;;;;;;;;;-1:-1:-1;805:2189:0;;-1:-1:-1;;;805:2189: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:2189:0:-;;;;;;;", + "deployedSourceMap": "805:2189:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5355:102:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5355:102:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5355:102:8;-1:-1:-1;;;;;5355:102:8;;:::i;:::-;;1089:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:47:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1089:47:8;;:::i;:::-;;;;;;;;;;;;;;;;;;3478:781;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3478:781:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;3478:781:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3478:781: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;3478:781:8;;-1:-1:-1;3478:781:8;-1:-1:-1;3478:781:8;;;;;;;;-1:-1:-1;;;;;3478:781:8;;;;;;;;;;;;;;;;;;;;;;;;:::i;1278:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1278:25:8;;;:::i;:::-;;;;-1:-1:-1;;;;;1278: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;:::-;;;;;;;;;;;;;;;;;;;1463:23:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1463: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;1231:43:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1231:43:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1231:43:8;;:::i;1058:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1058:27:8;;;:::i;1430:34:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:2;;;:::i;5192:113:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5192:113:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5192:113:8;-1:-1:-1;;;;;5192:113:8;;:::i;4669:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4669:293:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4669:293:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4669:293:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4669: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;4669:293:8;;-1:-1:-1;4669:293:8;-1:-1:-1;4669: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;4669:293:8;;;;;;;;;;;;;;;;;2658:324;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2658: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;4492:116:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4492:116:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4492: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;5355:102:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5429:8;:23;;-1:-1:-1;;;;;;5429:23:8;-1:-1:-1;;;;;5429:23:8;;;;;;;;;;5355:102::o;1089:47::-;;;;;;;;;;;;;;;:::o;3478:781::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;3695:12:8;;3687:20;;;3679:59;;;;;-1:-1:-1;;;3679:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3753:31;;;;:15;:31;;;;;;;;3752:32;3744:76;;;;;-1:-1:-1;;;3744:76:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3834:18;3846:5;3834:11;:18::i;:::-;3826:59;;;;;-1:-1:-1;;;3826:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3932:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4003:19:8;;;3932:126;;;;4024:17;;;3932:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3932:126:8;;:8;;;;;:20;;3953:6;;;;3932: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;3932: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;;3932:126:8;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3932:126:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3932:126:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3932:126:8;3924:161;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;;;;4092:31;;;;:15;:31;;;;;:38;;-1:-1:-1;;4092:38:8;4126:4;4092:38;;;4136:53;4153:10;4165:8;4175:4;4181:7;4136:16;:53::i;:::-;4200:54;;;-1:-1:-1;;;;;4200:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;-1:-1:-1;;;;;;3478:781:8:o;1278:25::-;;;-1:-1:-1;;;;;1278: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;1463:23:8:-;;;-1:-1:-1;;;;;1463: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;1231:43:8:-;;;;;;;;;;;;;;;:::o;1058:27::-;;;;:::o;1430:34:2:-;;;;;;:::o;5192:113:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5266:8;:34;;-1:-1:-1;;;;;;5266:34:8;-1:-1:-1;;;;;5266:34:8;;;;;;;;;;5192:113::o;4669:293::-;4785:35;;;;;;;;;;;;;;;;4750:19;;4796:16;4785:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4785:35:8;-1:-1:-1;4777:43:8;-1:-1:-1;4830:6:8;4826:132;4842:27;;;4826:132;;;4888:28;4896:16;;4913:1;4896:19;;;;;;;;;;;;;4888:7;:28::i;:::-;4884:68;;;4939:4;4928:5;4934:1;4928:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4884:68;4871:3;;4826:132;;;;4669:293;;;;:::o;2658:324::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;2070:5;2741:24:8;;;:11;:24;;;;;;2056:19:18;2741:24:8;2740:25;2732:71;;;;-1:-1:-1;;;2732:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2810:20;2833;2841:11;2833:7;:20::i;:::-;2859:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2859:31:8;2886:4;2859:31;;;2810:43;-1:-1:-1;2896:17:8;:15;:17::i;:::-;2925:52;;;;;;;;2961:15;2925:52;;;;;;2933:11;;2925:52;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;2658: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;4492:116:8:-;4553:4;4572:31;;;:15;:31;;;;;;;;;4492: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;1303:547:0:-;1450:7;1437:9;:20;1429:81;;;;-1:-1:-1;;;1429:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1517:51;1536:10;1563:4;1548:12;;:19;1517:18;:51::i;:::-;1578:8;;1574:63;;1596:34;1615:8;1625:4;1596:18;:34::i;:::-;1647:11;;1643:203;;1687:34;;1669:12;;-1:-1:-1;;;;;1687:15:0;;;1709:7;;1669:12;1687:34;1669:12;1687:34;1709:7;1687: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;;1668:53:0;;;1734:7;1729:111;;1805:26;;-1:-1:-1;;;;;1805:17:0;;;:26;;;;;1823:7;;1805:26;;;;1823:7;1805:17;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1805:26:0;1729:111;1643:203;;1303:547;;;;:::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;1108:191:0:-;1158:9;:14;1150:75;;;;-1:-1:-1;;;1150:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1231:63;1254:10;1274:4;1281:12;;1231:22;:63::i;:::-;1108:191::o;2448:544::-;2557:5;;2568:63;;;-1:-1:-1;;;;;2568:63:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2568:63:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2557:75:0;;;;2522:12;;2536:17;;2557:5;;;2568:63;2557: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;;;2557: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;;2521:111:0;;;;2646:7;2638:37;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;;;;2775:11;;:15;2771:217;;2808:4;:11;2823:2;2808:17;2800:72;;;;-1:-1:-1;;;2800:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2901:4;2890:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2890:24:0;;-1:-1:-1;2890:24:0;2922:59;;;;-1:-1:-1;;;2922:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1854:590;1982:5;;1993:74;;;-1:-1:-1;;;;;1993:74:0;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1993:74:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1982:86:0;;;;1947:12;;1961:17;;1982:5;;;1993:74;1982: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;;;1982: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;;1946:122:0;;;;2082:7;2074:45;;;;;-1:-1:-1;;;2074:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2219:11;;:15;2215:225;;2252:4;:11;2267:2;2252:17;2244:72;;;;-1:-1:-1;;;2244:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2345:4;2334:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2334:24:0;;-1:-1:-1;2334:24:0;2366:67;;;;-1:-1:-1;;;2366:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "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\n constructor(\n IVerifier _verifier,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator,\n address _token\n ) Tornado(_verifier, _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 _fee, uint256 _refund) internal {\n require(msg.value == _refund, \"Incorrect refund amount received by the contract\");\n\n _safeErc20Transfer(_recipient, denomination - _fee);\n if (_fee > 0) {\n _safeErc20Transfer(_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": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "ast": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + }, + "id": 228, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "755:23:0" + }, + { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 228, + "sourceUnit": 1195, + "src": "780:23:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3, + "name": "Tornado", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1194, + "src": "830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Tornado_$1194", + "typeString": "contract Tornado" + } + }, + "id": 4, + "nodeType": "InheritanceSpecifier", + "src": "830:7:0" + } + ], + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 227, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 6, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "842:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "842:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 29, + "nodeType": "Block", + "src": "1079:25:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 25, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 26, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1093:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1085:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 28, + "nodeType": "ExpressionStatement", + "src": "1085:14:0" + } + ] + }, + "documentation": null, + "id": 30, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19, + "name": "_verifier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1016:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + { + "argumentTypes": null, + "id": 20, + "name": "_denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "1027:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 21, + "name": "_merkleTreeHeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "1042:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 22, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "1061:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 23, + "modifierName": { + "argumentTypes": null, + "id": 18, + "name": "Tornado", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1194, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Tornado_$1194_$", + "typeString": "type(contract Tornado)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1008:63:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "name": "_verifier", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "884:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + }, + "typeName": { + "contractScope": null, + "id": 7, + "name": "IVerifier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 891, + "src": "884:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10, + "name": "_denomination", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "909:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "909:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12, + "name": "_merkleTreeHeight", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "936:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "936:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14, + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "966:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "989:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "989:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "878:129:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [], + "src": "1079:0:0" + }, + "scope": 227, + "src": "867:237:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1144:155:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 34, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1158:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1158:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1158:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1174:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + }, + "value": "ETH value is supposed to be 0 for ERC20 instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "id": 33, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1150:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1150:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 42, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1254:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1254:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "1274:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "id": 44, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1266:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1266:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 47, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1281:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 41, + "name": "_safeErc20TransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "1231:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "1231:63:0" + } + ] + }, + "documentation": null, + "id": 51, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:2:0" + }, + "returnParameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1144:0:0" + }, + "scope": 227, + "src": "1108:191:0", + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + { + "body": { + "id": 112, + "nodeType": "Block", + "src": "1423:427:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 63, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1437:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1437:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 65, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1437:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1459:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + }, + "value": "Incorrect refund amount received by the contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "id": 62, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1429:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 69, + "nodeType": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 71, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1536:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 72, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1548:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 73, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1563:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1548:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 70, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1517:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1517:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 76, + "nodeType": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 77, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1578:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1585:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1578:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 86, + "nodeType": "IfStatement", + "src": "1574:63:0", + "trueBody": { + "id": 85, + "nodeType": "Block", + "src": "1588:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1615:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 82, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1625:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 80, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1596:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 84, + "nodeType": "ExpressionStatement", + "src": "1596:34:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 87, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1647:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1657:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1647:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 111, + "nodeType": "IfStatement", + "src": "1643:203:0", + "trueBody": { + "id": 110, + "nodeType": "Block", + "src": "1660:186:0", + "statements": [ + { + "assignments": [ + 91, + null + ], + "declarations": [ + { + "constant": false, + "id": 91, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "1669:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 90, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1669:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 99, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "arguments": [ + { + "argumentTypes": null, + "id": 95, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1709:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 92, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1687:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687: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": 98, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1733:8:0", + "subExpression": { + "argumentTypes": null, + "id": 100, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 91, + "src": "1734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 109, + "nodeType": "IfStatement", + "src": "1729:111:0", + "trueBody": { + "id": 108, + "nodeType": "Block", + "src": "1743:97:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 105, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1823:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 102, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1805:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 107, + "nodeType": "ExpressionStatement", + "src": "1805:26:0" + } + ] + } + } + ] + } + } + ] + }, + "documentation": null, + "id": 113, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processWithdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 53, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1329:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1329:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "_relayer", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1357:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 54, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1383:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 56, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1383:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "_refund", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1397:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1397:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1328:85:0" + }, + "returnParameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [], + "src": "1423:0:0" + }, + "scope": 227, + "src": "1303:547:0", + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "1940:504:0", + "statements": [ + { + "assignments": [ + 123, + 125 + ], + "declarations": [ + { + "constant": false, + "id": 123, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1947:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 122, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1947:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 125, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1961:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 124, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1961:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 136, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30783233623837326464", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2016:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + "value": "0x23b872dd" + }, + { + "argumentTypes": null, + "id": 131, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "2047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 132, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2054:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 133, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2059:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 128, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "1993:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1993:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1993:74:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 126, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1982: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": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1982:86:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 138, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2082:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + }, + "value": "not enough allowed tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "id": 137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 141, + "nodeType": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 142, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2219:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2219:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2233:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2219:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "2215:225:0", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "2236:204:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 147, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2252:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2252:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2267:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2252:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2271:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 146, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2244:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2244:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 154, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2324:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 159, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2351:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 155, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2334:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2324:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 164, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2383:49:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + }, + "value": "not enough allowed tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "id": 163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2366:67:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 167, + "nodeType": "ExpressionStatement", + "src": "2366:67:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20TransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 115, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1886:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1886:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 117, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1901:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1901:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 119, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1914:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1914:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1885:45:0" + }, + "returnParameters": { + "id": 121, + "nodeType": "ParameterList", + "parameters": [], + "src": "1940:0:0" + }, + "scope": 227, + "src": "1854:590:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 225, + "nodeType": "Block", + "src": "2515:477:0", + "statements": [ + { + "assignments": [ + 179, + 181 + ], + "declarations": [ + { + "constant": false, + "id": 179, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2522:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2522:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 181, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2536:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 180, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2536:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30786139303539636262", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2591:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + "value": "0xa9059cbb" + }, + { + "argumentTypes": null, + "id": 187, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "2618:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 188, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "2623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 184, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2568:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2568:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2568:63:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 182, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2557:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2557: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": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 193, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2646:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e73", + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2655:19:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + }, + "value": "not enough tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2638:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2638:37:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 197, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2775:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2775:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2789:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2775:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 224, + "nodeType": "IfStatement", + "src": "2771:217:0", + "trueBody": { + "id": 223, + "nodeType": "Block", + "src": "2792:196:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 202, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2808:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2808:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2823:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2808:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2827:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2800:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2800:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2880:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 212, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2901:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2908:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 214, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2907:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 210, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2890:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2890:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2890:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2880:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 219, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2939:41:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + }, + "value": "not enough tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "id": 218, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2922:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2922:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "2922:59:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20Transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2476:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2476:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2489:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2489:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2475:30:0" + }, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "2515:0:0" + }, + "scope": 227, + "src": "2448:544:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 228, + "src": "805:2189:0" + } + ], + "src": "755:2240:0" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".17" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "755:23:0" + }, + { + "attributes": { + "SourceUnit": 1195, + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "scope": 228, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "780:23:0" + }, + { + "attributes": { + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "scope": 228 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Tornado", + "referencedDeclaration": 1194, + "type": "contract Tornado" + }, + "id": 3, + "name": "UserDefinedTypeName", + "src": "830:7:0" + } + ], + "id": 4, + "name": "InheritanceSpecifier", + "src": "830:7:0" + }, + { + "attributes": { + "constant": false, + "name": "token", + "scope": 227, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5, + "name": "ElementaryTypeName", + "src": "842:7:0" + } + ], + "id": 6, + "name": "VariableDeclaration", + "src": "842:20:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "name": "", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_verifier", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IVerifier", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IVerifier", + "referencedDeclaration": 891, + "type": "contract IVerifier" + }, + "id": 7, + "name": "UserDefinedTypeName", + "src": "884:9:0" + } + ], + "id": 8, + "name": "VariableDeclaration", + "src": "884:19:0" + }, + { + "attributes": { + "constant": false, + "name": "_denomination", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 9, + "name": "ElementaryTypeName", + "src": "909:7:0" + } + ], + "id": 10, + "name": "VariableDeclaration", + "src": "909:21:0" + }, + { + "attributes": { + "constant": false, + "name": "_merkleTreeHeight", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint32", + "type": "uint32" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "936:6:0" + } + ], + "id": 12, + "name": "VariableDeclaration", + "src": "936:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_operator", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 13, + "name": "ElementaryTypeName", + "src": "966:7:0" + } + ], + "id": 14, + "name": "VariableDeclaration", + "src": "966:17:0" + }, + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "989:7:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "989:14:0" + } + ], + "id": 17, + "name": "ParameterList", + "src": "878:129:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 24, + "name": "ParameterList", + "src": "1079:0:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1194, + "type": "type(contract Tornado)", + "value": "Tornado" + }, + "id": 18, + "name": "Identifier", + "src": "1008:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 8, + "type": "contract IVerifier", + "value": "_verifier" + }, + "id": 19, + "name": "Identifier", + "src": "1016:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "uint256", + "value": "_denomination" + }, + "id": 20, + "name": "Identifier", + "src": "1027:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint32", + "value": "_merkleTreeHeight" + }, + "id": 21, + "name": "Identifier", + "src": "1042:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "address", + "value": "_operator" + }, + "id": 22, + "name": "Identifier", + "src": "1061:9:0" + } + ], + "id": 23, + "name": "ModifierInvocation", + "src": "1008:63:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6, + "type": "address", + "value": "token" + }, + "id": 25, + "name": "Identifier", + "src": "1085:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 16, + "type": "address", + "value": "_token" + }, + "id": 26, + "name": "Identifier", + "src": "1093:6:0" + } + ], + "id": 27, + "name": "Assignment", + "src": "1085:14:0" + } + ], + "id": 28, + "name": "ExpressionStatement", + "src": "1085:14:0" + } + ], + "id": 29, + "name": "Block", + "src": "1079:25:0" + } + ], + "id": 30, + "name": "FunctionDefinition", + "src": "867:237:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processDeposit", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 31, + "name": "ParameterList", + "src": "1132:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 32, + "name": "ParameterList", + "src": "1144:0:0" + }, + { + "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_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 33, + "name": "Identifier", + "src": "1150:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 34, + "name": "Identifier", + "src": "1158:3:0" + } + ], + "id": 35, + "name": "MemberAccess", + "src": "1158:9: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": 36, + "name": "Literal", + "src": "1171:1:0" + } + ], + "id": 37, + "name": "BinaryOperation", + "src": "1158:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "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": 38, + "name": "Literal", + "src": "1174:50:0" + } + ], + "id": 39, + "name": "FunctionCall", + "src": "1150:75:0" + } + ], + "id": 40, + "name": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 171, + "type": "function (address,address,uint256)", + "value": "_safeErc20TransferFrom" + }, + "id": 41, + "name": "Identifier", + "src": "1231:22:0" + }, + { + "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": 3260, + "type": "msg", + "value": "msg" + }, + "id": 42, + "name": "Identifier", + "src": "1254:3:0" + } + ], + "id": 43, + "name": "MemberAccess", + "src": "1254:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 44, + "name": "ElementaryTypeNameExpression", + "src": "1266:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3284, + "type": "contract ERC20Tornado", + "value": "this" + }, + "id": 45, + "name": "Identifier", + "src": "1274:4:0" + } + ], + "id": 46, + "name": "FunctionCall", + "src": "1266:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 47, + "name": "Identifier", + "src": "1281:12:0" + } + ], + "id": 48, + "name": "FunctionCall", + "src": "1231:63:0" + } + ], + "id": 49, + "name": "ExpressionStatement", + "src": "1231:63:0" + } + ], + "id": 50, + "name": "Block", + "src": "1144:155:0" + } + ], + "id": 51, + "name": "FunctionDefinition", + "src": "1108:191:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processWithdraw", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_recipient", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 52, + "name": "ElementaryTypeName", + "src": "1329:15:0" + } + ], + "id": 53, + "name": "VariableDeclaration", + "src": "1329:26:0" + }, + { + "attributes": { + "constant": false, + "name": "_relayer", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 54, + "name": "ElementaryTypeName", + "src": "1357:15:0" + } + ], + "id": 55, + "name": "VariableDeclaration", + "src": "1357:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_fee", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 56, + "name": "ElementaryTypeName", + "src": "1383:7:0" + } + ], + "id": 57, + "name": "VariableDeclaration", + "src": "1383:12:0" + }, + { + "attributes": { + "constant": false, + "name": "_refund", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 58, + "name": "ElementaryTypeName", + "src": "1397:7:0" + } + ], + "id": 59, + "name": "VariableDeclaration", + "src": "1397:15:0" + } + ], + "id": 60, + "name": "ParameterList", + "src": "1328:85:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 61, + "name": "ParameterList", + "src": "1423:0:0" + }, + { + "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_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 62, + "name": "Identifier", + "src": "1429:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 63, + "name": "Identifier", + "src": "1437:3:0" + } + ], + "id": 64, + "name": "MemberAccess", + "src": "1437:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 65, + "name": "Identifier", + "src": "1450:7:0" + } + ], + "id": 66, + "name": "BinaryOperation", + "src": "1437:20:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Incorrect refund amount received by the contract\"", + "value": "Incorrect refund amount received by the contract" + }, + "id": 67, + "name": "Literal", + "src": "1459:50:0" + } + ], + "id": 68, + "name": "FunctionCall", + "src": "1429:81:0" + } + ], + "id": 69, + "name": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 70, + "name": "Identifier", + "src": "1517:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 71, + "name": "Identifier", + "src": "1536:10: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": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 72, + "name": "Identifier", + "src": "1548:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 73, + "name": "Identifier", + "src": "1563:4:0" + } + ], + "id": 74, + "name": "BinaryOperation", + "src": "1548:19:0" + } + ], + "id": 75, + "name": "FunctionCall", + "src": "1517:51:0" + } + ], + "id": 76, + "name": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "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": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 77, + "name": "Identifier", + "src": "1578:4: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": 78, + "name": "Literal", + "src": "1585:1:0" + } + ], + "id": 79, + "name": "BinaryOperation", + "src": "1578:8:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 80, + "name": "Identifier", + "src": "1596:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 81, + "name": "Identifier", + "src": "1615:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 82, + "name": "Identifier", + "src": "1625:4:0" + } + ], + "id": 83, + "name": "FunctionCall", + "src": "1596:34:0" + } + ], + "id": 84, + "name": "ExpressionStatement", + "src": "1596:34:0" + } + ], + "id": 85, + "name": "Block", + "src": "1588:49:0" + } + ], + "id": 86, + "name": "IfStatement", + "src": "1574:63:0" + }, + { + "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": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 87, + "name": "Identifier", + "src": "1647: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": 88, + "name": "Literal", + "src": "1657:1:0" + } + ], + "id": 89, + "name": "BinaryOperation", + "src": "1647:11:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 91, + null + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 110, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 90, + "name": "ElementaryTypeName", + "src": "1669:4:0" + } + ], + "id": 91, + "name": "VariableDeclaration", + "src": "1669:12:0" + }, + { + "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": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 92, + "name": "Identifier", + "src": "1687:10:0" + } + ], + "id": 93, + "name": "MemberAccess", + "src": "1687:15:0" + } + ], + "id": 94, + "name": "MemberAccess", + "src": "1687:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 95, + "name": "Identifier", + "src": "1709:7:0" + } + ], + "id": 96, + "name": "FunctionCall", + "src": "1687:30:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"\"", + "value": "" + }, + "id": 97, + "name": "Literal", + "src": "1718:2:0" + } + ], + "id": 98, + "name": "FunctionCall", + "src": "1687:34:0" + } + ], + "id": 99, + "name": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 91, + "type": "bool", + "value": "success" + }, + "id": 100, + "name": "Identifier", + "src": "1734:7:0" + } + ], + "id": 101, + "name": "UnaryOperation", + "src": "1733:8:0" + }, + { + "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_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 102, + "name": "Identifier", + "src": "1805:8:0" + } + ], + "id": 104, + "name": "MemberAccess", + "src": "1805:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 105, + "name": "Identifier", + "src": "1823:7:0" + } + ], + "id": 106, + "name": "FunctionCall", + "src": "1805:26:0" + } + ], + "id": 107, + "name": "ExpressionStatement", + "src": "1805:26:0" + } + ], + "id": 108, + "name": "Block", + "src": "1743:97:0" + } + ], + "id": 109, + "name": "IfStatement", + "src": "1729:111:0" + } + ], + "id": 110, + "name": "Block", + "src": "1660:186:0" + } + ], + "id": 111, + "name": "IfStatement", + "src": "1643:203:0" + } + ], + "id": 112, + "name": "Block", + "src": "1423:427:0" + } + ], + "id": 113, + "name": "FunctionDefinition", + "src": "1303:547:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20TransferFrom", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 114, + "name": "ElementaryTypeName", + "src": "1886:7:0" + } + ], + "id": 115, + "name": "VariableDeclaration", + "src": "1886:13:0" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 116, + "name": "ElementaryTypeName", + "src": "1901:7:0" + } + ], + "id": 117, + "name": "VariableDeclaration", + "src": "1901:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 118, + "name": "ElementaryTypeName", + "src": "1914:7:0" + } + ], + "id": 119, + "name": "VariableDeclaration", + "src": "1914:15:0" + } + ], + "id": 120, + "name": "ParameterList", + "src": "1885:45:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 121, + "name": "ParameterList", + "src": "1940:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 123, + 125 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 170, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 122, + "name": "ElementaryTypeName", + "src": "1947:4:0" + } + ], + "id": 123, + "name": "VariableDeclaration", + "src": "1947:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 170, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 124, + "name": "ElementaryTypeName", + "src": "1961:5:0" + } + ], + "id": 125, + "name": "VariableDeclaration", + "src": "1961:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 126, + "name": "Identifier", + "src": "1982:5:0" + } + ], + "id": 127, + "name": "MemberAccess", + "src": "1982:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 128, + "name": "Identifier", + "src": "1993:3:0" + } + ], + "id": 129, + "name": "MemberAccess", + "src": "1993:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30783233623837326464", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 599290589", + "value": "0x23b872dd" + }, + "id": 130, + "name": "Literal", + "src": "2016:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 115, + "type": "address", + "value": "_from" + }, + "id": 131, + "name": "Identifier", + "src": "2047:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 117, + "type": "address", + "value": "_to" + }, + "id": 132, + "name": "Identifier", + "src": "2054:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 119, + "type": "uint256", + "value": "_amount" + }, + "id": 133, + "name": "Identifier", + "src": "2059:7:0" + } + ], + "id": 134, + "name": "FunctionCall", + "src": "1993:74:0" + } + ], + "id": 135, + "name": "FunctionCall", + "src": "1982:86:0" + } + ], + "id": 136, + "name": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "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_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 137, + "name": "Identifier", + "src": "2074:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 138, + "name": "Identifier", + "src": "2082:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens\"", + "value": "not enough allowed tokens" + }, + "id": 139, + "name": "Literal", + "src": "2091:27:0" + } + ], + "id": 140, + "name": "FunctionCall", + "src": "2074:45:0" + } + ], + "id": 141, + "name": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 142, + "name": "Identifier", + "src": "2219:4:0" + } + ], + "id": 143, + "name": "MemberAccess", + "src": "2219:11: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": 144, + "name": "Literal", + "src": "2233:1:0" + } + ], + "id": 145, + "name": "BinaryOperation", + "src": "2219:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 146, + "name": "Identifier", + "src": "2244:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 147, + "name": "Identifier", + "src": "2252:4:0" + } + ], + "id": 148, + "name": "MemberAccess", + "src": "2252:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 149, + "name": "Literal", + "src": "2267:2:0" + } + ], + "id": 150, + "name": "BinaryOperation", + "src": "2252:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 151, + "name": "Literal", + "src": "2271:44:0" + } + ], + "id": 152, + "name": "FunctionCall", + "src": "2244:72:0" + } + ], + "id": 153, + "name": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 154, + "name": "Identifier", + "src": "2324:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 155, + "name": "Identifier", + "src": "2334:3:0" + } + ], + "id": 156, + "name": "MemberAccess", + "src": "2334:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 157, + "name": "Identifier", + "src": "2345:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 158, + "name": "ElementaryTypeNameExpression", + "src": "2352:4:0" + } + ], + "id": 159, + "name": "TupleExpression", + "src": "2351:6:0" + } + ], + "id": 160, + "name": "FunctionCall", + "src": "2334:24:0" + } + ], + "id": 161, + "name": "Assignment", + "src": "2324:34:0" + } + ], + "id": 162, + "name": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "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_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 163, + "name": "Identifier", + "src": "2366:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 164, + "name": "Identifier", + "src": "2374:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens. Token returns false.\"", + "value": "not enough allowed tokens. Token returns false." + }, + "id": 165, + "name": "Literal", + "src": "2383:49:0" + } + ], + "id": 166, + "name": "FunctionCall", + "src": "2366:67:0" + } + ], + "id": 167, + "name": "ExpressionStatement", + "src": "2366:67:0" + } + ], + "id": 168, + "name": "Block", + "src": "2236:204:0" + } + ], + "id": 169, + "name": "IfStatement", + "src": "2215:225:0" + } + ], + "id": 170, + "name": "Block", + "src": "1940:504:0" + } + ], + "id": 171, + "name": "FunctionDefinition", + "src": "1854:590:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20Transfer", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 172, + "name": "ElementaryTypeName", + "src": "2476:7:0" + } + ], + "id": 173, + "name": "VariableDeclaration", + "src": "2476:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 174, + "name": "ElementaryTypeName", + "src": "2489:7:0" + } + ], + "id": 175, + "name": "VariableDeclaration", + "src": "2489:15:0" + } + ], + "id": 176, + "name": "ParameterList", + "src": "2475:30:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 177, + "name": "ParameterList", + "src": "2515:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 179, + 181 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 225, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 178, + "name": "ElementaryTypeName", + "src": "2522:4:0" + } + ], + "id": 179, + "name": "VariableDeclaration", + "src": "2522:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 225, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 180, + "name": "ElementaryTypeName", + "src": "2536:5:0" + } + ], + "id": 181, + "name": "VariableDeclaration", + "src": "2536:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 182, + "name": "Identifier", + "src": "2557:5:0" + } + ], + "id": 183, + "name": "MemberAccess", + "src": "2557:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 184, + "name": "Identifier", + "src": "2568:3:0" + } + ], + "id": 185, + "name": "MemberAccess", + "src": "2568:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30786139303539636262", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2835717307", + "value": "0xa9059cbb" + }, + "id": 186, + "name": "Literal", + "src": "2591:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 173, + "type": "address", + "value": "_to" + }, + "id": 187, + "name": "Identifier", + "src": "2618:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 175, + "type": "uint256", + "value": "_amount" + }, + "id": 188, + "name": "Identifier", + "src": "2623:7:0" + } + ], + "id": 189, + "name": "FunctionCall", + "src": "2568:63:0" + } + ], + "id": 190, + "name": "FunctionCall", + "src": "2557:75:0" + } + ], + "id": 191, + "name": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "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_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 192, + "name": "Identifier", + "src": "2638:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 193, + "name": "Identifier", + "src": "2646:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens\"", + "value": "not enough tokens" + }, + "id": 194, + "name": "Literal", + "src": "2655:19:0" + } + ], + "id": 195, + "name": "FunctionCall", + "src": "2638:37:0" + } + ], + "id": 196, + "name": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 197, + "name": "Identifier", + "src": "2775:4:0" + } + ], + "id": 198, + "name": "MemberAccess", + "src": "2775:11: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": 199, + "name": "Literal", + "src": "2789:1:0" + } + ], + "id": 200, + "name": "BinaryOperation", + "src": "2775:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 201, + "name": "Identifier", + "src": "2800:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 202, + "name": "Identifier", + "src": "2808:4:0" + } + ], + "id": 203, + "name": "MemberAccess", + "src": "2808:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 204, + "name": "Literal", + "src": "2823:2:0" + } + ], + "id": 205, + "name": "BinaryOperation", + "src": "2808:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 206, + "name": "Literal", + "src": "2827:44:0" + } + ], + "id": 207, + "name": "FunctionCall", + "src": "2800:72:0" + } + ], + "id": 208, + "name": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 209, + "name": "Identifier", + "src": "2880:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 210, + "name": "Identifier", + "src": "2890:3:0" + } + ], + "id": 211, + "name": "MemberAccess", + "src": "2890:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 212, + "name": "Identifier", + "src": "2901:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 213, + "name": "ElementaryTypeNameExpression", + "src": "2908:4:0" + } + ], + "id": 214, + "name": "TupleExpression", + "src": "2907:6:0" + } + ], + "id": 215, + "name": "FunctionCall", + "src": "2890:24:0" + } + ], + "id": 216, + "name": "Assignment", + "src": "2880:34:0" + } + ], + "id": 217, + "name": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "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_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 218, + "name": "Identifier", + "src": "2922:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 219, + "name": "Identifier", + "src": "2930:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens. Token returns false.\"", + "value": "not enough tokens. Token returns false." + }, + "id": 220, + "name": "Literal", + "src": "2939:41:0" + } + ], + "id": 221, + "name": "FunctionCall", + "src": "2922:59:0" + } + ], + "id": 222, + "name": "ExpressionStatement", + "src": "2922:59:0" + } + ], + "id": 223, + "name": "Block", + "src": "2792:196:0" + } + ], + "id": 224, + "name": "IfStatement", + "src": "2771:217:0" + } + ], + "id": 225, + "name": "Block", + "src": "2515:477:0" + } + ], + "id": 226, + "name": "FunctionDefinition", + "src": "2448:544:0" + } + ], + "id": 227, + "name": "ContractDefinition", + "src": "805:2189:0" + } + ], + "id": 228, + "name": "SourceUnit", + "src": "755:2240:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.17+commit.d19bba13.Emscripten.clang" + }, + "networks": { + "42220": { + "events": {}, + "links": { + "Hasher": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d" + }, + "address": "0x3186AD66eE2047e3Fb278f87844e3BC01D9D382a", + "transactionHash": "0xb97daf6c5e9a41d56bc5de9e7bdb55423c93fff282cb6eda4dac36a2c02ef9b4" + } + }, + "schemaVersion": "3.3.4", + "updatedAt": "2021-03-22T01:53:36.187Z", + "networkType": "ethereum", + "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/CELOTornado.2.json b/client/contracts/CELOTornado.2.json new file mode 100644 index 0000000..d1445d2 --- /dev/null +++ b/client/contracts/CELOTornado.2.json @@ -0,0 +1,7219 @@ +{ + "contractName": "ERC20Tornado", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVerifier", + "name": "_verifier", + "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": [ + { + "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" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"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\":[{\"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\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0x708938fd083239d2e9cd17e457cf25a2150bb900082fad58af8b689f786aef9c\",\"urls\":[\"bzz-raw://f345afd62002f883c60c032cd0cb051663dc8a3e59a52bf44109633b96cb3685\",\"dweb:/ipfs/QmNwjnH2uyNoq9GPjNUv6Z1mgtiR5rY3K7EHY74RBjXMpw\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x09c70432243629ef44697fd3d0ca89d3578e2b1c9f46d90757371edb163c14da\",\"urls\":[\"bzz-raw://d2a2c9fa85c32cb15793282792cd25c71804a10aa5a911e41f3bcd07f5df117e\",\"dweb:/ipfs/QmeQ1s6ypNnP7fossR4x9svuuLjcSBtQ5spUTmWGZY5Ljr\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001d1238038062001d12833981810160405260a08110156200004757600080fd5b50805160208201516040830151606084015160809094015192939192909190848484848163ffffffff8116620000af5760405162461bcd60e51b815260040180806020018281038252602781526020018062001c896027913960400191505060405180910390fd5b60208163ffffffff1610620000f65760405162461bcd60e51b815260040180806020018281038252602281526020018062001cd06022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001c48833981519152909101819055815480830183559282905260008051602062001cf28339815191529092018290555b60005463ffffffff9081169082161015620001e4576200019a82806001600160e01b036200029f16565b60028054600181810190925560008051602062001c488339815191520182905580548082018255600082905260008051602062001cf2833981519152018290559092500162000170565b50620001fa81806001600160e01b036200029f16565b60046000015550506068805460ff19166001179055826200024d5760405162461bcd60e51b815260040180806020018281038252602581526020018062001c236025913960400191505060405180910390fd5b606c80546001600160a01b039586166001600160a01b031991821617909155606d80549286169282169290921790915560699290925550606e8054939092169216919091179055506200048c92505050565b600060008051602062001cb0833981519152831062000305576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001cb08339815191528210620003545760405162461bcd60e51b815260040180806020018281038252602181526020018062001c686021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003af57600080fd5b505af4158015620003c4573d6000803e3d6000fd5b505050506040513d6040811015620003db57600080fd5b508051602090910151909250905060008051602062001cb0833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200045557600080fd5b505af41580156200046a573d6000803e3d6000fd5b505050506040513d60408110156200048157600080fd5b505195945050505050565b611787806200049c6000396000f3fe60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c63430005110032", + "sourceMap": "805:2189:0:-;;;1430:34:2;;;-1:-1:-1;;;;;;1468:27:2;;;867:237:0;5:2:-1;;;;30:1;27;20:12;5:2;867:237:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;867:237: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;;;2260:17:8;2252:67;;;;-1:-1:-1;;;2252:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2325:8;:20;;-1:-1:-1;;;;;2325:20:8;;;-1:-1:-1;;;;;;2325:20:8;;;;;;;2351:8;:20;;;;;;;;;;;;;;;2377:12;:28;;;;-1:-1:-1;1085:5:0;:14;;;;;;;;;;;;;;-1:-1:-1;805:2189:0;;-1:-1:-1;;;805:2189: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:2189:0:-;;;;;;;", + "deployedSourceMap": "805:2189:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5355:102:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5355:102:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5355:102:8;-1:-1:-1;;;;;5355:102:8;;:::i;:::-;;1089:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:47:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1089:47:8;;:::i;:::-;;;;;;;;;;;;;;;;;;3478:781;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3478:781:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;3478:781:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3478:781: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;3478:781:8;;-1:-1:-1;3478:781:8;-1:-1:-1;3478:781:8;;;;;;;;-1:-1:-1;;;;;3478:781:8;;;;;;;;;;;;;;;;;;;;;;;;:::i;1278:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1278:25:8;;;:::i;:::-;;;;-1:-1:-1;;;;;1278: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;:::-;;;;;;;;;;;;;;;;;;;1463:23:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1463: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;1231:43:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1231:43:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1231:43:8;;:::i;1058:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1058:27:8;;;:::i;1430:34:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:2;;;:::i;5192:113:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5192:113:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5192:113:8;-1:-1:-1;;;;;5192:113:8;;:::i;4669:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4669:293:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4669:293:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4669:293:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4669: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;4669:293:8;;-1:-1:-1;4669:293:8;-1:-1:-1;4669: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;4669:293:8;;;;;;;;;;;;;;;;;2658:324;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2658: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;4492:116:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4492:116:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4492: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;5355:102:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5429:8;:23;;-1:-1:-1;;;;;;5429:23:8;-1:-1:-1;;;;;5429:23:8;;;;;;;;;;5355:102::o;1089:47::-;;;;;;;;;;;;;;;:::o;3478:781::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;3695:12:8;;3687:20;;;3679:59;;;;;-1:-1:-1;;;3679:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3753:31;;;;:15;:31;;;;;;;;3752:32;3744:76;;;;;-1:-1:-1;;;3744:76:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3834:18;3846:5;3834:11;:18::i;:::-;3826:59;;;;;-1:-1:-1;;;3826:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3932:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4003:19:8;;;3932:126;;;;4024:17;;;3932:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3932:126:8;;:8;;;;;:20;;3953:6;;;;3932: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;3932: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;;3932:126:8;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3932:126:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3932:126:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3932:126:8;3924:161;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;;;;4092:31;;;;:15;:31;;;;;:38;;-1:-1:-1;;4092:38:8;4126:4;4092:38;;;4136:53;4153:10;4165:8;4175:4;4181:7;4136:16;:53::i;:::-;4200:54;;;-1:-1:-1;;;;;4200:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;-1:-1:-1;;;;;;3478:781:8:o;1278:25::-;;;-1:-1:-1;;;;;1278: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;1463:23:8:-;;;-1:-1:-1;;;;;1463: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;1231:43:8:-;;;;;;;;;;;;;;;:::o;1058:27::-;;;;:::o;1430:34:2:-;;;;;;:::o;5192:113:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5266:8;:34;;-1:-1:-1;;;;;;5266:34:8;-1:-1:-1;;;;;5266:34:8;;;;;;;;;;5192:113::o;4669:293::-;4785:35;;;;;;;;;;;;;;;;4750:19;;4796:16;4785:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4785:35:8;-1:-1:-1;4777:43:8;-1:-1:-1;4830:6:8;4826:132;4842:27;;;4826:132;;;4888:28;4896:16;;4913:1;4896:19;;;;;;;;;;;;;4888:7;:28::i;:::-;4884:68;;;4939:4;4928:5;4934:1;4928:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4884:68;4871:3;;4826:132;;;;4669:293;;;;:::o;2658:324::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;2070:5;2741:24:8;;;:11;:24;;;;;;2056:19:18;2741:24:8;2740:25;2732:71;;;;-1:-1:-1;;;2732:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2810:20;2833;2841:11;2833:7;:20::i;:::-;2859:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2859:31:8;2886:4;2859:31;;;2810:43;-1:-1:-1;2896:17:8;:15;:17::i;:::-;2925:52;;;;;;;;2961:15;2925:52;;;;;;2933:11;;2925:52;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;2658: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;4492:116:8:-;4553:4;4572:31;;;:15;:31;;;;;;;;;4492: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;1303:547:0:-;1450:7;1437:9;:20;1429:81;;;;-1:-1:-1;;;1429:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1517:51;1536:10;1563:4;1548:12;;:19;1517:18;:51::i;:::-;1578:8;;1574:63;;1596:34;1615:8;1625:4;1596:18;:34::i;:::-;1647:11;;1643:203;;1687:34;;1669:12;;-1:-1:-1;;;;;1687:15:0;;;1709:7;;1669:12;1687:34;1669:12;1687:34;1709:7;1687: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;;1668:53:0;;;1734:7;1729:111;;1805:26;;-1:-1:-1;;;;;1805:17:0;;;:26;;;;;1823:7;;1805:26;;;;1823:7;1805:17;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1805:26:0;1729:111;1643:203;;1303:547;;;;:::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;1108:191:0:-;1158:9;:14;1150:75;;;;-1:-1:-1;;;1150:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1231:63;1254:10;1274:4;1281:12;;1231:22;:63::i;:::-;1108:191::o;2448:544::-;2557:5;;2568:63;;;-1:-1:-1;;;;;2568:63:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2568:63:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2557:75:0;;;;2522:12;;2536:17;;2557:5;;;2568:63;2557: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;;;2557: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;;2521:111:0;;;;2646:7;2638:37;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;;;;2775:11;;:15;2771:217;;2808:4;:11;2823:2;2808:17;2800:72;;;;-1:-1:-1;;;2800:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2901:4;2890:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2890:24:0;;-1:-1:-1;2890:24:0;2922:59;;;;-1:-1:-1;;;2922:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1854:590;1982:5;;1993:74;;;-1:-1:-1;;;;;1993:74:0;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1993:74:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1982:86:0;;;;1947:12;;1961:17;;1982:5;;;1993:74;1982: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;;;1982: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;;1946:122:0;;;;2082:7;2074:45;;;;;-1:-1:-1;;;2074:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2219:11;;:15;2215:225;;2252:4;:11;2267:2;2252:17;2244:72;;;;-1:-1:-1;;;2244:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2345:4;2334:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2334:24:0;;-1:-1:-1;2334:24:0;2366:67;;;;-1:-1:-1;;;2366:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "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\n constructor(\n IVerifier _verifier,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator,\n address _token\n ) Tornado(_verifier, _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 _fee, uint256 _refund) internal {\n require(msg.value == _refund, \"Incorrect refund amount received by the contract\");\n\n _safeErc20Transfer(_recipient, denomination - _fee);\n if (_fee > 0) {\n _safeErc20Transfer(_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": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "ast": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + }, + "id": 228, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "755:23:0" + }, + { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 228, + "sourceUnit": 1195, + "src": "780:23:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3, + "name": "Tornado", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1194, + "src": "830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Tornado_$1194", + "typeString": "contract Tornado" + } + }, + "id": 4, + "nodeType": "InheritanceSpecifier", + "src": "830:7:0" + } + ], + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 227, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 6, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "842:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "842:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 29, + "nodeType": "Block", + "src": "1079:25:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 25, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 26, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1093:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1085:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 28, + "nodeType": "ExpressionStatement", + "src": "1085:14:0" + } + ] + }, + "documentation": null, + "id": 30, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19, + "name": "_verifier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1016:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + { + "argumentTypes": null, + "id": 20, + "name": "_denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "1027:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 21, + "name": "_merkleTreeHeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "1042:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 22, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "1061:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 23, + "modifierName": { + "argumentTypes": null, + "id": 18, + "name": "Tornado", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1194, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Tornado_$1194_$", + "typeString": "type(contract Tornado)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1008:63:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "name": "_verifier", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "884:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + }, + "typeName": { + "contractScope": null, + "id": 7, + "name": "IVerifier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 891, + "src": "884:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10, + "name": "_denomination", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "909:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "909:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12, + "name": "_merkleTreeHeight", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "936:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "936:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14, + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "966:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "989:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "989:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "878:129:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [], + "src": "1079:0:0" + }, + "scope": 227, + "src": "867:237:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1144:155:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 34, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1158:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1158:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1158:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1174:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + }, + "value": "ETH value is supposed to be 0 for ERC20 instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "id": 33, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1150:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1150:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 42, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1254:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1254:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "1274:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "id": 44, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1266:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1266:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 47, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1281:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 41, + "name": "_safeErc20TransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "1231:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "1231:63:0" + } + ] + }, + "documentation": null, + "id": 51, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:2:0" + }, + "returnParameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1144:0:0" + }, + "scope": 227, + "src": "1108:191:0", + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + { + "body": { + "id": 112, + "nodeType": "Block", + "src": "1423:427:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 63, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1437:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1437:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 65, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1437:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1459:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + }, + "value": "Incorrect refund amount received by the contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "id": 62, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1429:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 69, + "nodeType": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 71, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1536:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 72, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1548:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 73, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1563:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1548:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 70, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1517:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1517:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 76, + "nodeType": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 77, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1578:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1585:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1578:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 86, + "nodeType": "IfStatement", + "src": "1574:63:0", + "trueBody": { + "id": 85, + "nodeType": "Block", + "src": "1588:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1615:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 82, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1625:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 80, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1596:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 84, + "nodeType": "ExpressionStatement", + "src": "1596:34:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 87, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1647:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1657:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1647:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 111, + "nodeType": "IfStatement", + "src": "1643:203:0", + "trueBody": { + "id": 110, + "nodeType": "Block", + "src": "1660:186:0", + "statements": [ + { + "assignments": [ + 91, + null + ], + "declarations": [ + { + "constant": false, + "id": 91, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "1669:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 90, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1669:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 99, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "arguments": [ + { + "argumentTypes": null, + "id": 95, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1709:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 92, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1687:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687: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": 98, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1733:8:0", + "subExpression": { + "argumentTypes": null, + "id": 100, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 91, + "src": "1734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 109, + "nodeType": "IfStatement", + "src": "1729:111:0", + "trueBody": { + "id": 108, + "nodeType": "Block", + "src": "1743:97:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 105, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1823:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 102, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1805:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 107, + "nodeType": "ExpressionStatement", + "src": "1805:26:0" + } + ] + } + } + ] + } + } + ] + }, + "documentation": null, + "id": 113, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processWithdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 53, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1329:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1329:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "_relayer", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1357:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 54, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1383:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 56, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1383:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "_refund", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1397:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1397:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1328:85:0" + }, + "returnParameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [], + "src": "1423:0:0" + }, + "scope": 227, + "src": "1303:547:0", + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "1940:504:0", + "statements": [ + { + "assignments": [ + 123, + 125 + ], + "declarations": [ + { + "constant": false, + "id": 123, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1947:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 122, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1947:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 125, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1961:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 124, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1961:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 136, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30783233623837326464", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2016:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + "value": "0x23b872dd" + }, + { + "argumentTypes": null, + "id": 131, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "2047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 132, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2054:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 133, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2059:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 128, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "1993:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1993:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1993:74:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 126, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1982: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": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1982:86:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 138, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2082:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + }, + "value": "not enough allowed tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "id": 137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 141, + "nodeType": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 142, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2219:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2219:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2233:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2219:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "2215:225:0", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "2236:204:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 147, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2252:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2252:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2267:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2252:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2271:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 146, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2244:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2244:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 154, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2324:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 159, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2351:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 155, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2334:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2324:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 164, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2383:49:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + }, + "value": "not enough allowed tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "id": 163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2366:67:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 167, + "nodeType": "ExpressionStatement", + "src": "2366:67:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20TransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 115, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1886:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1886:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 117, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1901:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1901:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 119, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1914:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1914:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1885:45:0" + }, + "returnParameters": { + "id": 121, + "nodeType": "ParameterList", + "parameters": [], + "src": "1940:0:0" + }, + "scope": 227, + "src": "1854:590:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 225, + "nodeType": "Block", + "src": "2515:477:0", + "statements": [ + { + "assignments": [ + 179, + 181 + ], + "declarations": [ + { + "constant": false, + "id": 179, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2522:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2522:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 181, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2536:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 180, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2536:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30786139303539636262", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2591:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + "value": "0xa9059cbb" + }, + { + "argumentTypes": null, + "id": 187, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "2618:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 188, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "2623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 184, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2568:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2568:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2568:63:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 182, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2557:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2557: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": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 193, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2646:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e73", + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2655:19:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + }, + "value": "not enough tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2638:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2638:37:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 197, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2775:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2775:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2789:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2775:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 224, + "nodeType": "IfStatement", + "src": "2771:217:0", + "trueBody": { + "id": 223, + "nodeType": "Block", + "src": "2792:196:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 202, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2808:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2808:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2823:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2808:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2827:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2800:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2800:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2880:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 212, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2901:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2908:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 214, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2907:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 210, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2890:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2890:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2890:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2880:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 219, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2939:41:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + }, + "value": "not enough tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "id": 218, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2922:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2922:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "2922:59:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20Transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2476:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2476:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2489:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2489:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2475:30:0" + }, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "2515:0:0" + }, + "scope": 227, + "src": "2448:544:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 228, + "src": "805:2189:0" + } + ], + "src": "755:2240:0" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".17" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "755:23:0" + }, + { + "attributes": { + "SourceUnit": 1195, + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "scope": 228, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "780:23:0" + }, + { + "attributes": { + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "scope": 228 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Tornado", + "referencedDeclaration": 1194, + "type": "contract Tornado" + }, + "id": 3, + "name": "UserDefinedTypeName", + "src": "830:7:0" + } + ], + "id": 4, + "name": "InheritanceSpecifier", + "src": "830:7:0" + }, + { + "attributes": { + "constant": false, + "name": "token", + "scope": 227, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5, + "name": "ElementaryTypeName", + "src": "842:7:0" + } + ], + "id": 6, + "name": "VariableDeclaration", + "src": "842:20:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "name": "", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_verifier", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IVerifier", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IVerifier", + "referencedDeclaration": 891, + "type": "contract IVerifier" + }, + "id": 7, + "name": "UserDefinedTypeName", + "src": "884:9:0" + } + ], + "id": 8, + "name": "VariableDeclaration", + "src": "884:19:0" + }, + { + "attributes": { + "constant": false, + "name": "_denomination", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 9, + "name": "ElementaryTypeName", + "src": "909:7:0" + } + ], + "id": 10, + "name": "VariableDeclaration", + "src": "909:21:0" + }, + { + "attributes": { + "constant": false, + "name": "_merkleTreeHeight", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint32", + "type": "uint32" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "936:6:0" + } + ], + "id": 12, + "name": "VariableDeclaration", + "src": "936:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_operator", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 13, + "name": "ElementaryTypeName", + "src": "966:7:0" + } + ], + "id": 14, + "name": "VariableDeclaration", + "src": "966:17:0" + }, + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "989:7:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "989:14:0" + } + ], + "id": 17, + "name": "ParameterList", + "src": "878:129:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 24, + "name": "ParameterList", + "src": "1079:0:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1194, + "type": "type(contract Tornado)", + "value": "Tornado" + }, + "id": 18, + "name": "Identifier", + "src": "1008:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 8, + "type": "contract IVerifier", + "value": "_verifier" + }, + "id": 19, + "name": "Identifier", + "src": "1016:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "uint256", + "value": "_denomination" + }, + "id": 20, + "name": "Identifier", + "src": "1027:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint32", + "value": "_merkleTreeHeight" + }, + "id": 21, + "name": "Identifier", + "src": "1042:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "address", + "value": "_operator" + }, + "id": 22, + "name": "Identifier", + "src": "1061:9:0" + } + ], + "id": 23, + "name": "ModifierInvocation", + "src": "1008:63:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6, + "type": "address", + "value": "token" + }, + "id": 25, + "name": "Identifier", + "src": "1085:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 16, + "type": "address", + "value": "_token" + }, + "id": 26, + "name": "Identifier", + "src": "1093:6:0" + } + ], + "id": 27, + "name": "Assignment", + "src": "1085:14:0" + } + ], + "id": 28, + "name": "ExpressionStatement", + "src": "1085:14:0" + } + ], + "id": 29, + "name": "Block", + "src": "1079:25:0" + } + ], + "id": 30, + "name": "FunctionDefinition", + "src": "867:237:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processDeposit", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 31, + "name": "ParameterList", + "src": "1132:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 32, + "name": "ParameterList", + "src": "1144:0:0" + }, + { + "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_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 33, + "name": "Identifier", + "src": "1150:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 34, + "name": "Identifier", + "src": "1158:3:0" + } + ], + "id": 35, + "name": "MemberAccess", + "src": "1158:9: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": 36, + "name": "Literal", + "src": "1171:1:0" + } + ], + "id": 37, + "name": "BinaryOperation", + "src": "1158:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "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": 38, + "name": "Literal", + "src": "1174:50:0" + } + ], + "id": 39, + "name": "FunctionCall", + "src": "1150:75:0" + } + ], + "id": 40, + "name": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 171, + "type": "function (address,address,uint256)", + "value": "_safeErc20TransferFrom" + }, + "id": 41, + "name": "Identifier", + "src": "1231:22:0" + }, + { + "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": 3260, + "type": "msg", + "value": "msg" + }, + "id": 42, + "name": "Identifier", + "src": "1254:3:0" + } + ], + "id": 43, + "name": "MemberAccess", + "src": "1254:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 44, + "name": "ElementaryTypeNameExpression", + "src": "1266:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3284, + "type": "contract ERC20Tornado", + "value": "this" + }, + "id": 45, + "name": "Identifier", + "src": "1274:4:0" + } + ], + "id": 46, + "name": "FunctionCall", + "src": "1266:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 47, + "name": "Identifier", + "src": "1281:12:0" + } + ], + "id": 48, + "name": "FunctionCall", + "src": "1231:63:0" + } + ], + "id": 49, + "name": "ExpressionStatement", + "src": "1231:63:0" + } + ], + "id": 50, + "name": "Block", + "src": "1144:155:0" + } + ], + "id": 51, + "name": "FunctionDefinition", + "src": "1108:191:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processWithdraw", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_recipient", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 52, + "name": "ElementaryTypeName", + "src": "1329:15:0" + } + ], + "id": 53, + "name": "VariableDeclaration", + "src": "1329:26:0" + }, + { + "attributes": { + "constant": false, + "name": "_relayer", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 54, + "name": "ElementaryTypeName", + "src": "1357:15:0" + } + ], + "id": 55, + "name": "VariableDeclaration", + "src": "1357:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_fee", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 56, + "name": "ElementaryTypeName", + "src": "1383:7:0" + } + ], + "id": 57, + "name": "VariableDeclaration", + "src": "1383:12:0" + }, + { + "attributes": { + "constant": false, + "name": "_refund", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 58, + "name": "ElementaryTypeName", + "src": "1397:7:0" + } + ], + "id": 59, + "name": "VariableDeclaration", + "src": "1397:15:0" + } + ], + "id": 60, + "name": "ParameterList", + "src": "1328:85:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 61, + "name": "ParameterList", + "src": "1423:0:0" + }, + { + "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_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 62, + "name": "Identifier", + "src": "1429:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 63, + "name": "Identifier", + "src": "1437:3:0" + } + ], + "id": 64, + "name": "MemberAccess", + "src": "1437:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 65, + "name": "Identifier", + "src": "1450:7:0" + } + ], + "id": 66, + "name": "BinaryOperation", + "src": "1437:20:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Incorrect refund amount received by the contract\"", + "value": "Incorrect refund amount received by the contract" + }, + "id": 67, + "name": "Literal", + "src": "1459:50:0" + } + ], + "id": 68, + "name": "FunctionCall", + "src": "1429:81:0" + } + ], + "id": 69, + "name": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 70, + "name": "Identifier", + "src": "1517:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 71, + "name": "Identifier", + "src": "1536:10: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": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 72, + "name": "Identifier", + "src": "1548:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 73, + "name": "Identifier", + "src": "1563:4:0" + } + ], + "id": 74, + "name": "BinaryOperation", + "src": "1548:19:0" + } + ], + "id": 75, + "name": "FunctionCall", + "src": "1517:51:0" + } + ], + "id": 76, + "name": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "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": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 77, + "name": "Identifier", + "src": "1578:4: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": 78, + "name": "Literal", + "src": "1585:1:0" + } + ], + "id": 79, + "name": "BinaryOperation", + "src": "1578:8:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 80, + "name": "Identifier", + "src": "1596:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 81, + "name": "Identifier", + "src": "1615:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 82, + "name": "Identifier", + "src": "1625:4:0" + } + ], + "id": 83, + "name": "FunctionCall", + "src": "1596:34:0" + } + ], + "id": 84, + "name": "ExpressionStatement", + "src": "1596:34:0" + } + ], + "id": 85, + "name": "Block", + "src": "1588:49:0" + } + ], + "id": 86, + "name": "IfStatement", + "src": "1574:63:0" + }, + { + "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": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 87, + "name": "Identifier", + "src": "1647: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": 88, + "name": "Literal", + "src": "1657:1:0" + } + ], + "id": 89, + "name": "BinaryOperation", + "src": "1647:11:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 91, + null + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 110, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 90, + "name": "ElementaryTypeName", + "src": "1669:4:0" + } + ], + "id": 91, + "name": "VariableDeclaration", + "src": "1669:12:0" + }, + { + "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": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 92, + "name": "Identifier", + "src": "1687:10:0" + } + ], + "id": 93, + "name": "MemberAccess", + "src": "1687:15:0" + } + ], + "id": 94, + "name": "MemberAccess", + "src": "1687:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 95, + "name": "Identifier", + "src": "1709:7:0" + } + ], + "id": 96, + "name": "FunctionCall", + "src": "1687:30:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"\"", + "value": "" + }, + "id": 97, + "name": "Literal", + "src": "1718:2:0" + } + ], + "id": 98, + "name": "FunctionCall", + "src": "1687:34:0" + } + ], + "id": 99, + "name": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 91, + "type": "bool", + "value": "success" + }, + "id": 100, + "name": "Identifier", + "src": "1734:7:0" + } + ], + "id": 101, + "name": "UnaryOperation", + "src": "1733:8:0" + }, + { + "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_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 102, + "name": "Identifier", + "src": "1805:8:0" + } + ], + "id": 104, + "name": "MemberAccess", + "src": "1805:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 105, + "name": "Identifier", + "src": "1823:7:0" + } + ], + "id": 106, + "name": "FunctionCall", + "src": "1805:26:0" + } + ], + "id": 107, + "name": "ExpressionStatement", + "src": "1805:26:0" + } + ], + "id": 108, + "name": "Block", + "src": "1743:97:0" + } + ], + "id": 109, + "name": "IfStatement", + "src": "1729:111:0" + } + ], + "id": 110, + "name": "Block", + "src": "1660:186:0" + } + ], + "id": 111, + "name": "IfStatement", + "src": "1643:203:0" + } + ], + "id": 112, + "name": "Block", + "src": "1423:427:0" + } + ], + "id": 113, + "name": "FunctionDefinition", + "src": "1303:547:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20TransferFrom", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 114, + "name": "ElementaryTypeName", + "src": "1886:7:0" + } + ], + "id": 115, + "name": "VariableDeclaration", + "src": "1886:13:0" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 116, + "name": "ElementaryTypeName", + "src": "1901:7:0" + } + ], + "id": 117, + "name": "VariableDeclaration", + "src": "1901:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 118, + "name": "ElementaryTypeName", + "src": "1914:7:0" + } + ], + "id": 119, + "name": "VariableDeclaration", + "src": "1914:15:0" + } + ], + "id": 120, + "name": "ParameterList", + "src": "1885:45:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 121, + "name": "ParameterList", + "src": "1940:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 123, + 125 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 170, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 122, + "name": "ElementaryTypeName", + "src": "1947:4:0" + } + ], + "id": 123, + "name": "VariableDeclaration", + "src": "1947:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 170, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 124, + "name": "ElementaryTypeName", + "src": "1961:5:0" + } + ], + "id": 125, + "name": "VariableDeclaration", + "src": "1961:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 126, + "name": "Identifier", + "src": "1982:5:0" + } + ], + "id": 127, + "name": "MemberAccess", + "src": "1982:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 128, + "name": "Identifier", + "src": "1993:3:0" + } + ], + "id": 129, + "name": "MemberAccess", + "src": "1993:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30783233623837326464", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 599290589", + "value": "0x23b872dd" + }, + "id": 130, + "name": "Literal", + "src": "2016:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 115, + "type": "address", + "value": "_from" + }, + "id": 131, + "name": "Identifier", + "src": "2047:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 117, + "type": "address", + "value": "_to" + }, + "id": 132, + "name": "Identifier", + "src": "2054:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 119, + "type": "uint256", + "value": "_amount" + }, + "id": 133, + "name": "Identifier", + "src": "2059:7:0" + } + ], + "id": 134, + "name": "FunctionCall", + "src": "1993:74:0" + } + ], + "id": 135, + "name": "FunctionCall", + "src": "1982:86:0" + } + ], + "id": 136, + "name": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "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_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 137, + "name": "Identifier", + "src": "2074:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 138, + "name": "Identifier", + "src": "2082:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens\"", + "value": "not enough allowed tokens" + }, + "id": 139, + "name": "Literal", + "src": "2091:27:0" + } + ], + "id": 140, + "name": "FunctionCall", + "src": "2074:45:0" + } + ], + "id": 141, + "name": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 142, + "name": "Identifier", + "src": "2219:4:0" + } + ], + "id": 143, + "name": "MemberAccess", + "src": "2219:11: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": 144, + "name": "Literal", + "src": "2233:1:0" + } + ], + "id": 145, + "name": "BinaryOperation", + "src": "2219:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 146, + "name": "Identifier", + "src": "2244:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 147, + "name": "Identifier", + "src": "2252:4:0" + } + ], + "id": 148, + "name": "MemberAccess", + "src": "2252:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 149, + "name": "Literal", + "src": "2267:2:0" + } + ], + "id": 150, + "name": "BinaryOperation", + "src": "2252:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 151, + "name": "Literal", + "src": "2271:44:0" + } + ], + "id": 152, + "name": "FunctionCall", + "src": "2244:72:0" + } + ], + "id": 153, + "name": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 154, + "name": "Identifier", + "src": "2324:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 155, + "name": "Identifier", + "src": "2334:3:0" + } + ], + "id": 156, + "name": "MemberAccess", + "src": "2334:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 157, + "name": "Identifier", + "src": "2345:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 158, + "name": "ElementaryTypeNameExpression", + "src": "2352:4:0" + } + ], + "id": 159, + "name": "TupleExpression", + "src": "2351:6:0" + } + ], + "id": 160, + "name": "FunctionCall", + "src": "2334:24:0" + } + ], + "id": 161, + "name": "Assignment", + "src": "2324:34:0" + } + ], + "id": 162, + "name": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "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_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 163, + "name": "Identifier", + "src": "2366:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 164, + "name": "Identifier", + "src": "2374:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens. Token returns false.\"", + "value": "not enough allowed tokens. Token returns false." + }, + "id": 165, + "name": "Literal", + "src": "2383:49:0" + } + ], + "id": 166, + "name": "FunctionCall", + "src": "2366:67:0" + } + ], + "id": 167, + "name": "ExpressionStatement", + "src": "2366:67:0" + } + ], + "id": 168, + "name": "Block", + "src": "2236:204:0" + } + ], + "id": 169, + "name": "IfStatement", + "src": "2215:225:0" + } + ], + "id": 170, + "name": "Block", + "src": "1940:504:0" + } + ], + "id": 171, + "name": "FunctionDefinition", + "src": "1854:590:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20Transfer", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 172, + "name": "ElementaryTypeName", + "src": "2476:7:0" + } + ], + "id": 173, + "name": "VariableDeclaration", + "src": "2476:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 174, + "name": "ElementaryTypeName", + "src": "2489:7:0" + } + ], + "id": 175, + "name": "VariableDeclaration", + "src": "2489:15:0" + } + ], + "id": 176, + "name": "ParameterList", + "src": "2475:30:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 177, + "name": "ParameterList", + "src": "2515:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 179, + 181 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 225, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 178, + "name": "ElementaryTypeName", + "src": "2522:4:0" + } + ], + "id": 179, + "name": "VariableDeclaration", + "src": "2522:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 225, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 180, + "name": "ElementaryTypeName", + "src": "2536:5:0" + } + ], + "id": 181, + "name": "VariableDeclaration", + "src": "2536:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 182, + "name": "Identifier", + "src": "2557:5:0" + } + ], + "id": 183, + "name": "MemberAccess", + "src": "2557:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 184, + "name": "Identifier", + "src": "2568:3:0" + } + ], + "id": 185, + "name": "MemberAccess", + "src": "2568:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30786139303539636262", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2835717307", + "value": "0xa9059cbb" + }, + "id": 186, + "name": "Literal", + "src": "2591:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 173, + "type": "address", + "value": "_to" + }, + "id": 187, + "name": "Identifier", + "src": "2618:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 175, + "type": "uint256", + "value": "_amount" + }, + "id": 188, + "name": "Identifier", + "src": "2623:7:0" + } + ], + "id": 189, + "name": "FunctionCall", + "src": "2568:63:0" + } + ], + "id": 190, + "name": "FunctionCall", + "src": "2557:75:0" + } + ], + "id": 191, + "name": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "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_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 192, + "name": "Identifier", + "src": "2638:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 193, + "name": "Identifier", + "src": "2646:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens\"", + "value": "not enough tokens" + }, + "id": 194, + "name": "Literal", + "src": "2655:19:0" + } + ], + "id": 195, + "name": "FunctionCall", + "src": "2638:37:0" + } + ], + "id": 196, + "name": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 197, + "name": "Identifier", + "src": "2775:4:0" + } + ], + "id": 198, + "name": "MemberAccess", + "src": "2775:11: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": 199, + "name": "Literal", + "src": "2789:1:0" + } + ], + "id": 200, + "name": "BinaryOperation", + "src": "2775:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 201, + "name": "Identifier", + "src": "2800:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 202, + "name": "Identifier", + "src": "2808:4:0" + } + ], + "id": 203, + "name": "MemberAccess", + "src": "2808:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 204, + "name": "Literal", + "src": "2823:2:0" + } + ], + "id": 205, + "name": "BinaryOperation", + "src": "2808:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 206, + "name": "Literal", + "src": "2827:44:0" + } + ], + "id": 207, + "name": "FunctionCall", + "src": "2800:72:0" + } + ], + "id": 208, + "name": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 209, + "name": "Identifier", + "src": "2880:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 210, + "name": "Identifier", + "src": "2890:3:0" + } + ], + "id": 211, + "name": "MemberAccess", + "src": "2890:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 212, + "name": "Identifier", + "src": "2901:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 213, + "name": "ElementaryTypeNameExpression", + "src": "2908:4:0" + } + ], + "id": 214, + "name": "TupleExpression", + "src": "2907:6:0" + } + ], + "id": 215, + "name": "FunctionCall", + "src": "2890:24:0" + } + ], + "id": 216, + "name": "Assignment", + "src": "2880:34:0" + } + ], + "id": 217, + "name": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "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_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 218, + "name": "Identifier", + "src": "2922:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 219, + "name": "Identifier", + "src": "2930:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens. Token returns false.\"", + "value": "not enough tokens. Token returns false." + }, + "id": 220, + "name": "Literal", + "src": "2939:41:0" + } + ], + "id": 221, + "name": "FunctionCall", + "src": "2922:59:0" + } + ], + "id": 222, + "name": "ExpressionStatement", + "src": "2922:59:0" + } + ], + "id": 223, + "name": "Block", + "src": "2792:196:0" + } + ], + "id": 224, + "name": "IfStatement", + "src": "2771:217:0" + } + ], + "id": 225, + "name": "Block", + "src": "2515:477:0" + } + ], + "id": 226, + "name": "FunctionDefinition", + "src": "2448:544:0" + } + ], + "id": 227, + "name": "ContractDefinition", + "src": "805:2189:0" + } + ], + "id": 228, + "name": "SourceUnit", + "src": "755:2240:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.17+commit.d19bba13.Emscripten.clang" + }, + "networks": { + "42220": { + "events": {}, + "links": { + "Hasher": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d" + }, + "address": "0x7bEdF15c8680D353AFDb1261f20D16802765f8c6", + "transactionHash": "0x047eb51edb523fb68142f363f81f6a9148a0f475a9d2d2501603eb6cd5dd9e95" + } + }, + "schemaVersion": "3.3.4", + "updatedAt": "2021-03-22T01:54:27.149Z", + "networkType": "ethereum", + "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/CELOTornado.3.json b/client/contracts/CELOTornado.3.json new file mode 100644 index 0000000..3992365 --- /dev/null +++ b/client/contracts/CELOTornado.3.json @@ -0,0 +1,7219 @@ +{ + "contractName": "ERC20Tornado", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVerifier", + "name": "_verifier", + "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": [ + { + "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" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"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\":[{\"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\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0x708938fd083239d2e9cd17e457cf25a2150bb900082fad58af8b689f786aef9c\",\"urls\":[\"bzz-raw://f345afd62002f883c60c032cd0cb051663dc8a3e59a52bf44109633b96cb3685\",\"dweb:/ipfs/QmNwjnH2uyNoq9GPjNUv6Z1mgtiR5rY3K7EHY74RBjXMpw\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x09c70432243629ef44697fd3d0ca89d3578e2b1c9f46d90757371edb163c14da\",\"urls\":[\"bzz-raw://d2a2c9fa85c32cb15793282792cd25c71804a10aa5a911e41f3bcd07f5df117e\",\"dweb:/ipfs/QmeQ1s6ypNnP7fossR4x9svuuLjcSBtQ5spUTmWGZY5Ljr\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001d1238038062001d12833981810160405260a08110156200004757600080fd5b50805160208201516040830151606084015160809094015192939192909190848484848163ffffffff8116620000af5760405162461bcd60e51b815260040180806020018281038252602781526020018062001c896027913960400191505060405180910390fd5b60208163ffffffff1610620000f65760405162461bcd60e51b815260040180806020018281038252602281526020018062001cd06022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001c48833981519152909101819055815480830183559282905260008051602062001cf28339815191529092018290555b60005463ffffffff9081169082161015620001e4576200019a82806001600160e01b036200029f16565b60028054600181810190925560008051602062001c488339815191520182905580548082018255600082905260008051602062001cf2833981519152018290559092500162000170565b50620001fa81806001600160e01b036200029f16565b60046000015550506068805460ff19166001179055826200024d5760405162461bcd60e51b815260040180806020018281038252602581526020018062001c236025913960400191505060405180910390fd5b606c80546001600160a01b039586166001600160a01b031991821617909155606d80549286169282169290921790915560699290925550606e8054939092169216919091179055506200048c92505050565b600060008051602062001cb0833981519152831062000305576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001cb08339815191528210620003545760405162461bcd60e51b815260040180806020018281038252602181526020018062001c686021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003af57600080fd5b505af4158015620003c4573d6000803e3d6000fd5b505050506040513d6040811015620003db57600080fd5b508051602090910151909250905060008051602062001cb0833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200045557600080fd5b505af41580156200046a573d6000803e3d6000fd5b505050506040513d60408110156200048157600080fd5b505195945050505050565b611787806200049c6000396000f3fe60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c63430005110032", + "sourceMap": "805:2189:0:-;;;1430:34:2;;;-1:-1:-1;;;;;;1468:27:2;;;867:237:0;5:2:-1;;;;30:1;27;20:12;5:2;867:237:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;867:237: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;;;2260:17:8;2252:67;;;;-1:-1:-1;;;2252:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2325:8;:20;;-1:-1:-1;;;;;2325:20:8;;;-1:-1:-1;;;;;;2325:20:8;;;;;;;2351:8;:20;;;;;;;;;;;;;;;2377:12;:28;;;;-1:-1:-1;1085:5:0;:14;;;;;;;;;;;;;;-1:-1:-1;805:2189:0;;-1:-1:-1;;;805:2189: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:2189:0:-;;;;;;;", + "deployedSourceMap": "805:2189:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5355:102:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5355:102:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5355:102:8;-1:-1:-1;;;;;5355:102:8;;:::i;:::-;;1089:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:47:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1089:47:8;;:::i;:::-;;;;;;;;;;;;;;;;;;3478:781;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3478:781:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;3478:781:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3478:781: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;3478:781:8;;-1:-1:-1;3478:781:8;-1:-1:-1;3478:781:8;;;;;;;;-1:-1:-1;;;;;3478:781:8;;;;;;;;;;;;;;;;;;;;;;;;:::i;1278:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1278:25:8;;;:::i;:::-;;;;-1:-1:-1;;;;;1278: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;:::-;;;;;;;;;;;;;;;;;;;1463:23:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1463: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;1231:43:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1231:43:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1231:43:8;;:::i;1058:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1058:27:8;;;:::i;1430:34:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:2;;;:::i;5192:113:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5192:113:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5192:113:8;-1:-1:-1;;;;;5192:113:8;;:::i;4669:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4669:293:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4669:293:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4669:293:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4669: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;4669:293:8;;-1:-1:-1;4669:293:8;-1:-1:-1;4669: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;4669:293:8;;;;;;;;;;;;;;;;;2658:324;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2658: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;4492:116:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4492:116:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4492: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;5355:102:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5429:8;:23;;-1:-1:-1;;;;;;5429:23:8;-1:-1:-1;;;;;5429:23:8;;;;;;;;;;5355:102::o;1089:47::-;;;;;;;;;;;;;;;:::o;3478:781::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;3695:12:8;;3687:20;;;3679:59;;;;;-1:-1:-1;;;3679:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3753:31;;;;:15;:31;;;;;;;;3752:32;3744:76;;;;;-1:-1:-1;;;3744:76:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3834:18;3846:5;3834:11;:18::i;:::-;3826:59;;;;;-1:-1:-1;;;3826:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3932:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4003:19:8;;;3932:126;;;;4024:17;;;3932:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3932:126:8;;:8;;;;;:20;;3953:6;;;;3932: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;3932: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;;3932:126:8;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3932:126:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3932:126:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3932:126:8;3924:161;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;;;;4092:31;;;;:15;:31;;;;;:38;;-1:-1:-1;;4092:38:8;4126:4;4092:38;;;4136:53;4153:10;4165:8;4175:4;4181:7;4136:16;:53::i;:::-;4200:54;;;-1:-1:-1;;;;;4200:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;-1:-1:-1;;;;;;3478:781:8:o;1278:25::-;;;-1:-1:-1;;;;;1278: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;1463:23:8:-;;;-1:-1:-1;;;;;1463: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;1231:43:8:-;;;;;;;;;;;;;;;:::o;1058:27::-;;;;:::o;1430:34:2:-;;;;;;:::o;5192:113:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5266:8;:34;;-1:-1:-1;;;;;;5266:34:8;-1:-1:-1;;;;;5266:34:8;;;;;;;;;;5192:113::o;4669:293::-;4785:35;;;;;;;;;;;;;;;;4750:19;;4796:16;4785:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4785:35:8;-1:-1:-1;4777:43:8;-1:-1:-1;4830:6:8;4826:132;4842:27;;;4826:132;;;4888:28;4896:16;;4913:1;4896:19;;;;;;;;;;;;;4888:7;:28::i;:::-;4884:68;;;4939:4;4928:5;4934:1;4928:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4884:68;4871:3;;4826:132;;;;4669:293;;;;:::o;2658:324::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;2070:5;2741:24:8;;;:11;:24;;;;;;2056:19:18;2741:24:8;2740:25;2732:71;;;;-1:-1:-1;;;2732:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2810:20;2833;2841:11;2833:7;:20::i;:::-;2859:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2859:31:8;2886:4;2859:31;;;2810:43;-1:-1:-1;2896:17:8;:15;:17::i;:::-;2925:52;;;;;;;;2961:15;2925:52;;;;;;2933:11;;2925:52;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;2658: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;4492:116:8:-;4553:4;4572:31;;;:15;:31;;;;;;;;;4492: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;1303:547:0:-;1450:7;1437:9;:20;1429:81;;;;-1:-1:-1;;;1429:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1517:51;1536:10;1563:4;1548:12;;:19;1517:18;:51::i;:::-;1578:8;;1574:63;;1596:34;1615:8;1625:4;1596:18;:34::i;:::-;1647:11;;1643:203;;1687:34;;1669:12;;-1:-1:-1;;;;;1687:15:0;;;1709:7;;1669:12;1687:34;1669:12;1687:34;1709:7;1687: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;;1668:53:0;;;1734:7;1729:111;;1805:26;;-1:-1:-1;;;;;1805:17:0;;;:26;;;;;1823:7;;1805:26;;;;1823:7;1805:17;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1805:26:0;1729:111;1643:203;;1303:547;;;;:::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;1108:191:0:-;1158:9;:14;1150:75;;;;-1:-1:-1;;;1150:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1231:63;1254:10;1274:4;1281:12;;1231:22;:63::i;:::-;1108:191::o;2448:544::-;2557:5;;2568:63;;;-1:-1:-1;;;;;2568:63:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2568:63:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2557:75:0;;;;2522:12;;2536:17;;2557:5;;;2568:63;2557: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;;;2557: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;;2521:111:0;;;;2646:7;2638:37;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;;;;2775:11;;:15;2771:217;;2808:4;:11;2823:2;2808:17;2800:72;;;;-1:-1:-1;;;2800:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2901:4;2890:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2890:24:0;;-1:-1:-1;2890:24:0;2922:59;;;;-1:-1:-1;;;2922:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1854:590;1982:5;;1993:74;;;-1:-1:-1;;;;;1993:74:0;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1993:74:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1982:86:0;;;;1947:12;;1961:17;;1982:5;;;1993:74;1982: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;;;1982: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;;1946:122:0;;;;2082:7;2074:45;;;;;-1:-1:-1;;;2074:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2219:11;;:15;2215:225;;2252:4;:11;2267:2;2252:17;2244:72;;;;-1:-1:-1;;;2244:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2345:4;2334:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2334:24:0;;-1:-1:-1;2334:24:0;2366:67;;;;-1:-1:-1;;;2366:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "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\n constructor(\n IVerifier _verifier,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator,\n address _token\n ) Tornado(_verifier, _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 _fee, uint256 _refund) internal {\n require(msg.value == _refund, \"Incorrect refund amount received by the contract\");\n\n _safeErc20Transfer(_recipient, denomination - _fee);\n if (_fee > 0) {\n _safeErc20Transfer(_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": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "ast": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + }, + "id": 228, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "755:23:0" + }, + { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 228, + "sourceUnit": 1195, + "src": "780:23:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3, + "name": "Tornado", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1194, + "src": "830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Tornado_$1194", + "typeString": "contract Tornado" + } + }, + "id": 4, + "nodeType": "InheritanceSpecifier", + "src": "830:7:0" + } + ], + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 227, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 6, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "842:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "842:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 29, + "nodeType": "Block", + "src": "1079:25:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 25, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 26, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1093:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1085:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 28, + "nodeType": "ExpressionStatement", + "src": "1085:14:0" + } + ] + }, + "documentation": null, + "id": 30, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19, + "name": "_verifier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1016:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + { + "argumentTypes": null, + "id": 20, + "name": "_denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "1027:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 21, + "name": "_merkleTreeHeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "1042:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 22, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "1061:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 23, + "modifierName": { + "argumentTypes": null, + "id": 18, + "name": "Tornado", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1194, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Tornado_$1194_$", + "typeString": "type(contract Tornado)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1008:63:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "name": "_verifier", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "884:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + }, + "typeName": { + "contractScope": null, + "id": 7, + "name": "IVerifier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 891, + "src": "884:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10, + "name": "_denomination", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "909:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "909:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12, + "name": "_merkleTreeHeight", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "936:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "936:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14, + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "966:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "989:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "989:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "878:129:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [], + "src": "1079:0:0" + }, + "scope": 227, + "src": "867:237:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1144:155:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 34, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1158:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1158:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1158:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1174:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + }, + "value": "ETH value is supposed to be 0 for ERC20 instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "id": 33, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1150:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1150:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 42, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1254:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1254:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "1274:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "id": 44, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1266:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1266:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 47, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1281:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 41, + "name": "_safeErc20TransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "1231:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "1231:63:0" + } + ] + }, + "documentation": null, + "id": 51, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:2:0" + }, + "returnParameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1144:0:0" + }, + "scope": 227, + "src": "1108:191:0", + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + { + "body": { + "id": 112, + "nodeType": "Block", + "src": "1423:427:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 63, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1437:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1437:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 65, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1437:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1459:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + }, + "value": "Incorrect refund amount received by the contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "id": 62, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1429:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 69, + "nodeType": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 71, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1536:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 72, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1548:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 73, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1563:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1548:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 70, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1517:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1517:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 76, + "nodeType": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 77, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1578:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1585:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1578:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 86, + "nodeType": "IfStatement", + "src": "1574:63:0", + "trueBody": { + "id": 85, + "nodeType": "Block", + "src": "1588:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1615:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 82, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1625:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 80, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1596:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 84, + "nodeType": "ExpressionStatement", + "src": "1596:34:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 87, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1647:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1657:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1647:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 111, + "nodeType": "IfStatement", + "src": "1643:203:0", + "trueBody": { + "id": 110, + "nodeType": "Block", + "src": "1660:186:0", + "statements": [ + { + "assignments": [ + 91, + null + ], + "declarations": [ + { + "constant": false, + "id": 91, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "1669:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 90, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1669:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 99, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "arguments": [ + { + "argumentTypes": null, + "id": 95, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1709:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 92, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1687:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687: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": 98, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1733:8:0", + "subExpression": { + "argumentTypes": null, + "id": 100, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 91, + "src": "1734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 109, + "nodeType": "IfStatement", + "src": "1729:111:0", + "trueBody": { + "id": 108, + "nodeType": "Block", + "src": "1743:97:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 105, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1823:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 102, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1805:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 107, + "nodeType": "ExpressionStatement", + "src": "1805:26:0" + } + ] + } + } + ] + } + } + ] + }, + "documentation": null, + "id": 113, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processWithdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 53, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1329:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1329:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "_relayer", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1357:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 54, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1383:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 56, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1383:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "_refund", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1397:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1397:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1328:85:0" + }, + "returnParameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [], + "src": "1423:0:0" + }, + "scope": 227, + "src": "1303:547:0", + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "1940:504:0", + "statements": [ + { + "assignments": [ + 123, + 125 + ], + "declarations": [ + { + "constant": false, + "id": 123, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1947:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 122, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1947:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 125, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1961:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 124, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1961:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 136, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30783233623837326464", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2016:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + "value": "0x23b872dd" + }, + { + "argumentTypes": null, + "id": 131, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "2047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 132, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2054:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 133, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2059:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 128, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "1993:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1993:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1993:74:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 126, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1982: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": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1982:86:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 138, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2082:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + }, + "value": "not enough allowed tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "id": 137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 141, + "nodeType": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 142, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2219:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2219:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2233:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2219:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "2215:225:0", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "2236:204:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 147, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2252:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2252:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2267:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2252:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2271:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 146, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2244:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2244:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 154, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2324:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 159, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2351:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 155, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2334:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2324:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 164, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2383:49:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + }, + "value": "not enough allowed tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "id": 163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2366:67:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 167, + "nodeType": "ExpressionStatement", + "src": "2366:67:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20TransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 115, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1886:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1886:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 117, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1901:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1901:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 119, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1914:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1914:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1885:45:0" + }, + "returnParameters": { + "id": 121, + "nodeType": "ParameterList", + "parameters": [], + "src": "1940:0:0" + }, + "scope": 227, + "src": "1854:590:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 225, + "nodeType": "Block", + "src": "2515:477:0", + "statements": [ + { + "assignments": [ + 179, + 181 + ], + "declarations": [ + { + "constant": false, + "id": 179, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2522:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2522:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 181, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2536:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 180, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2536:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30786139303539636262", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2591:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + "value": "0xa9059cbb" + }, + { + "argumentTypes": null, + "id": 187, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "2618:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 188, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "2623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 184, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2568:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2568:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2568:63:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 182, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2557:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2557: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": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 193, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2646:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e73", + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2655:19:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + }, + "value": "not enough tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2638:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2638:37:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 197, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2775:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2775:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2789:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2775:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 224, + "nodeType": "IfStatement", + "src": "2771:217:0", + "trueBody": { + "id": 223, + "nodeType": "Block", + "src": "2792:196:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 202, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2808:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2808:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2823:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2808:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2827:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2800:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2800:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2880:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 212, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2901:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2908:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 214, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2907:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 210, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2890:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2890:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2890:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2880:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 219, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2939:41:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + }, + "value": "not enough tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "id": 218, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2922:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2922:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "2922:59:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20Transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2476:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2476:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2489:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2489:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2475:30:0" + }, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "2515:0:0" + }, + "scope": 227, + "src": "2448:544:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 228, + "src": "805:2189:0" + } + ], + "src": "755:2240:0" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".17" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "755:23:0" + }, + { + "attributes": { + "SourceUnit": 1195, + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "scope": 228, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "780:23:0" + }, + { + "attributes": { + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "scope": 228 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Tornado", + "referencedDeclaration": 1194, + "type": "contract Tornado" + }, + "id": 3, + "name": "UserDefinedTypeName", + "src": "830:7:0" + } + ], + "id": 4, + "name": "InheritanceSpecifier", + "src": "830:7:0" + }, + { + "attributes": { + "constant": false, + "name": "token", + "scope": 227, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5, + "name": "ElementaryTypeName", + "src": "842:7:0" + } + ], + "id": 6, + "name": "VariableDeclaration", + "src": "842:20:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "name": "", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_verifier", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IVerifier", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IVerifier", + "referencedDeclaration": 891, + "type": "contract IVerifier" + }, + "id": 7, + "name": "UserDefinedTypeName", + "src": "884:9:0" + } + ], + "id": 8, + "name": "VariableDeclaration", + "src": "884:19:0" + }, + { + "attributes": { + "constant": false, + "name": "_denomination", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 9, + "name": "ElementaryTypeName", + "src": "909:7:0" + } + ], + "id": 10, + "name": "VariableDeclaration", + "src": "909:21:0" + }, + { + "attributes": { + "constant": false, + "name": "_merkleTreeHeight", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint32", + "type": "uint32" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "936:6:0" + } + ], + "id": 12, + "name": "VariableDeclaration", + "src": "936:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_operator", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 13, + "name": "ElementaryTypeName", + "src": "966:7:0" + } + ], + "id": 14, + "name": "VariableDeclaration", + "src": "966:17:0" + }, + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "989:7:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "989:14:0" + } + ], + "id": 17, + "name": "ParameterList", + "src": "878:129:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 24, + "name": "ParameterList", + "src": "1079:0:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1194, + "type": "type(contract Tornado)", + "value": "Tornado" + }, + "id": 18, + "name": "Identifier", + "src": "1008:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 8, + "type": "contract IVerifier", + "value": "_verifier" + }, + "id": 19, + "name": "Identifier", + "src": "1016:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "uint256", + "value": "_denomination" + }, + "id": 20, + "name": "Identifier", + "src": "1027:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint32", + "value": "_merkleTreeHeight" + }, + "id": 21, + "name": "Identifier", + "src": "1042:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "address", + "value": "_operator" + }, + "id": 22, + "name": "Identifier", + "src": "1061:9:0" + } + ], + "id": 23, + "name": "ModifierInvocation", + "src": "1008:63:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6, + "type": "address", + "value": "token" + }, + "id": 25, + "name": "Identifier", + "src": "1085:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 16, + "type": "address", + "value": "_token" + }, + "id": 26, + "name": "Identifier", + "src": "1093:6:0" + } + ], + "id": 27, + "name": "Assignment", + "src": "1085:14:0" + } + ], + "id": 28, + "name": "ExpressionStatement", + "src": "1085:14:0" + } + ], + "id": 29, + "name": "Block", + "src": "1079:25:0" + } + ], + "id": 30, + "name": "FunctionDefinition", + "src": "867:237:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processDeposit", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 31, + "name": "ParameterList", + "src": "1132:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 32, + "name": "ParameterList", + "src": "1144:0:0" + }, + { + "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_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 33, + "name": "Identifier", + "src": "1150:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 34, + "name": "Identifier", + "src": "1158:3:0" + } + ], + "id": 35, + "name": "MemberAccess", + "src": "1158:9: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": 36, + "name": "Literal", + "src": "1171:1:0" + } + ], + "id": 37, + "name": "BinaryOperation", + "src": "1158:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "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": 38, + "name": "Literal", + "src": "1174:50:0" + } + ], + "id": 39, + "name": "FunctionCall", + "src": "1150:75:0" + } + ], + "id": 40, + "name": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 171, + "type": "function (address,address,uint256)", + "value": "_safeErc20TransferFrom" + }, + "id": 41, + "name": "Identifier", + "src": "1231:22:0" + }, + { + "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": 3260, + "type": "msg", + "value": "msg" + }, + "id": 42, + "name": "Identifier", + "src": "1254:3:0" + } + ], + "id": 43, + "name": "MemberAccess", + "src": "1254:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 44, + "name": "ElementaryTypeNameExpression", + "src": "1266:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3284, + "type": "contract ERC20Tornado", + "value": "this" + }, + "id": 45, + "name": "Identifier", + "src": "1274:4:0" + } + ], + "id": 46, + "name": "FunctionCall", + "src": "1266:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 47, + "name": "Identifier", + "src": "1281:12:0" + } + ], + "id": 48, + "name": "FunctionCall", + "src": "1231:63:0" + } + ], + "id": 49, + "name": "ExpressionStatement", + "src": "1231:63:0" + } + ], + "id": 50, + "name": "Block", + "src": "1144:155:0" + } + ], + "id": 51, + "name": "FunctionDefinition", + "src": "1108:191:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processWithdraw", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_recipient", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 52, + "name": "ElementaryTypeName", + "src": "1329:15:0" + } + ], + "id": 53, + "name": "VariableDeclaration", + "src": "1329:26:0" + }, + { + "attributes": { + "constant": false, + "name": "_relayer", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 54, + "name": "ElementaryTypeName", + "src": "1357:15:0" + } + ], + "id": 55, + "name": "VariableDeclaration", + "src": "1357:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_fee", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 56, + "name": "ElementaryTypeName", + "src": "1383:7:0" + } + ], + "id": 57, + "name": "VariableDeclaration", + "src": "1383:12:0" + }, + { + "attributes": { + "constant": false, + "name": "_refund", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 58, + "name": "ElementaryTypeName", + "src": "1397:7:0" + } + ], + "id": 59, + "name": "VariableDeclaration", + "src": "1397:15:0" + } + ], + "id": 60, + "name": "ParameterList", + "src": "1328:85:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 61, + "name": "ParameterList", + "src": "1423:0:0" + }, + { + "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_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 62, + "name": "Identifier", + "src": "1429:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 63, + "name": "Identifier", + "src": "1437:3:0" + } + ], + "id": 64, + "name": "MemberAccess", + "src": "1437:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 65, + "name": "Identifier", + "src": "1450:7:0" + } + ], + "id": 66, + "name": "BinaryOperation", + "src": "1437:20:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Incorrect refund amount received by the contract\"", + "value": "Incorrect refund amount received by the contract" + }, + "id": 67, + "name": "Literal", + "src": "1459:50:0" + } + ], + "id": 68, + "name": "FunctionCall", + "src": "1429:81:0" + } + ], + "id": 69, + "name": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 70, + "name": "Identifier", + "src": "1517:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 71, + "name": "Identifier", + "src": "1536:10: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": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 72, + "name": "Identifier", + "src": "1548:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 73, + "name": "Identifier", + "src": "1563:4:0" + } + ], + "id": 74, + "name": "BinaryOperation", + "src": "1548:19:0" + } + ], + "id": 75, + "name": "FunctionCall", + "src": "1517:51:0" + } + ], + "id": 76, + "name": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "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": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 77, + "name": "Identifier", + "src": "1578:4: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": 78, + "name": "Literal", + "src": "1585:1:0" + } + ], + "id": 79, + "name": "BinaryOperation", + "src": "1578:8:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 80, + "name": "Identifier", + "src": "1596:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 81, + "name": "Identifier", + "src": "1615:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 82, + "name": "Identifier", + "src": "1625:4:0" + } + ], + "id": 83, + "name": "FunctionCall", + "src": "1596:34:0" + } + ], + "id": 84, + "name": "ExpressionStatement", + "src": "1596:34:0" + } + ], + "id": 85, + "name": "Block", + "src": "1588:49:0" + } + ], + "id": 86, + "name": "IfStatement", + "src": "1574:63:0" + }, + { + "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": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 87, + "name": "Identifier", + "src": "1647: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": 88, + "name": "Literal", + "src": "1657:1:0" + } + ], + "id": 89, + "name": "BinaryOperation", + "src": "1647:11:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 91, + null + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 110, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 90, + "name": "ElementaryTypeName", + "src": "1669:4:0" + } + ], + "id": 91, + "name": "VariableDeclaration", + "src": "1669:12:0" + }, + { + "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": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 92, + "name": "Identifier", + "src": "1687:10:0" + } + ], + "id": 93, + "name": "MemberAccess", + "src": "1687:15:0" + } + ], + "id": 94, + "name": "MemberAccess", + "src": "1687:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 95, + "name": "Identifier", + "src": "1709:7:0" + } + ], + "id": 96, + "name": "FunctionCall", + "src": "1687:30:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"\"", + "value": "" + }, + "id": 97, + "name": "Literal", + "src": "1718:2:0" + } + ], + "id": 98, + "name": "FunctionCall", + "src": "1687:34:0" + } + ], + "id": 99, + "name": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 91, + "type": "bool", + "value": "success" + }, + "id": 100, + "name": "Identifier", + "src": "1734:7:0" + } + ], + "id": 101, + "name": "UnaryOperation", + "src": "1733:8:0" + }, + { + "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_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 102, + "name": "Identifier", + "src": "1805:8:0" + } + ], + "id": 104, + "name": "MemberAccess", + "src": "1805:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 105, + "name": "Identifier", + "src": "1823:7:0" + } + ], + "id": 106, + "name": "FunctionCall", + "src": "1805:26:0" + } + ], + "id": 107, + "name": "ExpressionStatement", + "src": "1805:26:0" + } + ], + "id": 108, + "name": "Block", + "src": "1743:97:0" + } + ], + "id": 109, + "name": "IfStatement", + "src": "1729:111:0" + } + ], + "id": 110, + "name": "Block", + "src": "1660:186:0" + } + ], + "id": 111, + "name": "IfStatement", + "src": "1643:203:0" + } + ], + "id": 112, + "name": "Block", + "src": "1423:427:0" + } + ], + "id": 113, + "name": "FunctionDefinition", + "src": "1303:547:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20TransferFrom", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 114, + "name": "ElementaryTypeName", + "src": "1886:7:0" + } + ], + "id": 115, + "name": "VariableDeclaration", + "src": "1886:13:0" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 116, + "name": "ElementaryTypeName", + "src": "1901:7:0" + } + ], + "id": 117, + "name": "VariableDeclaration", + "src": "1901:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 118, + "name": "ElementaryTypeName", + "src": "1914:7:0" + } + ], + "id": 119, + "name": "VariableDeclaration", + "src": "1914:15:0" + } + ], + "id": 120, + "name": "ParameterList", + "src": "1885:45:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 121, + "name": "ParameterList", + "src": "1940:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 123, + 125 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 170, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 122, + "name": "ElementaryTypeName", + "src": "1947:4:0" + } + ], + "id": 123, + "name": "VariableDeclaration", + "src": "1947:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 170, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 124, + "name": "ElementaryTypeName", + "src": "1961:5:0" + } + ], + "id": 125, + "name": "VariableDeclaration", + "src": "1961:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 126, + "name": "Identifier", + "src": "1982:5:0" + } + ], + "id": 127, + "name": "MemberAccess", + "src": "1982:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 128, + "name": "Identifier", + "src": "1993:3:0" + } + ], + "id": 129, + "name": "MemberAccess", + "src": "1993:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30783233623837326464", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 599290589", + "value": "0x23b872dd" + }, + "id": 130, + "name": "Literal", + "src": "2016:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 115, + "type": "address", + "value": "_from" + }, + "id": 131, + "name": "Identifier", + "src": "2047:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 117, + "type": "address", + "value": "_to" + }, + "id": 132, + "name": "Identifier", + "src": "2054:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 119, + "type": "uint256", + "value": "_amount" + }, + "id": 133, + "name": "Identifier", + "src": "2059:7:0" + } + ], + "id": 134, + "name": "FunctionCall", + "src": "1993:74:0" + } + ], + "id": 135, + "name": "FunctionCall", + "src": "1982:86:0" + } + ], + "id": 136, + "name": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "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_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 137, + "name": "Identifier", + "src": "2074:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 138, + "name": "Identifier", + "src": "2082:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens\"", + "value": "not enough allowed tokens" + }, + "id": 139, + "name": "Literal", + "src": "2091:27:0" + } + ], + "id": 140, + "name": "FunctionCall", + "src": "2074:45:0" + } + ], + "id": 141, + "name": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 142, + "name": "Identifier", + "src": "2219:4:0" + } + ], + "id": 143, + "name": "MemberAccess", + "src": "2219:11: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": 144, + "name": "Literal", + "src": "2233:1:0" + } + ], + "id": 145, + "name": "BinaryOperation", + "src": "2219:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 146, + "name": "Identifier", + "src": "2244:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 147, + "name": "Identifier", + "src": "2252:4:0" + } + ], + "id": 148, + "name": "MemberAccess", + "src": "2252:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 149, + "name": "Literal", + "src": "2267:2:0" + } + ], + "id": 150, + "name": "BinaryOperation", + "src": "2252:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 151, + "name": "Literal", + "src": "2271:44:0" + } + ], + "id": 152, + "name": "FunctionCall", + "src": "2244:72:0" + } + ], + "id": 153, + "name": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 154, + "name": "Identifier", + "src": "2324:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 155, + "name": "Identifier", + "src": "2334:3:0" + } + ], + "id": 156, + "name": "MemberAccess", + "src": "2334:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 157, + "name": "Identifier", + "src": "2345:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 158, + "name": "ElementaryTypeNameExpression", + "src": "2352:4:0" + } + ], + "id": 159, + "name": "TupleExpression", + "src": "2351:6:0" + } + ], + "id": 160, + "name": "FunctionCall", + "src": "2334:24:0" + } + ], + "id": 161, + "name": "Assignment", + "src": "2324:34:0" + } + ], + "id": 162, + "name": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "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_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 163, + "name": "Identifier", + "src": "2366:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 164, + "name": "Identifier", + "src": "2374:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens. Token returns false.\"", + "value": "not enough allowed tokens. Token returns false." + }, + "id": 165, + "name": "Literal", + "src": "2383:49:0" + } + ], + "id": 166, + "name": "FunctionCall", + "src": "2366:67:0" + } + ], + "id": 167, + "name": "ExpressionStatement", + "src": "2366:67:0" + } + ], + "id": 168, + "name": "Block", + "src": "2236:204:0" + } + ], + "id": 169, + "name": "IfStatement", + "src": "2215:225:0" + } + ], + "id": 170, + "name": "Block", + "src": "1940:504:0" + } + ], + "id": 171, + "name": "FunctionDefinition", + "src": "1854:590:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20Transfer", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 172, + "name": "ElementaryTypeName", + "src": "2476:7:0" + } + ], + "id": 173, + "name": "VariableDeclaration", + "src": "2476:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 174, + "name": "ElementaryTypeName", + "src": "2489:7:0" + } + ], + "id": 175, + "name": "VariableDeclaration", + "src": "2489:15:0" + } + ], + "id": 176, + "name": "ParameterList", + "src": "2475:30:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 177, + "name": "ParameterList", + "src": "2515:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 179, + 181 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 225, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 178, + "name": "ElementaryTypeName", + "src": "2522:4:0" + } + ], + "id": 179, + "name": "VariableDeclaration", + "src": "2522:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 225, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 180, + "name": "ElementaryTypeName", + "src": "2536:5:0" + } + ], + "id": 181, + "name": "VariableDeclaration", + "src": "2536:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 182, + "name": "Identifier", + "src": "2557:5:0" + } + ], + "id": 183, + "name": "MemberAccess", + "src": "2557:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 184, + "name": "Identifier", + "src": "2568:3:0" + } + ], + "id": 185, + "name": "MemberAccess", + "src": "2568:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30786139303539636262", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2835717307", + "value": "0xa9059cbb" + }, + "id": 186, + "name": "Literal", + "src": "2591:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 173, + "type": "address", + "value": "_to" + }, + "id": 187, + "name": "Identifier", + "src": "2618:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 175, + "type": "uint256", + "value": "_amount" + }, + "id": 188, + "name": "Identifier", + "src": "2623:7:0" + } + ], + "id": 189, + "name": "FunctionCall", + "src": "2568:63:0" + } + ], + "id": 190, + "name": "FunctionCall", + "src": "2557:75:0" + } + ], + "id": 191, + "name": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "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_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 192, + "name": "Identifier", + "src": "2638:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 193, + "name": "Identifier", + "src": "2646:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens\"", + "value": "not enough tokens" + }, + "id": 194, + "name": "Literal", + "src": "2655:19:0" + } + ], + "id": 195, + "name": "FunctionCall", + "src": "2638:37:0" + } + ], + "id": 196, + "name": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 197, + "name": "Identifier", + "src": "2775:4:0" + } + ], + "id": 198, + "name": "MemberAccess", + "src": "2775:11: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": 199, + "name": "Literal", + "src": "2789:1:0" + } + ], + "id": 200, + "name": "BinaryOperation", + "src": "2775:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 201, + "name": "Identifier", + "src": "2800:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 202, + "name": "Identifier", + "src": "2808:4:0" + } + ], + "id": 203, + "name": "MemberAccess", + "src": "2808:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 204, + "name": "Literal", + "src": "2823:2:0" + } + ], + "id": 205, + "name": "BinaryOperation", + "src": "2808:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 206, + "name": "Literal", + "src": "2827:44:0" + } + ], + "id": 207, + "name": "FunctionCall", + "src": "2800:72:0" + } + ], + "id": 208, + "name": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 209, + "name": "Identifier", + "src": "2880:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 210, + "name": "Identifier", + "src": "2890:3:0" + } + ], + "id": 211, + "name": "MemberAccess", + "src": "2890:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 212, + "name": "Identifier", + "src": "2901:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 213, + "name": "ElementaryTypeNameExpression", + "src": "2908:4:0" + } + ], + "id": 214, + "name": "TupleExpression", + "src": "2907:6:0" + } + ], + "id": 215, + "name": "FunctionCall", + "src": "2890:24:0" + } + ], + "id": 216, + "name": "Assignment", + "src": "2880:34:0" + } + ], + "id": 217, + "name": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "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_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 218, + "name": "Identifier", + "src": "2922:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 219, + "name": "Identifier", + "src": "2930:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens. Token returns false.\"", + "value": "not enough tokens. Token returns false." + }, + "id": 220, + "name": "Literal", + "src": "2939:41:0" + } + ], + "id": 221, + "name": "FunctionCall", + "src": "2922:59:0" + } + ], + "id": 222, + "name": "ExpressionStatement", + "src": "2922:59:0" + } + ], + "id": 223, + "name": "Block", + "src": "2792:196:0" + } + ], + "id": 224, + "name": "IfStatement", + "src": "2771:217:0" + } + ], + "id": 225, + "name": "Block", + "src": "2515:477:0" + } + ], + "id": 226, + "name": "FunctionDefinition", + "src": "2448:544:0" + } + ], + "id": 227, + "name": "ContractDefinition", + "src": "805:2189:0" + } + ], + "id": 228, + "name": "SourceUnit", + "src": "755:2240:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.17+commit.d19bba13.Emscripten.clang" + }, + "networks": { + "42220": { + "events": {}, + "links": { + "Hasher": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d" + }, + "address": "0x4338C5F5B4b339D6E3e6bFb944647b36a6348fc6", + "transactionHash": "0x7d5f6afaf7c4bdb1fdabb011b6239764887b3a4e826bf4074eedbf3662cddf79" + } + }, + "schemaVersion": "3.3.4", + "updatedAt": "2021-03-22T01:55:17.084Z", + "networkType": "ethereum", + "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/CELOTornado.4.json b/client/contracts/CELOTornado.4.json new file mode 100644 index 0000000..aa55316 --- /dev/null +++ b/client/contracts/CELOTornado.4.json @@ -0,0 +1,7219 @@ +{ + "contractName": "ERC20Tornado", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVerifier", + "name": "_verifier", + "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": [ + { + "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" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"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\":[{\"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\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0x708938fd083239d2e9cd17e457cf25a2150bb900082fad58af8b689f786aef9c\",\"urls\":[\"bzz-raw://f345afd62002f883c60c032cd0cb051663dc8a3e59a52bf44109633b96cb3685\",\"dweb:/ipfs/QmNwjnH2uyNoq9GPjNUv6Z1mgtiR5rY3K7EHY74RBjXMpw\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x09c70432243629ef44697fd3d0ca89d3578e2b1c9f46d90757371edb163c14da\",\"urls\":[\"bzz-raw://d2a2c9fa85c32cb15793282792cd25c71804a10aa5a911e41f3bcd07f5df117e\",\"dweb:/ipfs/QmeQ1s6ypNnP7fossR4x9svuuLjcSBtQ5spUTmWGZY5Ljr\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001d1238038062001d12833981810160405260a08110156200004757600080fd5b50805160208201516040830151606084015160809094015192939192909190848484848163ffffffff8116620000af5760405162461bcd60e51b815260040180806020018281038252602781526020018062001c896027913960400191505060405180910390fd5b60208163ffffffff1610620000f65760405162461bcd60e51b815260040180806020018281038252602281526020018062001cd06022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001c48833981519152909101819055815480830183559282905260008051602062001cf28339815191529092018290555b60005463ffffffff9081169082161015620001e4576200019a82806001600160e01b036200029f16565b60028054600181810190925560008051602062001c488339815191520182905580548082018255600082905260008051602062001cf2833981519152018290559092500162000170565b50620001fa81806001600160e01b036200029f16565b60046000015550506068805460ff19166001179055826200024d5760405162461bcd60e51b815260040180806020018281038252602581526020018062001c236025913960400191505060405180910390fd5b606c80546001600160a01b039586166001600160a01b031991821617909155606d80549286169282169290921790915560699290925550606e8054939092169216919091179055506200048c92505050565b600060008051602062001cb0833981519152831062000305576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001cb08339815191528210620003545760405162461bcd60e51b815260040180806020018281038252602181526020018062001c686021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003af57600080fd5b505af4158015620003c4573d6000803e3d6000fd5b505050506040513d6040811015620003db57600080fd5b508051602090910151909250905060008051602062001cb0833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200045557600080fd5b505af41580156200046a573d6000803e3d6000fd5b505050506040513d60408110156200048157600080fd5b505195945050505050565b611787806200049c6000396000f3fe60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c63430005110032", + "sourceMap": "805:2189:0:-;;;1430:34:2;;;-1:-1:-1;;;;;;1468:27:2;;;867:237:0;5:2:-1;;;;30:1;27;20:12;5:2;867:237:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;867:237: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;;;2260:17:8;2252:67;;;;-1:-1:-1;;;2252:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2325:8;:20;;-1:-1:-1;;;;;2325:20:8;;;-1:-1:-1;;;;;;2325:20:8;;;;;;;2351:8;:20;;;;;;;;;;;;;;;2377:12;:28;;;;-1:-1:-1;1085:5:0;:14;;;;;;;;;;;;;;-1:-1:-1;805:2189:0;;-1:-1:-1;;;805:2189: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:2189:0:-;;;;;;;", + "deployedSourceMap": "805:2189:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5355:102:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5355:102:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5355:102:8;-1:-1:-1;;;;;5355:102:8;;:::i;:::-;;1089:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:47:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1089:47:8;;:::i;:::-;;;;;;;;;;;;;;;;;;3478:781;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3478:781:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;3478:781:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3478:781: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;3478:781:8;;-1:-1:-1;3478:781:8;-1:-1:-1;3478:781:8;;;;;;;;-1:-1:-1;;;;;3478:781:8;;;;;;;;;;;;;;;;;;;;;;;;:::i;1278:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1278:25:8;;;:::i;:::-;;;;-1:-1:-1;;;;;1278: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;:::-;;;;;;;;;;;;;;;;;;;1463:23:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1463: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;1231:43:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1231:43:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1231:43:8;;:::i;1058:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1058:27:8;;;:::i;1430:34:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:2;;;:::i;5192:113:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5192:113:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5192:113:8;-1:-1:-1;;;;;5192:113:8;;:::i;4669:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4669:293:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4669:293:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4669:293:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4669: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;4669:293:8;;-1:-1:-1;4669:293:8;-1:-1:-1;4669: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;4669:293:8;;;;;;;;;;;;;;;;;2658:324;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2658: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;4492:116:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4492:116:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4492: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;5355:102:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5429:8;:23;;-1:-1:-1;;;;;;5429:23:8;-1:-1:-1;;;;;5429:23:8;;;;;;;;;;5355:102::o;1089:47::-;;;;;;;;;;;;;;;:::o;3478:781::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;3695:12:8;;3687:20;;;3679:59;;;;;-1:-1:-1;;;3679:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3753:31;;;;:15;:31;;;;;;;;3752:32;3744:76;;;;;-1:-1:-1;;;3744:76:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3834:18;3846:5;3834:11;:18::i;:::-;3826:59;;;;;-1:-1:-1;;;3826:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3932:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4003:19:8;;;3932:126;;;;4024:17;;;3932:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3932:126:8;;:8;;;;;:20;;3953:6;;;;3932: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;3932: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;;3932:126:8;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3932:126:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3932:126:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3932:126:8;3924:161;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;;;;4092:31;;;;:15;:31;;;;;:38;;-1:-1:-1;;4092:38:8;4126:4;4092:38;;;4136:53;4153:10;4165:8;4175:4;4181:7;4136:16;:53::i;:::-;4200:54;;;-1:-1:-1;;;;;4200:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;-1:-1:-1;;;;;;3478:781:8:o;1278:25::-;;;-1:-1:-1;;;;;1278: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;1463:23:8:-;;;-1:-1:-1;;;;;1463: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;1231:43:8:-;;;;;;;;;;;;;;;:::o;1058:27::-;;;;:::o;1430:34:2:-;;;;;;:::o;5192:113:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5266:8;:34;;-1:-1:-1;;;;;;5266:34:8;-1:-1:-1;;;;;5266:34:8;;;;;;;;;;5192:113::o;4669:293::-;4785:35;;;;;;;;;;;;;;;;4750:19;;4796:16;4785:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4785:35:8;-1:-1:-1;4777:43:8;-1:-1:-1;4830:6:8;4826:132;4842:27;;;4826:132;;;4888:28;4896:16;;4913:1;4896:19;;;;;;;;;;;;;4888:7;:28::i;:::-;4884:68;;;4939:4;4928:5;4934:1;4928:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4884:68;4871:3;;4826:132;;;;4669:293;;;;:::o;2658:324::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;2070:5;2741:24:8;;;:11;:24;;;;;;2056:19:18;2741:24:8;2740:25;2732:71;;;;-1:-1:-1;;;2732:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2810:20;2833;2841:11;2833:7;:20::i;:::-;2859:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2859:31:8;2886:4;2859:31;;;2810:43;-1:-1:-1;2896:17:8;:15;:17::i;:::-;2925:52;;;;;;;;2961:15;2925:52;;;;;;2933:11;;2925:52;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;2658: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;4492:116:8:-;4553:4;4572:31;;;:15;:31;;;;;;;;;4492: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;1303:547:0:-;1450:7;1437:9;:20;1429:81;;;;-1:-1:-1;;;1429:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1517:51;1536:10;1563:4;1548:12;;:19;1517:18;:51::i;:::-;1578:8;;1574:63;;1596:34;1615:8;1625:4;1596:18;:34::i;:::-;1647:11;;1643:203;;1687:34;;1669:12;;-1:-1:-1;;;;;1687:15:0;;;1709:7;;1669:12;1687:34;1669:12;1687:34;1709:7;1687: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;;1668:53:0;;;1734:7;1729:111;;1805:26;;-1:-1:-1;;;;;1805:17:0;;;:26;;;;;1823:7;;1805:26;;;;1823:7;1805:17;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1805:26:0;1729:111;1643:203;;1303:547;;;;:::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;1108:191:0:-;1158:9;:14;1150:75;;;;-1:-1:-1;;;1150:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1231:63;1254:10;1274:4;1281:12;;1231:22;:63::i;:::-;1108:191::o;2448:544::-;2557:5;;2568:63;;;-1:-1:-1;;;;;2568:63:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2568:63:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2557:75:0;;;;2522:12;;2536:17;;2557:5;;;2568:63;2557: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;;;2557: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;;2521:111:0;;;;2646:7;2638:37;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;;;;2775:11;;:15;2771:217;;2808:4;:11;2823:2;2808:17;2800:72;;;;-1:-1:-1;;;2800:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2901:4;2890:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2890:24:0;;-1:-1:-1;2890:24:0;2922:59;;;;-1:-1:-1;;;2922:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1854:590;1982:5;;1993:74;;;-1:-1:-1;;;;;1993:74:0;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1993:74:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1982:86:0;;;;1947:12;;1961:17;;1982:5;;;1993:74;1982: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;;;1982: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;;1946:122:0;;;;2082:7;2074:45;;;;;-1:-1:-1;;;2074:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2219:11;;:15;2215:225;;2252:4;:11;2267:2;2252:17;2244:72;;;;-1:-1:-1;;;2244:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2345:4;2334:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2334:24:0;;-1:-1:-1;2334:24:0;2366:67;;;;-1:-1:-1;;;2366:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "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\n constructor(\n IVerifier _verifier,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator,\n address _token\n ) Tornado(_verifier, _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 _fee, uint256 _refund) internal {\n require(msg.value == _refund, \"Incorrect refund amount received by the contract\");\n\n _safeErc20Transfer(_recipient, denomination - _fee);\n if (_fee > 0) {\n _safeErc20Transfer(_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": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "ast": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + }, + "id": 228, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "755:23:0" + }, + { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 228, + "sourceUnit": 1195, + "src": "780:23:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3, + "name": "Tornado", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1194, + "src": "830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Tornado_$1194", + "typeString": "contract Tornado" + } + }, + "id": 4, + "nodeType": "InheritanceSpecifier", + "src": "830:7:0" + } + ], + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 227, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 6, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "842:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "842:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 29, + "nodeType": "Block", + "src": "1079:25:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 25, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 26, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1093:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1085:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 28, + "nodeType": "ExpressionStatement", + "src": "1085:14:0" + } + ] + }, + "documentation": null, + "id": 30, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19, + "name": "_verifier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1016:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + { + "argumentTypes": null, + "id": 20, + "name": "_denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "1027:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 21, + "name": "_merkleTreeHeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "1042:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 22, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "1061:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 23, + "modifierName": { + "argumentTypes": null, + "id": 18, + "name": "Tornado", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1194, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Tornado_$1194_$", + "typeString": "type(contract Tornado)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1008:63:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "name": "_verifier", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "884:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + }, + "typeName": { + "contractScope": null, + "id": 7, + "name": "IVerifier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 891, + "src": "884:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10, + "name": "_denomination", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "909:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "909:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12, + "name": "_merkleTreeHeight", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "936:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "936:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14, + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "966:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "989:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "989:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "878:129:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [], + "src": "1079:0:0" + }, + "scope": 227, + "src": "867:237:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1144:155:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 34, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1158:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1158:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1158:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1174:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + }, + "value": "ETH value is supposed to be 0 for ERC20 instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "id": 33, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1150:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1150:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 42, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1254:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1254:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "1274:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "id": 44, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1266:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1266:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 47, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1281:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 41, + "name": "_safeErc20TransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "1231:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "1231:63:0" + } + ] + }, + "documentation": null, + "id": 51, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:2:0" + }, + "returnParameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1144:0:0" + }, + "scope": 227, + "src": "1108:191:0", + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + { + "body": { + "id": 112, + "nodeType": "Block", + "src": "1423:427:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 63, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1437:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1437:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 65, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1437:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1459:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + }, + "value": "Incorrect refund amount received by the contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "id": 62, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1429:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 69, + "nodeType": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 71, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1536:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 72, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1548:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 73, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1563:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1548:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 70, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1517:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1517:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 76, + "nodeType": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 77, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1578:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1585:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1578:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 86, + "nodeType": "IfStatement", + "src": "1574:63:0", + "trueBody": { + "id": 85, + "nodeType": "Block", + "src": "1588:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1615:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 82, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1625:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 80, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1596:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 84, + "nodeType": "ExpressionStatement", + "src": "1596:34:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 87, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1647:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1657:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1647:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 111, + "nodeType": "IfStatement", + "src": "1643:203:0", + "trueBody": { + "id": 110, + "nodeType": "Block", + "src": "1660:186:0", + "statements": [ + { + "assignments": [ + 91, + null + ], + "declarations": [ + { + "constant": false, + "id": 91, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "1669:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 90, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1669:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 99, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "arguments": [ + { + "argumentTypes": null, + "id": 95, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1709:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 92, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1687:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687: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": 98, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1733:8:0", + "subExpression": { + "argumentTypes": null, + "id": 100, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 91, + "src": "1734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 109, + "nodeType": "IfStatement", + "src": "1729:111:0", + "trueBody": { + "id": 108, + "nodeType": "Block", + "src": "1743:97:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 105, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1823:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 102, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1805:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 107, + "nodeType": "ExpressionStatement", + "src": "1805:26:0" + } + ] + } + } + ] + } + } + ] + }, + "documentation": null, + "id": 113, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processWithdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 53, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1329:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1329:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "_relayer", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1357:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 54, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1383:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 56, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1383:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "_refund", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1397:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1397:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1328:85:0" + }, + "returnParameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [], + "src": "1423:0:0" + }, + "scope": 227, + "src": "1303:547:0", + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "1940:504:0", + "statements": [ + { + "assignments": [ + 123, + 125 + ], + "declarations": [ + { + "constant": false, + "id": 123, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1947:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 122, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1947:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 125, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1961:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 124, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1961:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 136, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30783233623837326464", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2016:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + "value": "0x23b872dd" + }, + { + "argumentTypes": null, + "id": 131, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "2047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 132, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2054:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 133, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2059:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 128, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "1993:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1993:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1993:74:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 126, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1982: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": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1982:86:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 138, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2082:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + }, + "value": "not enough allowed tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "id": 137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 141, + "nodeType": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 142, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2219:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2219:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2233:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2219:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "2215:225:0", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "2236:204:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 147, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2252:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2252:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2267:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2252:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2271:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 146, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2244:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2244:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 154, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2324:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 159, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2351:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 155, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2334:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2324:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 164, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2383:49:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + }, + "value": "not enough allowed tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "id": 163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2366:67:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 167, + "nodeType": "ExpressionStatement", + "src": "2366:67:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20TransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 115, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1886:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1886:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 117, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1901:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1901:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 119, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1914:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1914:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1885:45:0" + }, + "returnParameters": { + "id": 121, + "nodeType": "ParameterList", + "parameters": [], + "src": "1940:0:0" + }, + "scope": 227, + "src": "1854:590:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 225, + "nodeType": "Block", + "src": "2515:477:0", + "statements": [ + { + "assignments": [ + 179, + 181 + ], + "declarations": [ + { + "constant": false, + "id": 179, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2522:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2522:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 181, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2536:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 180, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2536:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30786139303539636262", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2591:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + "value": "0xa9059cbb" + }, + { + "argumentTypes": null, + "id": 187, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "2618:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 188, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "2623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 184, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2568:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2568:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2568:63:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 182, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2557:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2557: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": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 193, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2646:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e73", + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2655:19:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + }, + "value": "not enough tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2638:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2638:37:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 197, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2775:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2775:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2789:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2775:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 224, + "nodeType": "IfStatement", + "src": "2771:217:0", + "trueBody": { + "id": 223, + "nodeType": "Block", + "src": "2792:196:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 202, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2808:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2808:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2823:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2808:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2827:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2800:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2800:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2880:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 212, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2901:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2908:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 214, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2907:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 210, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2890:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2890:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2890:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2880:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 219, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2939:41:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + }, + "value": "not enough tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "id": 218, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2922:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2922:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "2922:59:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20Transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2476:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2476:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2489:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2489:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2475:30:0" + }, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "2515:0:0" + }, + "scope": 227, + "src": "2448:544:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 228, + "src": "805:2189:0" + } + ], + "src": "755:2240:0" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".17" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "755:23:0" + }, + { + "attributes": { + "SourceUnit": 1195, + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "scope": 228, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "780:23:0" + }, + { + "attributes": { + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "scope": 228 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Tornado", + "referencedDeclaration": 1194, + "type": "contract Tornado" + }, + "id": 3, + "name": "UserDefinedTypeName", + "src": "830:7:0" + } + ], + "id": 4, + "name": "InheritanceSpecifier", + "src": "830:7:0" + }, + { + "attributes": { + "constant": false, + "name": "token", + "scope": 227, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5, + "name": "ElementaryTypeName", + "src": "842:7:0" + } + ], + "id": 6, + "name": "VariableDeclaration", + "src": "842:20:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "name": "", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_verifier", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IVerifier", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IVerifier", + "referencedDeclaration": 891, + "type": "contract IVerifier" + }, + "id": 7, + "name": "UserDefinedTypeName", + "src": "884:9:0" + } + ], + "id": 8, + "name": "VariableDeclaration", + "src": "884:19:0" + }, + { + "attributes": { + "constant": false, + "name": "_denomination", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 9, + "name": "ElementaryTypeName", + "src": "909:7:0" + } + ], + "id": 10, + "name": "VariableDeclaration", + "src": "909:21:0" + }, + { + "attributes": { + "constant": false, + "name": "_merkleTreeHeight", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint32", + "type": "uint32" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "936:6:0" + } + ], + "id": 12, + "name": "VariableDeclaration", + "src": "936:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_operator", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 13, + "name": "ElementaryTypeName", + "src": "966:7:0" + } + ], + "id": 14, + "name": "VariableDeclaration", + "src": "966:17:0" + }, + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "989:7:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "989:14:0" + } + ], + "id": 17, + "name": "ParameterList", + "src": "878:129:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 24, + "name": "ParameterList", + "src": "1079:0:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1194, + "type": "type(contract Tornado)", + "value": "Tornado" + }, + "id": 18, + "name": "Identifier", + "src": "1008:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 8, + "type": "contract IVerifier", + "value": "_verifier" + }, + "id": 19, + "name": "Identifier", + "src": "1016:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "uint256", + "value": "_denomination" + }, + "id": 20, + "name": "Identifier", + "src": "1027:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint32", + "value": "_merkleTreeHeight" + }, + "id": 21, + "name": "Identifier", + "src": "1042:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "address", + "value": "_operator" + }, + "id": 22, + "name": "Identifier", + "src": "1061:9:0" + } + ], + "id": 23, + "name": "ModifierInvocation", + "src": "1008:63:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6, + "type": "address", + "value": "token" + }, + "id": 25, + "name": "Identifier", + "src": "1085:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 16, + "type": "address", + "value": "_token" + }, + "id": 26, + "name": "Identifier", + "src": "1093:6:0" + } + ], + "id": 27, + "name": "Assignment", + "src": "1085:14:0" + } + ], + "id": 28, + "name": "ExpressionStatement", + "src": "1085:14:0" + } + ], + "id": 29, + "name": "Block", + "src": "1079:25:0" + } + ], + "id": 30, + "name": "FunctionDefinition", + "src": "867:237:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processDeposit", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 31, + "name": "ParameterList", + "src": "1132:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 32, + "name": "ParameterList", + "src": "1144:0:0" + }, + { + "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_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 33, + "name": "Identifier", + "src": "1150:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 34, + "name": "Identifier", + "src": "1158:3:0" + } + ], + "id": 35, + "name": "MemberAccess", + "src": "1158:9: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": 36, + "name": "Literal", + "src": "1171:1:0" + } + ], + "id": 37, + "name": "BinaryOperation", + "src": "1158:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "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": 38, + "name": "Literal", + "src": "1174:50:0" + } + ], + "id": 39, + "name": "FunctionCall", + "src": "1150:75:0" + } + ], + "id": 40, + "name": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 171, + "type": "function (address,address,uint256)", + "value": "_safeErc20TransferFrom" + }, + "id": 41, + "name": "Identifier", + "src": "1231:22:0" + }, + { + "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": 3260, + "type": "msg", + "value": "msg" + }, + "id": 42, + "name": "Identifier", + "src": "1254:3:0" + } + ], + "id": 43, + "name": "MemberAccess", + "src": "1254:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 44, + "name": "ElementaryTypeNameExpression", + "src": "1266:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3284, + "type": "contract ERC20Tornado", + "value": "this" + }, + "id": 45, + "name": "Identifier", + "src": "1274:4:0" + } + ], + "id": 46, + "name": "FunctionCall", + "src": "1266:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 47, + "name": "Identifier", + "src": "1281:12:0" + } + ], + "id": 48, + "name": "FunctionCall", + "src": "1231:63:0" + } + ], + "id": 49, + "name": "ExpressionStatement", + "src": "1231:63:0" + } + ], + "id": 50, + "name": "Block", + "src": "1144:155:0" + } + ], + "id": 51, + "name": "FunctionDefinition", + "src": "1108:191:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processWithdraw", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_recipient", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 52, + "name": "ElementaryTypeName", + "src": "1329:15:0" + } + ], + "id": 53, + "name": "VariableDeclaration", + "src": "1329:26:0" + }, + { + "attributes": { + "constant": false, + "name": "_relayer", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 54, + "name": "ElementaryTypeName", + "src": "1357:15:0" + } + ], + "id": 55, + "name": "VariableDeclaration", + "src": "1357:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_fee", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 56, + "name": "ElementaryTypeName", + "src": "1383:7:0" + } + ], + "id": 57, + "name": "VariableDeclaration", + "src": "1383:12:0" + }, + { + "attributes": { + "constant": false, + "name": "_refund", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 58, + "name": "ElementaryTypeName", + "src": "1397:7:0" + } + ], + "id": 59, + "name": "VariableDeclaration", + "src": "1397:15:0" + } + ], + "id": 60, + "name": "ParameterList", + "src": "1328:85:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 61, + "name": "ParameterList", + "src": "1423:0:0" + }, + { + "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_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 62, + "name": "Identifier", + "src": "1429:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 63, + "name": "Identifier", + "src": "1437:3:0" + } + ], + "id": 64, + "name": "MemberAccess", + "src": "1437:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 65, + "name": "Identifier", + "src": "1450:7:0" + } + ], + "id": 66, + "name": "BinaryOperation", + "src": "1437:20:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Incorrect refund amount received by the contract\"", + "value": "Incorrect refund amount received by the contract" + }, + "id": 67, + "name": "Literal", + "src": "1459:50:0" + } + ], + "id": 68, + "name": "FunctionCall", + "src": "1429:81:0" + } + ], + "id": 69, + "name": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 70, + "name": "Identifier", + "src": "1517:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 71, + "name": "Identifier", + "src": "1536:10: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": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 72, + "name": "Identifier", + "src": "1548:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 73, + "name": "Identifier", + "src": "1563:4:0" + } + ], + "id": 74, + "name": "BinaryOperation", + "src": "1548:19:0" + } + ], + "id": 75, + "name": "FunctionCall", + "src": "1517:51:0" + } + ], + "id": 76, + "name": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "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": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 77, + "name": "Identifier", + "src": "1578:4: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": 78, + "name": "Literal", + "src": "1585:1:0" + } + ], + "id": 79, + "name": "BinaryOperation", + "src": "1578:8:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 80, + "name": "Identifier", + "src": "1596:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 81, + "name": "Identifier", + "src": "1615:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 82, + "name": "Identifier", + "src": "1625:4:0" + } + ], + "id": 83, + "name": "FunctionCall", + "src": "1596:34:0" + } + ], + "id": 84, + "name": "ExpressionStatement", + "src": "1596:34:0" + } + ], + "id": 85, + "name": "Block", + "src": "1588:49:0" + } + ], + "id": 86, + "name": "IfStatement", + "src": "1574:63:0" + }, + { + "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": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 87, + "name": "Identifier", + "src": "1647: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": 88, + "name": "Literal", + "src": "1657:1:0" + } + ], + "id": 89, + "name": "BinaryOperation", + "src": "1647:11:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 91, + null + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 110, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 90, + "name": "ElementaryTypeName", + "src": "1669:4:0" + } + ], + "id": 91, + "name": "VariableDeclaration", + "src": "1669:12:0" + }, + { + "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": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 92, + "name": "Identifier", + "src": "1687:10:0" + } + ], + "id": 93, + "name": "MemberAccess", + "src": "1687:15:0" + } + ], + "id": 94, + "name": "MemberAccess", + "src": "1687:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 95, + "name": "Identifier", + "src": "1709:7:0" + } + ], + "id": 96, + "name": "FunctionCall", + "src": "1687:30:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"\"", + "value": "" + }, + "id": 97, + "name": "Literal", + "src": "1718:2:0" + } + ], + "id": 98, + "name": "FunctionCall", + "src": "1687:34:0" + } + ], + "id": 99, + "name": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 91, + "type": "bool", + "value": "success" + }, + "id": 100, + "name": "Identifier", + "src": "1734:7:0" + } + ], + "id": 101, + "name": "UnaryOperation", + "src": "1733:8:0" + }, + { + "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_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 102, + "name": "Identifier", + "src": "1805:8:0" + } + ], + "id": 104, + "name": "MemberAccess", + "src": "1805:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 105, + "name": "Identifier", + "src": "1823:7:0" + } + ], + "id": 106, + "name": "FunctionCall", + "src": "1805:26:0" + } + ], + "id": 107, + "name": "ExpressionStatement", + "src": "1805:26:0" + } + ], + "id": 108, + "name": "Block", + "src": "1743:97:0" + } + ], + "id": 109, + "name": "IfStatement", + "src": "1729:111:0" + } + ], + "id": 110, + "name": "Block", + "src": "1660:186:0" + } + ], + "id": 111, + "name": "IfStatement", + "src": "1643:203:0" + } + ], + "id": 112, + "name": "Block", + "src": "1423:427:0" + } + ], + "id": 113, + "name": "FunctionDefinition", + "src": "1303:547:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20TransferFrom", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 114, + "name": "ElementaryTypeName", + "src": "1886:7:0" + } + ], + "id": 115, + "name": "VariableDeclaration", + "src": "1886:13:0" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 116, + "name": "ElementaryTypeName", + "src": "1901:7:0" + } + ], + "id": 117, + "name": "VariableDeclaration", + "src": "1901:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 118, + "name": "ElementaryTypeName", + "src": "1914:7:0" + } + ], + "id": 119, + "name": "VariableDeclaration", + "src": "1914:15:0" + } + ], + "id": 120, + "name": "ParameterList", + "src": "1885:45:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 121, + "name": "ParameterList", + "src": "1940:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 123, + 125 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 170, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 122, + "name": "ElementaryTypeName", + "src": "1947:4:0" + } + ], + "id": 123, + "name": "VariableDeclaration", + "src": "1947:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 170, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 124, + "name": "ElementaryTypeName", + "src": "1961:5:0" + } + ], + "id": 125, + "name": "VariableDeclaration", + "src": "1961:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 126, + "name": "Identifier", + "src": "1982:5:0" + } + ], + "id": 127, + "name": "MemberAccess", + "src": "1982:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 128, + "name": "Identifier", + "src": "1993:3:0" + } + ], + "id": 129, + "name": "MemberAccess", + "src": "1993:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30783233623837326464", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 599290589", + "value": "0x23b872dd" + }, + "id": 130, + "name": "Literal", + "src": "2016:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 115, + "type": "address", + "value": "_from" + }, + "id": 131, + "name": "Identifier", + "src": "2047:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 117, + "type": "address", + "value": "_to" + }, + "id": 132, + "name": "Identifier", + "src": "2054:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 119, + "type": "uint256", + "value": "_amount" + }, + "id": 133, + "name": "Identifier", + "src": "2059:7:0" + } + ], + "id": 134, + "name": "FunctionCall", + "src": "1993:74:0" + } + ], + "id": 135, + "name": "FunctionCall", + "src": "1982:86:0" + } + ], + "id": 136, + "name": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "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_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 137, + "name": "Identifier", + "src": "2074:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 138, + "name": "Identifier", + "src": "2082:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens\"", + "value": "not enough allowed tokens" + }, + "id": 139, + "name": "Literal", + "src": "2091:27:0" + } + ], + "id": 140, + "name": "FunctionCall", + "src": "2074:45:0" + } + ], + "id": 141, + "name": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 142, + "name": "Identifier", + "src": "2219:4:0" + } + ], + "id": 143, + "name": "MemberAccess", + "src": "2219:11: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": 144, + "name": "Literal", + "src": "2233:1:0" + } + ], + "id": 145, + "name": "BinaryOperation", + "src": "2219:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 146, + "name": "Identifier", + "src": "2244:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 147, + "name": "Identifier", + "src": "2252:4:0" + } + ], + "id": 148, + "name": "MemberAccess", + "src": "2252:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 149, + "name": "Literal", + "src": "2267:2:0" + } + ], + "id": 150, + "name": "BinaryOperation", + "src": "2252:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 151, + "name": "Literal", + "src": "2271:44:0" + } + ], + "id": 152, + "name": "FunctionCall", + "src": "2244:72:0" + } + ], + "id": 153, + "name": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 154, + "name": "Identifier", + "src": "2324:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 155, + "name": "Identifier", + "src": "2334:3:0" + } + ], + "id": 156, + "name": "MemberAccess", + "src": "2334:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 157, + "name": "Identifier", + "src": "2345:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 158, + "name": "ElementaryTypeNameExpression", + "src": "2352:4:0" + } + ], + "id": 159, + "name": "TupleExpression", + "src": "2351:6:0" + } + ], + "id": 160, + "name": "FunctionCall", + "src": "2334:24:0" + } + ], + "id": 161, + "name": "Assignment", + "src": "2324:34:0" + } + ], + "id": 162, + "name": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "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_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 163, + "name": "Identifier", + "src": "2366:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 164, + "name": "Identifier", + "src": "2374:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens. Token returns false.\"", + "value": "not enough allowed tokens. Token returns false." + }, + "id": 165, + "name": "Literal", + "src": "2383:49:0" + } + ], + "id": 166, + "name": "FunctionCall", + "src": "2366:67:0" + } + ], + "id": 167, + "name": "ExpressionStatement", + "src": "2366:67:0" + } + ], + "id": 168, + "name": "Block", + "src": "2236:204:0" + } + ], + "id": 169, + "name": "IfStatement", + "src": "2215:225:0" + } + ], + "id": 170, + "name": "Block", + "src": "1940:504:0" + } + ], + "id": 171, + "name": "FunctionDefinition", + "src": "1854:590:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20Transfer", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 172, + "name": "ElementaryTypeName", + "src": "2476:7:0" + } + ], + "id": 173, + "name": "VariableDeclaration", + "src": "2476:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 174, + "name": "ElementaryTypeName", + "src": "2489:7:0" + } + ], + "id": 175, + "name": "VariableDeclaration", + "src": "2489:15:0" + } + ], + "id": 176, + "name": "ParameterList", + "src": "2475:30:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 177, + "name": "ParameterList", + "src": "2515:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 179, + 181 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 225, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 178, + "name": "ElementaryTypeName", + "src": "2522:4:0" + } + ], + "id": 179, + "name": "VariableDeclaration", + "src": "2522:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 225, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 180, + "name": "ElementaryTypeName", + "src": "2536:5:0" + } + ], + "id": 181, + "name": "VariableDeclaration", + "src": "2536:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 182, + "name": "Identifier", + "src": "2557:5:0" + } + ], + "id": 183, + "name": "MemberAccess", + "src": "2557:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 184, + "name": "Identifier", + "src": "2568:3:0" + } + ], + "id": 185, + "name": "MemberAccess", + "src": "2568:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30786139303539636262", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2835717307", + "value": "0xa9059cbb" + }, + "id": 186, + "name": "Literal", + "src": "2591:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 173, + "type": "address", + "value": "_to" + }, + "id": 187, + "name": "Identifier", + "src": "2618:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 175, + "type": "uint256", + "value": "_amount" + }, + "id": 188, + "name": "Identifier", + "src": "2623:7:0" + } + ], + "id": 189, + "name": "FunctionCall", + "src": "2568:63:0" + } + ], + "id": 190, + "name": "FunctionCall", + "src": "2557:75:0" + } + ], + "id": 191, + "name": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "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_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 192, + "name": "Identifier", + "src": "2638:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 193, + "name": "Identifier", + "src": "2646:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens\"", + "value": "not enough tokens" + }, + "id": 194, + "name": "Literal", + "src": "2655:19:0" + } + ], + "id": 195, + "name": "FunctionCall", + "src": "2638:37:0" + } + ], + "id": 196, + "name": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 197, + "name": "Identifier", + "src": "2775:4:0" + } + ], + "id": 198, + "name": "MemberAccess", + "src": "2775:11: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": 199, + "name": "Literal", + "src": "2789:1:0" + } + ], + "id": 200, + "name": "BinaryOperation", + "src": "2775:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 201, + "name": "Identifier", + "src": "2800:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 202, + "name": "Identifier", + "src": "2808:4:0" + } + ], + "id": 203, + "name": "MemberAccess", + "src": "2808:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 204, + "name": "Literal", + "src": "2823:2:0" + } + ], + "id": 205, + "name": "BinaryOperation", + "src": "2808:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 206, + "name": "Literal", + "src": "2827:44:0" + } + ], + "id": 207, + "name": "FunctionCall", + "src": "2800:72:0" + } + ], + "id": 208, + "name": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 209, + "name": "Identifier", + "src": "2880:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 210, + "name": "Identifier", + "src": "2890:3:0" + } + ], + "id": 211, + "name": "MemberAccess", + "src": "2890:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 212, + "name": "Identifier", + "src": "2901:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 213, + "name": "ElementaryTypeNameExpression", + "src": "2908:4:0" + } + ], + "id": 214, + "name": "TupleExpression", + "src": "2907:6:0" + } + ], + "id": 215, + "name": "FunctionCall", + "src": "2890:24:0" + } + ], + "id": 216, + "name": "Assignment", + "src": "2880:34:0" + } + ], + "id": 217, + "name": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "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_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 218, + "name": "Identifier", + "src": "2922:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 219, + "name": "Identifier", + "src": "2930:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens. Token returns false.\"", + "value": "not enough tokens. Token returns false." + }, + "id": 220, + "name": "Literal", + "src": "2939:41:0" + } + ], + "id": 221, + "name": "FunctionCall", + "src": "2922:59:0" + } + ], + "id": 222, + "name": "ExpressionStatement", + "src": "2922:59:0" + } + ], + "id": 223, + "name": "Block", + "src": "2792:196:0" + } + ], + "id": 224, + "name": "IfStatement", + "src": "2771:217:0" + } + ], + "id": 225, + "name": "Block", + "src": "2515:477:0" + } + ], + "id": 226, + "name": "FunctionDefinition", + "src": "2448:544:0" + } + ], + "id": 227, + "name": "ContractDefinition", + "src": "805:2189:0" + } + ], + "id": 228, + "name": "SourceUnit", + "src": "755:2240:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.17+commit.d19bba13.Emscripten.clang" + }, + "networks": { + "42220": { + "events": {}, + "links": { + "Hasher": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d" + }, + "address": "0x914Cd0f5987a43271e173E40Ee3F23C88D28eeA1", + "transactionHash": "0x4f5e74a0df8a1b56b01980d1a6845ea6b4de55091de3479a684ca7ead3867d7f" + } + }, + "schemaVersion": "3.3.4", + "updatedAt": "2021-03-22T01:56:12.050Z", + "networkType": "ethereum", + "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/CELOTornado.5.json b/client/contracts/CELOTornado.5.json new file mode 100644 index 0000000..61a0a69 --- /dev/null +++ b/client/contracts/CELOTornado.5.json @@ -0,0 +1,7219 @@ +{ + "contractName": "ERC20Tornado", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVerifier", + "name": "_verifier", + "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": [ + { + "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" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"_verifier\",\"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\":[{\"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\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0x708938fd083239d2e9cd17e457cf25a2150bb900082fad58af8b689f786aef9c\",\"urls\":[\"bzz-raw://f345afd62002f883c60c032cd0cb051663dc8a3e59a52bf44109633b96cb3685\",\"dweb:/ipfs/QmNwjnH2uyNoq9GPjNUv6Z1mgtiR5rY3K7EHY74RBjXMpw\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x09c70432243629ef44697fd3d0ca89d3578e2b1c9f46d90757371edb163c14da\",\"urls\":[\"bzz-raw://d2a2c9fa85c32cb15793282792cd25c71804a10aa5a911e41f3bcd07f5df117e\",\"dweb:/ipfs/QmeQ1s6ypNnP7fossR4x9svuuLjcSBtQ5spUTmWGZY5Ljr\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", + "bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001d1238038062001d12833981810160405260a08110156200004757600080fd5b50805160208201516040830151606084015160809094015192939192909190848484848163ffffffff8116620000af5760405162461bcd60e51b815260040180806020018281038252602781526020018062001c896027913960400191505060405180910390fd5b60208163ffffffff1610620000f65760405162461bcd60e51b815260040180806020018281038252602281526020018062001cd06022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001c48833981519152909101819055815480830183559282905260008051602062001cf28339815191529092018290555b60005463ffffffff9081169082161015620001e4576200019a82806001600160e01b036200029f16565b60028054600181810190925560008051602062001c488339815191520182905580548082018255600082905260008051602062001cf2833981519152018290559092500162000170565b50620001fa81806001600160e01b036200029f16565b60046000015550506068805460ff19166001179055826200024d5760405162461bcd60e51b815260040180806020018281038252602581526020018062001c236025913960400191505060405180910390fd5b606c80546001600160a01b039586166001600160a01b031991821617909155606d80549286169282169290921790915560699290925550606e8054939092169216919091179055506200048c92505050565b600060008051602062001cb0833981519152831062000305576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001cb08339815191528210620003545760405162461bcd60e51b815260040180806020018281038252602181526020018062001c686021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003af57600080fd5b505af4158015620003c4573d6000803e3d6000fd5b505050506040513d6040811015620003db57600080fd5b508051602090910151909250905060008051602062001cb0833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200045557600080fd5b505af41580156200046a573d6000803e3d6000fd5b505050506040513d60408110156200048157600080fd5b505195945050505050565b611787806200049c6000396000f3fe60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b5061027161099e565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109ad565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b8e565b3480156102f057600080fd5b506102f9610ba0565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610bac565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610bbb565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c2e565b34801561038757600080fd5b506102bd610c43565b34801561039c57600080fd5b506102f9610c49565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c55565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cc0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d48565b3480156104cc57600080fd5b506102bd610e75565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e95565b34801561050b57600080fd5b506102f9610ea9565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610eae565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610ec3565b34801561057457600080fd5b506102bd610ee1565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610f05565b3480156105b357600080fd5b50610271610f12565b3480156105c857600080fd5b506102f9610f21565b606d546001600160a01b0316331461061a5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60685460ff166106a8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff19169055606954821115610709576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561076d576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61077686610bbb565b6107c7576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c08082018352898252602082018990526001600160a01b038881168385015287811660608401526080830187905260a08301869052925163695ef6f960e01b8152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561084c578181015183820152602001610834565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561089e57600080fd5b505af11580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051610914576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152606a60205260409020805460ff1916600117905561093984848484610f34565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506068805460ff19166001179055505050505050565b606c546001600160a01b031681565b60006000805160206116bd8339815191528310610a11576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116bd8339815191528210610a5d5760405162461bcd60e51b815260040180806020018281038252602181526020018061166d6021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610ab757600080fd5b505af4158015610acb573d6000803e3d6000fd5b505050506040513d6040811015610ae157600080fd5b50805160209091015190925090506000805160206116bd833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b5957600080fd5b505af4158015610b6d573d6000803e3d6000fd5b505050506040513d6040811015610b8357600080fd5b505195945050505050565b6000805160206116bd83398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bca57506000610c29565b60035463ffffffff165b60048163ffffffff1660648110610be757fe5b0154831415610bfa576001915050610c29565b63ffffffff8116610c09575060645b6003546000199091019063ffffffff80831691161415610bd45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c9e5760405162461bcd60e51b815260040180806020018281038252602581526020018061172e6025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610cec578160200160208202803883390190505b50905060005b82811015610d4157610d15848483818110610d0957fe5b90506020020135610eae565b15610d39576001828281518110610d2857fe5b911515602092830291909101909101525b600101610cf2565b5092915050565b60685460ff16610d9f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6068805460ff191690556000818152606b602052604090205460ff1615610df75760405162461bcd60e51b81526004018080602001828103825260218152602001806116dd6021913960400191505060405180910390fd5b6000610e028261102f565b6000838152606b60205260409020805460ff191660011790559050610e256111c6565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506068805460ff19166001179055565b60035460009060049063ffffffff1660648110610e8e57fe5b0154905090565b60048160648110610ea257fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ed057fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ed057fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f725760405162461bcd60e51b81526004018080602001828103825260308152602001806116166030913960400191505060405180910390fd5b610f80848360695403611212565b8115610f9057610f908383611212565b8015611029576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fe1576040519150601f19603f3d011682016040523d82523d6000602084013e610fe6565b606091505b5050905080611027576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015611025573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a1681141561108c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806115bd602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561116457600185166111205783925060028163ffffffff16815481106110ee57fe5b906000526020600020015491508360018263ffffffff168154811061110f57fe5b600091825260209091200155611144565b60018163ffffffff168154811061113357fe5b906000526020600020015492508391505b61114e83836109ad565b9350600263ffffffff86160494506001016110bc565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff9081169290921790819055849160049116606481106111a657fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156112035760405162461bcd60e51b81526004018080602001828103825260308152602001806116fe6030913960400191505060405180910390fd5b61121033306069546113dd565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b6020831061128f5780518252601f199092019160209182019101611270565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b509150915081611341576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110295780516020146113885760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561139d57600080fd5b50519150816110295760405162461bcd60e51b81526004018080602001828103825260278152602001806116466027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b602083106114625780518252601f199092019160209182019101611443565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b509150915081611520576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b8051156110275780516020146115675760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ec602a913960400191505060405180910390fd5b80806020019051602081101561157c57600080fd5b50519150816110275760405162461bcd60e51b815260040180806020018281038252602f81526020018061168e602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820494b71139a3b0e5b3d4285ff58127e5c54881ed5204c3d740b94c1c4832e681c64736f6c63430005110032", + "sourceMap": "805:2189:0:-;;;1430:34:2;;;-1:-1:-1;;;;;;1468:27:2;;;867:237:0;5:2:-1;;;;30:1;27;20:12;5:2;867:237:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;867:237: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;;;2260:17:8;2252:67;;;;-1:-1:-1;;;2252:67:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2325:8;:20;;-1:-1:-1;;;;;2325:20:8;;;-1:-1:-1;;;;;;2325:20:8;;;;;;;2351:8;:20;;;;;;;;;;;;;;;2377:12;:28;;;;-1:-1:-1;1085:5:0;:14;;;;;;;;;;;;;;-1:-1:-1;805:2189:0;;-1:-1:-1;;;805:2189: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:2189:0:-;;;;;;;", + "deployedSourceMap": "805:2189:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5355:102:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5355:102:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5355:102:8;-1:-1:-1;;;;;5355:102:8;;:::i;:::-;;1089:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1089:47:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1089:47:8;;:::i;:::-;;;;;;;;;;;;;;;;;;3478:781;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3478:781:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;3478:781:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3478:781: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;3478:781:8;;-1:-1:-1;3478:781:8;-1:-1:-1;3478:781:8;;;;;;;;-1:-1:-1;;;;;3478:781:8;;;;;;;;;;;;;;;;;;;;;;;;:::i;1278:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1278:25:8;;;:::i;:::-;;;;-1:-1:-1;;;;;1278: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;:::-;;;;;;;;;;;;;;;;;;;1463:23:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1463: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;1231:43:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1231:43:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1231:43:8;;:::i;1058:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1058:27:8;;;:::i;1430:34:2:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1430:34:2;;;:::i;5192:113:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5192:113:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5192:113:8;-1:-1:-1;;;;;5192:113:8;;:::i;4669:293::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4669:293:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4669:293:8;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4669:293:8;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4669: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;4669:293:8;;-1:-1:-1;4669:293:8;-1:-1:-1;4669: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;4669:293:8;;;;;;;;;;;;;;;;;2658:324;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2658: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;4492:116:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4492:116:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4492: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;5355:102:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5429:8;:23;;-1:-1:-1;;;;;;5429:23:8;-1:-1:-1;;;;;5429:23:8;;;;;;;;;;5355:102::o;1089:47::-;;;;;;;;;;;;;;;:::o;3478:781::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;3695:12:8;;3687:20;;;3679:59;;;;;-1:-1:-1;;;3679:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3753:31;;;;:15;:31;;;;;;;;3752:32;3744:76;;;;;-1:-1:-1;;;3744:76:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3834:18;3846:5;3834:11;:18::i;:::-;3826:59;;;;;-1:-1:-1;;;3826:59:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;3932:8;;:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4003:19:8;;;3932:126;;;;4024:17;;;3932:126;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3932:126:8;;:8;;;;;:20;;3953:6;;;;3932: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;3932: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;;3932:126:8;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3932:126:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3932:126:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3932:126:8;3924:161;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;-1:-1:-1;;;3924:161:8;;;;;;;;;;;;;;;4092:31;;;;:15;:31;;;;;:38;;-1:-1:-1;;4092:38:8;4126:4;4092:38;;;4136:53;4153:10;4165:8;4175:4;4181:7;4136:16;:53::i;:::-;4200:54;;;-1:-1:-1;;;;;4200:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;-1:-1:-1;;;;;;3478:781:8:o;1278:25::-;;;-1:-1:-1;;;;;1278: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;1463:23:8:-;;;-1:-1:-1;;;;;1463: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;1231:43:8:-;;;;;;;;;;;;;;;:::o;1058:27::-;;;;:::o;1430:34:2:-;;;;;;:::o;5192:113:8:-;1540:8;;-1:-1:-1;;;;;1540:8:8;1526:10;:22;1518:72;;;;-1:-1:-1;;;1518:72:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5266:8;:34;;-1:-1:-1;;;;;;5266:34:8;-1:-1:-1;;;;;5266:34:8;;;;;;;;;;5192:113::o;4669:293::-;4785:35;;;;;;;;;;;;;;;;4750:19;;4796:16;4785:35;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4785:35:8;-1:-1:-1;4777:43:8;-1:-1:-1;4830:6:8;4826:132;4842:27;;;4826:132;;;4888:28;4896:16;;4913:1;4896:19;;;;;;;;;;;;;4888:7;:28::i;:::-;4884:68;;;4939:4;4928:5;4934:1;4928:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;4884:68;4871:3;;4826:132;;;;4669:293;;;;:::o;2658:324::-;1934:11:18;;;;1926:55;;;;;-1:-1:-1;;;1926:55:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;2056:19:18;;;2070:5;2741:24:8;;;:11;:24;;;;;;2056:19:18;2741:24:8;2740:25;2732:71;;;;-1:-1:-1;;;2732:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2810:20;2833;2841:11;2833:7;:20::i;:::-;2859:24;;;;:11;:24;;;;;:31;;-1:-1:-1;;2859:31:8;2886:4;2859:31;;;2810:43;-1:-1:-1;2896:17:8;:15;:17::i;:::-;2925:52;;;;;;;;2961:15;2925:52;;;;;;2933:11;;2925:52;;;;;;;;-1:-1:-1;;2230:11:18;:18;;-1:-1:-1;;2230:18:18;2244:4;2230:18;;;2658: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;4492:116:8:-;4553:4;4572:31;;;:15;:31;;;;;;;;;4492: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;1303:547:0:-;1450:7;1437:9;:20;1429:81;;;;-1:-1:-1;;;1429:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1517:51;1536:10;1563:4;1548:12;;:19;1517:18;:51::i;:::-;1578:8;;1574:63;;1596:34;1615:8;1625:4;1596:18;:34::i;:::-;1647:11;;1643:203;;1687:34;;1669:12;;-1:-1:-1;;;;;1687:15:0;;;1709:7;;1669:12;1687:34;1669:12;1687:34;1709:7;1687: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;;1668:53:0;;;1734:7;1729:111;;1805:26;;-1:-1:-1;;;;;1805:17:0;;;:26;;;;;1823:7;;1805:26;;;;1823:7;1805:17;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1805:26:0;1729:111;1643:203;;1303:547;;;;:::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;1108:191:0:-;1158:9;:14;1150:75;;;;-1:-1:-1;;;1150:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1231:63;1254:10;1274:4;1281:12;;1231:22;:63::i;:::-;1108:191::o;2448:544::-;2557:5;;2568:63;;;-1:-1:-1;;;;;2568:63:0;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2568:63:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;2557:75:0;;;;2522:12;;2536:17;;2557:5;;;2568:63;2557: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;;;2557: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;;2521:111:0;;;;2646:7;2638:37;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;-1:-1:-1;;;2638:37:0;;;;;;;;;;;;;;;2775:11;;:15;2771:217;;2808:4;:11;2823:2;2808:17;2800:72;;;;-1:-1:-1;;;2800:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2901:4;2890:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2890:24:0;;-1:-1:-1;2890:24:0;2922:59;;;;-1:-1:-1;;;2922:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1854:590;1982:5;;1993:74;;;-1:-1:-1;;;;;1993:74:0;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1993:74:0;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1982:86:0;;;;1947:12;;1961:17;;1982:5;;;1993:74;1982: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;;;1982: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;;1946:122:0;;;;2082:7;2074:45;;;;;-1:-1:-1;;;2074:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2219:11;;:15;2215:225;;2252:4;:11;2267:2;2252:17;2244:72;;;;-1:-1:-1;;;2244:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2345:4;2334:24;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2334:24:0;;-1:-1:-1;2334:24:0;2366:67;;;;-1:-1:-1;;;2366:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "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\n constructor(\n IVerifier _verifier,\n uint256 _denomination,\n uint32 _merkleTreeHeight,\n address _operator,\n address _token\n ) Tornado(_verifier, _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 _fee, uint256 _refund) internal {\n require(msg.value == _refund, \"Incorrect refund amount received by the contract\");\n\n _safeErc20Transfer(_recipient, denomination - _fee);\n if (_fee > 0) {\n _safeErc20Transfer(_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": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "ast": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + }, + "id": 228, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "755:23:0" + }, + { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 228, + "sourceUnit": 1195, + "src": "780:23:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3, + "name": "Tornado", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1194, + "src": "830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Tornado_$1194", + "typeString": "contract Tornado" + } + }, + "id": 4, + "nodeType": "InheritanceSpecifier", + "src": "830:7:0" + } + ], + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 227, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 6, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "842:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "842:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 29, + "nodeType": "Block", + "src": "1079:25:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 25, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 26, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1093:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1085:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 28, + "nodeType": "ExpressionStatement", + "src": "1085:14:0" + } + ] + }, + "documentation": null, + "id": 30, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19, + "name": "_verifier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1016:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + { + "argumentTypes": null, + "id": 20, + "name": "_denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "1027:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 21, + "name": "_merkleTreeHeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "1042:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 22, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "1061:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 23, + "modifierName": { + "argumentTypes": null, + "id": 18, + "name": "Tornado", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1194, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Tornado_$1194_$", + "typeString": "type(contract Tornado)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1008:63:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "name": "_verifier", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "884:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + }, + "typeName": { + "contractScope": null, + "id": 7, + "name": "IVerifier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 891, + "src": "884:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVerifier_$891", + "typeString": "contract IVerifier" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10, + "name": "_denomination", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "909:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "909:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12, + "name": "_merkleTreeHeight", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "936:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "936:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14, + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "966:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 30, + "src": "989:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "989:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "878:129:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [], + "src": "1079:0:0" + }, + "scope": 227, + "src": "867:237:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1144:155:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 34, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1158:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1158:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1158:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1174:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + }, + "value": "ETH value is supposed to be 0 for ERC20 instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "id": 33, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1150:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1150:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 42, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1254:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1254:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 45, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "1274:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "id": 44, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1266:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1266:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 47, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1281:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 41, + "name": "_safeErc20TransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "1231:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "1231:63:0" + } + ] + }, + "documentation": null, + "id": 51, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:2:0" + }, + "returnParameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1144:0:0" + }, + "scope": 227, + "src": "1108:191:0", + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + { + "body": { + "id": 112, + "nodeType": "Block", + "src": "1423:427:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 63, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "1437:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1437:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 65, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1437:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1459:50:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + }, + "value": "Incorrect refund amount received by the contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "id": 62, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "1429:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 69, + "nodeType": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 71, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1536:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 72, + "name": "denomination", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "1548:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 73, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1563:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1548:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 70, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1517:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1517:51:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 76, + "nodeType": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 77, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1578:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1585:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1578:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 86, + "nodeType": "IfStatement", + "src": "1574:63:0", + "trueBody": { + "id": 85, + "nodeType": "Block", + "src": "1588:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1615:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 82, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1625:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 80, + "name": "_safeErc20Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1596:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 84, + "nodeType": "ExpressionStatement", + "src": "1596:34:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 87, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1647:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1657:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1647:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 111, + "nodeType": "IfStatement", + "src": "1643:203:0", + "trueBody": { + "id": 110, + "nodeType": "Block", + "src": "1660:186:0", + "statements": [ + { + "assignments": [ + 91, + null + ], + "declarations": [ + { + "constant": false, + "id": 91, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 110, + "src": "1669:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 90, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1669:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 99, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "arguments": [ + { + "argumentTypes": null, + "id": 95, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1709:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 92, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1687:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1687: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": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687: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": 98, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1687:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1733:8:0", + "subExpression": { + "argumentTypes": null, + "id": 100, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 91, + "src": "1734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 109, + "nodeType": "IfStatement", + "src": "1729:111:0", + "trueBody": { + "id": 108, + "nodeType": "Block", + "src": "1743:97:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 105, + "name": "_refund", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1823:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 102, + "name": "_relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1805:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:26:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 107, + "nodeType": "ExpressionStatement", + "src": "1805:26:0" + } + ] + } + } + ] + } + } + ] + }, + "documentation": null, + "id": 113, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_processWithdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 53, + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1329:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1329:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "_relayer", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1357:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 54, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "name": "_fee", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1383:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 56, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1383:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "_refund", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1397:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1397:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1328:85:0" + }, + "returnParameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [], + "src": "1423:0:0" + }, + "scope": 227, + "src": "1303:547:0", + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "1940:504:0", + "statements": [ + { + "assignments": [ + 123, + 125 + ], + "declarations": [ + { + "constant": false, + "id": 123, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1947:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 122, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1947:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 125, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 170, + "src": "1961:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 124, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1961:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 136, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30783233623837326464", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2016:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + "value": "0x23b872dd" + }, + { + "argumentTypes": null, + "id": 131, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "2047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 132, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2054:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 133, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2059:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 128, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "1993:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1993:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1993:74:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 126, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "1982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1982: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": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1982:86:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 138, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2082:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + }, + "value": "not enough allowed tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "id": 137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 141, + "nodeType": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 142, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2219:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2219:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2233:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2219:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "2215:225:0", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "2236:204:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 147, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2252:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2252:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2267:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2252:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2271:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 146, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2244:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2244:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 154, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2324:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 159, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2351:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 155, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2334:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2324:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 164, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2383:49:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + }, + "value": "not enough allowed tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "id": 163, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2366:67:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 167, + "nodeType": "ExpressionStatement", + "src": "2366:67:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20TransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 115, + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1886:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1886:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 117, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1901:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1901:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 119, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "1914:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1914:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1885:45:0" + }, + "returnParameters": { + "id": 121, + "nodeType": "ParameterList", + "parameters": [], + "src": "1940:0:0" + }, + "scope": 227, + "src": "1854:590:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 225, + "nodeType": "Block", + "src": "2515:477:0", + "statements": [ + { + "assignments": [ + 179, + 181 + ], + "declarations": [ + { + "constant": false, + "id": 179, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2522:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2522:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 181, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 225, + "src": "2536:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 180, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2536:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30786139303539636262", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2591:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + "value": "0xa9059cbb" + }, + { + "argumentTypes": null, + "id": 187, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "2618:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 188, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "2623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 184, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2568:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2568:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2568:63:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 182, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "2557:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2557: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": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:75:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 193, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2646:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e73", + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2655:19:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + }, + "value": "not enough tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2638:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2638:37:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 197, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2775:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2775:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2789:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2775:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 224, + "nodeType": "IfStatement", + "src": "2771:217:0", + "trueBody": { + "id": 223, + "nodeType": "Block", + "src": "2792:196:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 202, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2808:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2808:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2823:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2808:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2827:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + }, + "value": "data length should be either 0 or 32 bytes" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "id": 201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2800:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2800:72:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2880:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 212, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "2901:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2908:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": "bool" + } + ], + "id": 214, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2907:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 210, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3247, + "src": "2890:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2890:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2890:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2880:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 219, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 179, + "src": "2930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2939:41:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + }, + "value": "not enough tokens. Token returns false." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "id": 218, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "src": "2922:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2922:59:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "2922:59:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeErc20Transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2476:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2476:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 226, + "src": "2489:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2489:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2475:30:0" + }, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "2515:0:0" + }, + "scope": 227, + "src": "2448:544:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 228, + "src": "805:2189:0" + } + ], + "src": "755:2240:0" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/ERC20Tornado.sol", + "exportedSymbols": { + "ERC20Tornado": [ + 227 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".17" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "755:23:0" + }, + { + "attributes": { + "SourceUnit": 1195, + "absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Tornado.sol", + "file": "./Tornado.sol", + "scope": 228, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "780:23:0" + }, + { + "attributes": { + "contractDependencies": [ + 694, + 1194, + 3245 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 227, + 1194, + 3245, + 694 + ], + "name": "ERC20Tornado", + "scope": 228 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Tornado", + "referencedDeclaration": 1194, + "type": "contract Tornado" + }, + "id": 3, + "name": "UserDefinedTypeName", + "src": "830:7:0" + } + ], + "id": 4, + "name": "InheritanceSpecifier", + "src": "830:7:0" + }, + { + "attributes": { + "constant": false, + "name": "token", + "scope": 227, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5, + "name": "ElementaryTypeName", + "src": "842:7:0" + } + ], + "id": 6, + "name": "VariableDeclaration", + "src": "842:20:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "name": "", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_verifier", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IVerifier", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IVerifier", + "referencedDeclaration": 891, + "type": "contract IVerifier" + }, + "id": 7, + "name": "UserDefinedTypeName", + "src": "884:9:0" + } + ], + "id": 8, + "name": "VariableDeclaration", + "src": "884:19:0" + }, + { + "attributes": { + "constant": false, + "name": "_denomination", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 9, + "name": "ElementaryTypeName", + "src": "909:7:0" + } + ], + "id": 10, + "name": "VariableDeclaration", + "src": "909:21:0" + }, + { + "attributes": { + "constant": false, + "name": "_merkleTreeHeight", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "uint32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint32", + "type": "uint32" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "936:6:0" + } + ], + "id": 12, + "name": "VariableDeclaration", + "src": "936:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_operator", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 13, + "name": "ElementaryTypeName", + "src": "966:7:0" + } + ], + "id": 14, + "name": "VariableDeclaration", + "src": "966:17:0" + }, + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 30, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "989:7:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "989:14:0" + } + ], + "id": 17, + "name": "ParameterList", + "src": "878:129:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 24, + "name": "ParameterList", + "src": "1079:0:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1194, + "type": "type(contract Tornado)", + "value": "Tornado" + }, + "id": 18, + "name": "Identifier", + "src": "1008:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 8, + "type": "contract IVerifier", + "value": "_verifier" + }, + "id": 19, + "name": "Identifier", + "src": "1016:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "uint256", + "value": "_denomination" + }, + "id": 20, + "name": "Identifier", + "src": "1027:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint32", + "value": "_merkleTreeHeight" + }, + "id": 21, + "name": "Identifier", + "src": "1042:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "address", + "value": "_operator" + }, + "id": 22, + "name": "Identifier", + "src": "1061:9:0" + } + ], + "id": 23, + "name": "ModifierInvocation", + "src": "1008:63:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6, + "type": "address", + "value": "token" + }, + "id": 25, + "name": "Identifier", + "src": "1085:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 16, + "type": "address", + "value": "_token" + }, + "id": 26, + "name": "Identifier", + "src": "1093:6:0" + } + ], + "id": 27, + "name": "Assignment", + "src": "1085:14:0" + } + ], + "id": 28, + "name": "ExpressionStatement", + "src": "1085:14:0" + } + ], + "id": 29, + "name": "Block", + "src": "1079:25:0" + } + ], + "id": 30, + "name": "FunctionDefinition", + "src": "867:237:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processDeposit", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1014, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 31, + "name": "ParameterList", + "src": "1132:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 32, + "name": "ParameterList", + "src": "1144:0:0" + }, + { + "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_b14b0818f1fdc710b92ba7e1ce725992b43e47a5b220b1b890f352eeac2e1d5e", + "typeString": "literal_string \"ETH value is supposed to be 0 for ERC20 instance\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 33, + "name": "Identifier", + "src": "1150:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 34, + "name": "Identifier", + "src": "1158:3:0" + } + ], + "id": 35, + "name": "MemberAccess", + "src": "1158:9: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": 36, + "name": "Literal", + "src": "1171:1:0" + } + ], + "id": 37, + "name": "BinaryOperation", + "src": "1158:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "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": 38, + "name": "Literal", + "src": "1174:50:0" + } + ], + "id": 39, + "name": "FunctionCall", + "src": "1150:75:0" + } + ], + "id": 40, + "name": "ExpressionStatement", + "src": "1150:75:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 171, + "type": "function (address,address,uint256)", + "value": "_safeErc20TransferFrom" + }, + "id": 41, + "name": "Identifier", + "src": "1231:22:0" + }, + { + "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": 3260, + "type": "msg", + "value": "msg" + }, + "id": 42, + "name": "Identifier", + "src": "1254:3:0" + } + ], + "id": 43, + "name": "MemberAccess", + "src": "1254:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Tornado_$227", + "typeString": "contract ERC20Tornado" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 44, + "name": "ElementaryTypeNameExpression", + "src": "1266:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3284, + "type": "contract ERC20Tornado", + "value": "this" + }, + "id": 45, + "name": "Identifier", + "src": "1274:4:0" + } + ], + "id": 46, + "name": "FunctionCall", + "src": "1266:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 47, + "name": "Identifier", + "src": "1281:12:0" + } + ], + "id": 48, + "name": "FunctionCall", + "src": "1231:63:0" + } + ], + "id": 49, + "name": "ExpressionStatement", + "src": "1231:63:0" + } + ], + "id": 50, + "name": "Block", + "src": "1144:155:0" + } + ], + "id": 51, + "name": "FunctionDefinition", + "src": "1108:191:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_processWithdraw", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": 1110, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_recipient", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 52, + "name": "ElementaryTypeName", + "src": "1329:15:0" + } + ], + "id": 53, + "name": "VariableDeclaration", + "src": "1329:26:0" + }, + { + "attributes": { + "constant": false, + "name": "_relayer", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 54, + "name": "ElementaryTypeName", + "src": "1357:15:0" + } + ], + "id": 55, + "name": "VariableDeclaration", + "src": "1357:24:0" + }, + { + "attributes": { + "constant": false, + "name": "_fee", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 56, + "name": "ElementaryTypeName", + "src": "1383:7:0" + } + ], + "id": 57, + "name": "VariableDeclaration", + "src": "1383:12:0" + }, + { + "attributes": { + "constant": false, + "name": "_refund", + "scope": 113, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 58, + "name": "ElementaryTypeName", + "src": "1397:7:0" + } + ], + "id": 59, + "name": "VariableDeclaration", + "src": "1397:15:0" + } + ], + "id": 60, + "name": "ParameterList", + "src": "1328:85:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 61, + "name": "ParameterList", + "src": "1423:0:0" + }, + { + "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_3189ced290ffd29dc422911cd3b29574f21c524c91f4b41e6abb0646c581cbff", + "typeString": "literal_string \"Incorrect refund amount received by the contract\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 62, + "name": "Identifier", + "src": "1429:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "msg", + "value": "msg" + }, + "id": 63, + "name": "Identifier", + "src": "1437:3:0" + } + ], + "id": 64, + "name": "MemberAccess", + "src": "1437:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 65, + "name": "Identifier", + "src": "1450:7:0" + } + ], + "id": 66, + "name": "BinaryOperation", + "src": "1437:20:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e7472616374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Incorrect refund amount received by the contract\"", + "value": "Incorrect refund amount received by the contract" + }, + "id": 67, + "name": "Literal", + "src": "1459:50:0" + } + ], + "id": 68, + "name": "FunctionCall", + "src": "1429:81:0" + } + ], + "id": 69, + "name": "ExpressionStatement", + "src": "1429:81:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 70, + "name": "Identifier", + "src": "1517:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 71, + "name": "Identifier", + "src": "1536:10: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": 897, + "type": "uint256", + "value": "denomination" + }, + "id": 72, + "name": "Identifier", + "src": "1548:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 73, + "name": "Identifier", + "src": "1563:4:0" + } + ], + "id": 74, + "name": "BinaryOperation", + "src": "1548:19:0" + } + ], + "id": 75, + "name": "FunctionCall", + "src": "1517:51:0" + } + ], + "id": 76, + "name": "ExpressionStatement", + "src": "1517:51:0" + }, + { + "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": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 77, + "name": "Identifier", + "src": "1578:4: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": 78, + "name": "Literal", + "src": "1585:1:0" + } + ], + "id": 79, + "name": "BinaryOperation", + "src": "1578:8:0" + }, + { + "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_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "function (address,uint256)", + "value": "_safeErc20Transfer" + }, + "id": 80, + "name": "Identifier", + "src": "1596:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 81, + "name": "Identifier", + "src": "1615:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 57, + "type": "uint256", + "value": "_fee" + }, + "id": 82, + "name": "Identifier", + "src": "1625:4:0" + } + ], + "id": 83, + "name": "FunctionCall", + "src": "1596:34:0" + } + ], + "id": 84, + "name": "ExpressionStatement", + "src": "1596:34:0" + } + ], + "id": 85, + "name": "Block", + "src": "1588:49:0" + } + ], + "id": 86, + "name": "IfStatement", + "src": "1574:63:0" + }, + { + "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": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 87, + "name": "Identifier", + "src": "1647: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": 88, + "name": "Literal", + "src": "1657:1:0" + } + ], + "id": 89, + "name": "BinaryOperation", + "src": "1647:11:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 91, + null + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 110, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 90, + "name": "ElementaryTypeName", + "src": "1669:4:0" + } + ], + "id": 91, + "name": "VariableDeclaration", + "src": "1669:12:0" + }, + { + "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": 53, + "type": "address payable", + "value": "_recipient" + }, + "id": 92, + "name": "Identifier", + "src": "1687:10:0" + } + ], + "id": 93, + "name": "MemberAccess", + "src": "1687:15:0" + } + ], + "id": 94, + "name": "MemberAccess", + "src": "1687:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 95, + "name": "Identifier", + "src": "1709:7:0" + } + ], + "id": 96, + "name": "FunctionCall", + "src": "1687:30:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"\"", + "value": "" + }, + "id": 97, + "name": "Literal", + "src": "1718:2:0" + } + ], + "id": 98, + "name": "FunctionCall", + "src": "1687:34:0" + } + ], + "id": 99, + "name": "VariableDeclarationStatement", + "src": "1668:53:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 91, + "type": "bool", + "value": "success" + }, + "id": 100, + "name": "Identifier", + "src": "1734:7:0" + } + ], + "id": 101, + "name": "UnaryOperation", + "src": "1733:8:0" + }, + { + "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_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address payable", + "value": "_relayer" + }, + "id": 102, + "name": "Identifier", + "src": "1805:8:0" + } + ], + "id": 104, + "name": "MemberAccess", + "src": "1805:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 59, + "type": "uint256", + "value": "_refund" + }, + "id": 105, + "name": "Identifier", + "src": "1823:7:0" + } + ], + "id": 106, + "name": "FunctionCall", + "src": "1805:26:0" + } + ], + "id": 107, + "name": "ExpressionStatement", + "src": "1805:26:0" + } + ], + "id": 108, + "name": "Block", + "src": "1743:97:0" + } + ], + "id": 109, + "name": "IfStatement", + "src": "1729:111:0" + } + ], + "id": 110, + "name": "Block", + "src": "1660:186:0" + } + ], + "id": 111, + "name": "IfStatement", + "src": "1643:203:0" + } + ], + "id": 112, + "name": "Block", + "src": "1423:427:0" + } + ], + "id": 113, + "name": "FunctionDefinition", + "src": "1303:547:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20TransferFrom", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 114, + "name": "ElementaryTypeName", + "src": "1886:7:0" + } + ], + "id": 115, + "name": "VariableDeclaration", + "src": "1886:13:0" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 116, + "name": "ElementaryTypeName", + "src": "1901:7:0" + } + ], + "id": 117, + "name": "VariableDeclaration", + "src": "1901:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 118, + "name": "ElementaryTypeName", + "src": "1914:7:0" + } + ], + "id": 119, + "name": "VariableDeclaration", + "src": "1914:15:0" + } + ], + "id": 120, + "name": "ParameterList", + "src": "1885:45:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 121, + "name": "ParameterList", + "src": "1940:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 123, + 125 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 170, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 122, + "name": "ElementaryTypeName", + "src": "1947:4:0" + } + ], + "id": 123, + "name": "VariableDeclaration", + "src": "1947:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 170, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 124, + "name": "ElementaryTypeName", + "src": "1961:5:0" + } + ], + "id": 125, + "name": "VariableDeclaration", + "src": "1961:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 126, + "name": "Identifier", + "src": "1982:5:0" + } + ], + "id": 127, + "name": "MemberAccess", + "src": "1982:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_599290589_by_1", + "typeString": "int_const 599290589" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 128, + "name": "Identifier", + "src": "1993:3:0" + } + ], + "id": 129, + "name": "MemberAccess", + "src": "1993:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30783233623837326464", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 599290589", + "value": "0x23b872dd" + }, + "id": 130, + "name": "Literal", + "src": "2016:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 115, + "type": "address", + "value": "_from" + }, + "id": 131, + "name": "Identifier", + "src": "2047:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 117, + "type": "address", + "value": "_to" + }, + "id": 132, + "name": "Identifier", + "src": "2054:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 119, + "type": "uint256", + "value": "_amount" + }, + "id": 133, + "name": "Identifier", + "src": "2059:7:0" + } + ], + "id": 134, + "name": "FunctionCall", + "src": "1993:74:0" + } + ], + "id": 135, + "name": "FunctionCall", + "src": "1982:86:0" + } + ], + "id": 136, + "name": "VariableDeclarationStatement", + "src": "1946:122:0" + }, + { + "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_b31c8a8545ea674c554dd2f6bad7d7bd1dfe923a25150b76350dc6970bf3ff5c", + "typeString": "literal_string \"not enough allowed tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 137, + "name": "Identifier", + "src": "2074:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 138, + "name": "Identifier", + "src": "2082:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens\"", + "value": "not enough allowed tokens" + }, + "id": 139, + "name": "Literal", + "src": "2091:27:0" + } + ], + "id": 140, + "name": "FunctionCall", + "src": "2074:45:0" + } + ], + "id": 141, + "name": "ExpressionStatement", + "src": "2074:45:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 142, + "name": "Identifier", + "src": "2219:4:0" + } + ], + "id": 143, + "name": "MemberAccess", + "src": "2219:11: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": 144, + "name": "Literal", + "src": "2233:1:0" + } + ], + "id": 145, + "name": "BinaryOperation", + "src": "2219:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 146, + "name": "Identifier", + "src": "2244:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 147, + "name": "Identifier", + "src": "2252:4:0" + } + ], + "id": 148, + "name": "MemberAccess", + "src": "2252:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 149, + "name": "Literal", + "src": "2267:2:0" + } + ], + "id": 150, + "name": "BinaryOperation", + "src": "2252:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 151, + "name": "Literal", + "src": "2271:44:0" + } + ], + "id": 152, + "name": "FunctionCall", + "src": "2244:72:0" + } + ], + "id": 153, + "name": "ExpressionStatement", + "src": "2244:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 154, + "name": "Identifier", + "src": "2324:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 155, + "name": "Identifier", + "src": "2334:3:0" + } + ], + "id": 156, + "name": "MemberAccess", + "src": "2334:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 125, + "type": "bytes memory", + "value": "data" + }, + "id": 157, + "name": "Identifier", + "src": "2345:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 158, + "name": "ElementaryTypeNameExpression", + "src": "2352:4:0" + } + ], + "id": 159, + "name": "TupleExpression", + "src": "2351:6:0" + } + ], + "id": 160, + "name": "FunctionCall", + "src": "2334:24:0" + } + ], + "id": 161, + "name": "Assignment", + "src": "2324:34:0" + } + ], + "id": 162, + "name": "ExpressionStatement", + "src": "2324:34:0" + }, + { + "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_6cfae212a217874b58247660ff4d75d72aa825e8f2120480a7da09cf7efa221d", + "typeString": "literal_string \"not enough allowed tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 163, + "name": "Identifier", + "src": "2366:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 123, + "type": "bool", + "value": "success" + }, + "id": 164, + "name": "Identifier", + "src": "2374:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough allowed tokens. Token returns false.\"", + "value": "not enough allowed tokens. Token returns false." + }, + "id": 165, + "name": "Literal", + "src": "2383:49:0" + } + ], + "id": 166, + "name": "FunctionCall", + "src": "2366:67:0" + } + ], + "id": 167, + "name": "ExpressionStatement", + "src": "2366:67:0" + } + ], + "id": 168, + "name": "Block", + "src": "2236:204:0" + } + ], + "id": 169, + "name": "IfStatement", + "src": "2215:225:0" + } + ], + "id": 170, + "name": "Block", + "src": "1940:504:0" + } + ], + "id": 171, + "name": "FunctionDefinition", + "src": "1854:590:0" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_safeErc20Transfer", + "scope": 227, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 172, + "name": "ElementaryTypeName", + "src": "2476:7:0" + } + ], + "id": 173, + "name": "VariableDeclaration", + "src": "2476:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 226, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 174, + "name": "ElementaryTypeName", + "src": "2489:7:0" + } + ], + "id": 175, + "name": "VariableDeclaration", + "src": "2489:15:0" + } + ], + "id": 176, + "name": "ParameterList", + "src": "2475:30:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 177, + "name": "ParameterList", + "src": "2515:0:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 179, + 181 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 225, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 178, + "name": "ElementaryTypeName", + "src": "2522:4:0" + } + ], + "id": 179, + "name": "VariableDeclaration", + "src": "2522:12:0" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 225, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 180, + "name": "ElementaryTypeName", + "src": "2536:5:0" + } + ], + "id": 181, + "name": "VariableDeclaration", + "src": "2536:17:0" + }, + { + "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_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "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": 6, + "type": "address", + "value": "token" + }, + "id": 182, + "name": "Identifier", + "src": "2557:5:0" + } + ], + "id": 183, + "name": "MemberAccess", + "src": "2557:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2835717307_by_1", + "typeString": "int_const 2835717307" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encodeWithSelector", + "referencedDeclaration": null, + "type": "function (bytes4) pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 184, + "name": "Identifier", + "src": "2568:3:0" + } + ], + "id": 185, + "name": "MemberAccess", + "src": "2568:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30786139303539636262", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2835717307", + "value": "0xa9059cbb" + }, + "id": 186, + "name": "Literal", + "src": "2591:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 173, + "type": "address", + "value": "_to" + }, + "id": 187, + "name": "Identifier", + "src": "2618:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 175, + "type": "uint256", + "value": "_amount" + }, + "id": 188, + "name": "Identifier", + "src": "2623:7:0" + } + ], + "id": 189, + "name": "FunctionCall", + "src": "2568:63:0" + } + ], + "id": 190, + "name": "FunctionCall", + "src": "2557:75:0" + } + ], + "id": 191, + "name": "VariableDeclarationStatement", + "src": "2521:111:0" + }, + { + "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_73949bcdc07934e9395e82489bb22c4742e057960a2c090d38e53d68d3caf52a", + "typeString": "literal_string \"not enough tokens\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 192, + "name": "Identifier", + "src": "2638:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 193, + "name": "Identifier", + "src": "2646:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens\"", + "value": "not enough tokens" + }, + "id": 194, + "name": "Literal", + "src": "2655:19:0" + } + ], + "id": 195, + "name": "FunctionCall", + "src": "2638:37:0" + } + ], + "id": 196, + "name": "ExpressionStatement", + "src": "2638:37:0" + }, + { + "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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 197, + "name": "Identifier", + "src": "2775:4:0" + } + ], + "id": 198, + "name": "MemberAccess", + "src": "2775:11: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": 199, + "name": "Literal", + "src": "2789:1:0" + } + ], + "id": 200, + "name": "BinaryOperation", + "src": "2775:15:0" + }, + { + "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_22b4652a1c8fbdfc6305c7ee289e87caf6a45e5ae327ee8f67eb64ba36d62560", + "typeString": "literal_string \"data length should be either 0 or 32 bytes\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 201, + "name": "Identifier", + "src": "2800:7: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, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 202, + "name": "Identifier", + "src": "2808:4:0" + } + ], + "id": 203, + "name": "MemberAccess", + "src": "2808:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3332", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 32", + "value": "32" + }, + "id": 204, + "name": "Literal", + "src": "2823:2:0" + } + ], + "id": 205, + "name": "BinaryOperation", + "src": "2808:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "64617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"data length should be either 0 or 32 bytes\"", + "value": "data length should be either 0 or 32 bytes" + }, + "id": 206, + "name": "Literal", + "src": "2827:44:0" + } + ], + "id": 207, + "name": "FunctionCall", + "src": "2800:72:0" + } + ], + "id": 208, + "name": "ExpressionStatement", + "src": "2800:72:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 209, + "name": "Identifier", + "src": "2880:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "decode", + "referencedDeclaration": null, + "type": "function () pure" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3247, + "type": "abi", + "value": "abi" + }, + "id": 210, + "name": "Identifier", + "src": "2890:3:0" + } + ], + "id": 211, + "name": "MemberAccess", + "src": "2890:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 181, + "type": "bytes memory", + "value": "data" + }, + "id": 212, + "name": "Identifier", + "src": "2901:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bool)", + "value": "bool" + }, + "id": 213, + "name": "ElementaryTypeNameExpression", + "src": "2908:4:0" + } + ], + "id": 214, + "name": "TupleExpression", + "src": "2907:6:0" + } + ], + "id": 215, + "name": "FunctionCall", + "src": "2890:24:0" + } + ], + "id": 216, + "name": "Assignment", + "src": "2880:34:0" + } + ], + "id": 217, + "name": "ExpressionStatement", + "src": "2880:34:0" + }, + { + "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_38fa5aabf87e9f42de902eb4d9022484dde7943d80702b79ba468e9fc08f5e5e", + "typeString": "literal_string \"not enough tokens. Token returns false.\"" + } + ], + "overloadedDeclarations": [ + 3263, + 3264 + ], + "referencedDeclaration": 3264, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 218, + "name": "Identifier", + "src": "2922:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 179, + "type": "bool", + "value": "success" + }, + "id": 219, + "name": "Identifier", + "src": "2930:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "6e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"not enough tokens. Token returns false.\"", + "value": "not enough tokens. Token returns false." + }, + "id": 220, + "name": "Literal", + "src": "2939:41:0" + } + ], + "id": 221, + "name": "FunctionCall", + "src": "2922:59:0" + } + ], + "id": 222, + "name": "ExpressionStatement", + "src": "2922:59:0" + } + ], + "id": 223, + "name": "Block", + "src": "2792:196:0" + } + ], + "id": 224, + "name": "IfStatement", + "src": "2771:217:0" + } + ], + "id": 225, + "name": "Block", + "src": "2515:477:0" + } + ], + "id": 226, + "name": "FunctionDefinition", + "src": "2448:544:0" + } + ], + "id": 227, + "name": "ContractDefinition", + "src": "805:2189:0" + } + ], + "id": 228, + "name": "SourceUnit", + "src": "755:2240:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.17+commit.d19bba13.Emscripten.clang" + }, + "networks": { + "42220": { + "events": {}, + "links": { + "Hasher": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d" + }, + "address": "0xCB6b9b4b2D519c0ADdE2142Cc695464c39369aB4", + "transactionHash": "0x90f6681136c4aef91f242e3dd7783c161209192425f1da3ef2d21b84b3e74356" + } + }, + "schemaVersion": "3.3.4", + "updatedAt": "2021-03-22T01:57:01.643Z", + "networkType": "ethereum", + "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/ERC20Mock.json b/client/contracts/ERC20Mock.json index 90a6ad9..2a4ae5d 100644 --- a/client/contracts/ERC20Mock.json +++ b/client/contracts/ERC20Mock.json @@ -917,7 +917,7 @@ } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-03-21T05:52:09.448Z", + "updatedAt": "2021-03-22T01:57:01.678Z", "networkType": "ethereum", "devdoc": { "methods": { diff --git a/client/contracts/ERC20Tornado.json b/client/contracts/ERC20Tornado.json index 5d49eee..61a0a69 100644 --- a/client/contracts/ERC20Tornado.json +++ b/client/contracts/ERC20Tornado.json @@ -7167,17 +7167,17 @@ "version": "0.5.17+commit.d19bba13.Emscripten.clang" }, "networks": { - "44787": { + "42220": { "events": {}, "links": { - "Hasher": "0xd6ae2Af69ECb0A799a00c21e379e07f3bA185d6b" + "Hasher": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d" }, - "address": "0xe3B6F20620b5B9f537A47F61150a11C3761BFC6D", - "transactionHash": "0x18e73a10fef01cb840838f6928a9e17d06412f25ab3fcdd1ad077319850f513d" + "address": "0xCB6b9b4b2D519c0ADdE2142Cc695464c39369aB4", + "transactionHash": "0x90f6681136c4aef91f242e3dd7783c161209192425f1da3ef2d21b84b3e74356" } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-03-21T05:52:09.418Z", + "updatedAt": "2021-03-22T01:57:01.643Z", "networkType": "ethereum", "devdoc": { "methods": { diff --git a/client/contracts/ETHTornado.json b/client/contracts/ETHTornado.json index e6be617..486edce 100644 --- a/client/contracts/ETHTornado.json +++ b/client/contracts/ETHTornado.json @@ -3480,6 +3480,14 @@ "version": "0.5.17+commit.d19bba13.Emscripten.clang" }, "networks": { + "42220": { + "events": {}, + "links": { + "Hasher": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d" + }, + "address": "0xc1a3282e6A89b0823F92f2e8741df4eb3C7eFf43", + "transactionHash": "0x2d9b5eaa29a7f9c974ba281f3b59154f2d499f2ecadc1f66c6065ed2f22b050a" + }, "44787": { "events": {}, "links": { @@ -3490,7 +3498,7 @@ } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-03-21T02:00:19.690Z", + "updatedAt": "2021-03-22T01:39:56.574Z", "networkType": "ethereum", "devdoc": { "methods": { diff --git a/client/contracts/Hasher.json b/client/contracts/Hasher.json index ff05c37..d486dcd 100644 --- a/client/contracts/Hasher.json +++ b/client/contracts/Hasher.json @@ -37,6 +37,12 @@ "address": "0x0824C3Ed3bF48E5A0dB14c36a1fa44D68f0D79AC", "transactionHash": "0x543baf840d1c1b04c118d6cf9d5c8241de880469f32ceb3e36468780d85144f6" }, + "42220": { + "events": {}, + "links": {}, + "address": "0xD75035293f552aB5c33483f321DBf0DfA1C7c71d", + "transactionHash": "0x0f9102eb1cfa4f83630e72d2b0dcb9dec9285859895f39ca224e7500f6282689" + }, "44787": { "events": {}, "links": {}, @@ -45,6 +51,6 @@ } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-03-21T05:52:09.446Z", + "updatedAt": "2021-03-22T01:57:01.677Z", "networkType": "ethereum" } \ No newline at end of file diff --git a/client/contracts/Migrations.json b/client/contracts/Migrations.json index b02c509..46212d6 100644 --- a/client/contracts/Migrations.json +++ b/client/contracts/Migrations.json @@ -1480,7 +1480,7 @@ } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-03-21T05:52:09.449Z", + "updatedAt": "2021-03-22T01:57:01.680Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/client/contracts/Verifier.json b/client/contracts/Verifier.json index bd00455..89d944d 100644 --- a/client/contracts/Verifier.json +++ b/client/contracts/Verifier.json @@ -29910,6 +29910,12 @@ "address": "0xf1aA668d21Fe0560Af8d2B25047711FE70790B9d", "transactionHash": "0x102de7c370f34dcc2ceb6c9e5ccf3866b17c9dc4b4ee3fee103ceafd632c24a6" }, + "42220": { + "events": {}, + "links": {}, + "address": "0x955D048f90935495F4f720b198AC31C9F0c57669", + "transactionHash": "0x4c179445168a4339ecf7692039fc0d00704aeb523389c00cfafb386ab70c35a0" + }, "44787": { "events": {}, "links": {}, @@ -29918,7 +29924,7 @@ } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-03-21T05:52:09.433Z", + "updatedAt": "2021-03-22T01:57:01.659Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/truffle-config.js b/truffle-config.js index 341e081..fe483e5 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -10,7 +10,6 @@ const path = require('path') const web3 = new Web3(process.env.RPC_URL) const kit = ContractKit.newKitFromWeb3(web3) kit.addAccount(process.env.PRIVATE_KEY) -// const kit = Kit.newKit('https://forno.celo.org') // mainnet endpoint // const infuraKey = "fj4jll3k....."; //