mirror of
https://github.com/tornadocash/tornado-cli.git
synced 2024-11-25 11:18:29 +01:00
6991 lines
336 KiB
JSON
6991 lines
336 KiB
JSON
{
|
|
"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/rstorm/repos/stormdapps/tornado-core/contracts/ERC20Tornado.sol\":\"ERC20Tornado\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/rstorm/repos/stormdapps/tornado-core/contracts/ERC20Tornado.sol\":{\"keccak256\":\"0x708938fd083239d2e9cd17e457cf25a2150bb900082fad58af8b689f786aef9c\",\"urls\":[\"bzz-raw://f345afd62002f883c60c032cd0cb051663dc8a3e59a52bf44109633b96cb3685\",\"dweb:/ipfs/QmNwjnH2uyNoq9GPjNUv6Z1mgtiR5rY3K7EHY74RBjXMpw\"]},\"/Users/rstorm/repos/stormdapps/tornado-core/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x671cc9268dd70c47d18795f7e37fc4df11763fcbcca026edcf163f4239036254\",\"urls\":[\"bzz-raw://9c36a207ed164b60a514eae89bfb15e5b4de4b346c4a89a7a1cb50a940bc699d\",\"dweb:/ipfs/QmbPEqFJAGMpYduLEFsbPazyBsYWcjRtpth8X26wCHALwk\"]},\"/Users/rstorm/repos/stormdapps/tornado-core/contracts/Tornado.sol\":{\"keccak256\":\"0x09c70432243629ef44697fd3d0ca89d3578e2b1c9f46d90757371edb163c14da\",\"urls\":[\"bzz-raw://d2a2c9fa85c32cb15793282792cd25c71804a10aa5a911e41f3bcd07f5df117e\",\"dweb:/ipfs/QmeQ1s6ypNnP7fossR4x9svuuLjcSBtQ5spUTmWGZY5Ljr\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xe86fdc15fbc379ecf14d6aa4f51b87c0be8476e114e23c171b790a6717230655\",\"urls\":[\"bzz-raw://81905037f66d37ed211a4e3430af74f36e18b3a5d5b688e6d7d5ee199824a41a\",\"dweb:/ipfs/QmTcpgNKqLVRbcgNSUHazAbVf2bz5uh5mPkAijGeYW7Sqb\"]}},\"version\":1}",
|
|
"bytecode": "0x6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001cef38038062001cef833981810160405260a08110156200004757600080fd5b50805160208201516040830151606084015160809094015192939192909190848484848163ffffffff8116620000af5760405162461bcd60e51b815260040180806020018281038252602781526020018062001c666027913960400191505060405180910390fd5b60208163ffffffff1610620000f65760405162461bcd60e51b815260040180806020018281038252602281526020018062001cad6022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001c25833981519152909101819055815480830183559282905260008051602062001ccf8339815191529092018290555b60005463ffffffff9081169082161015620001e4576200019a82806001600160e01b036200029416565b60028054600181810190925560008051602062001c258339815191520182905580548082018255600082905260008051602062001ccf833981519152018290559092500162000170565b50620001fa81806001600160e01b036200029416565b6004555050600160685582620002425760405162461bcd60e51b815260040180806020018281038252602581526020018062001c006025913960400191505060405180910390fd5b606c80546001600160a01b039586166001600160a01b031991821617909155606d80549286169282169290921790915560699290925550606e8054939092169216919091179055506200048192505050565b600060008051602062001c8d8339815191528310620002fa576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001c8d8339815191528210620003495760405162461bcd60e51b815260040180806020018281038252602181526020018062001c456021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015620003a457600080fd5b505af4158015620003b9573d6000803e3d6000fd5b505050506040513d6040811015620003d057600080fd5b508051602090910151909250905060008051602062001c8d833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200044a57600080fd5b505af41580156200045f573d6000803e3d6000fd5b505050506040513d60408110156200047657600080fd5b505195945050505050565b61176f80620004916000396000f3fe60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b50610271610992565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109a1565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b82565b3480156102f057600080fd5b506102f9610b94565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610ba0565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610baf565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c22565b34801561038757600080fd5b506102bd610c37565b34801561039c57600080fd5b506102f9610c3d565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c49565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cb4565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d3c565b3480156104cc57600080fd5b506102bd610e5d565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e7d565b34801561050b57600080fd5b506102f9610e91565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610e96565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610eab565b34801561057457600080fd5b506102bd610ec9565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610eed565b3480156105b357600080fd5b50610271610efa565b3480156105c857600080fd5b506102f9610f09565b606d546001600160a01b0316331461061a5760405162461bcd60e51b81526004018080602001828103825260258152602001806117166025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60688054600101908190556069548311156106b3576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000868152606a602052604090205460ff1615610717576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61072087610baf565b610771576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c080820183528a8252602082018a90526001600160a01b038981168385015288811660608401526080830188905260a08301879052925163695ef6f960e01b8152929093169263695ef6f9928d928d9290916004810191829160240190849080838360005b838110156107f65781810151838201526020016107de565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561084857600080fd5b505af115801561085c573d6000803e3d6000fd5b505050506040513d602081101561087257600080fd5b50516108be576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000868152606a60205260409020805460ff191660011790556108e385858585610f1c565b604080516001600160a01b038781168252602082018990528183018690529151918616917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a26068548114610987576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b505050505050505050565b606c546001600160a01b031681565b60006000805160206116a58339815191528310610a05576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116a58339815191528210610a515760405162461bcd60e51b81526004018080602001828103825260218152602001806116556021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610aab57600080fd5b505af4158015610abf573d6000803e3d6000fd5b505050506040513d6040811015610ad557600080fd5b50805160209091015190925090506000805160206116a5833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b4d57600080fd5b505af4158015610b61573d6000803e3d6000fd5b505050506040513d6040811015610b7757600080fd5b505195945050505050565b6000805160206116a583398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bbe57506000610c1d565b60035463ffffffff165b60048163ffffffff1660648110610bdb57fe5b0154831415610bee576001915050610c1d565b63ffffffff8116610bfd575060645b6003546000199091019063ffffffff80831691161415610bc85760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c925760405162461bcd60e51b81526004018080602001828103825260258152602001806117166025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610ce0578160200160208202803883390190505b50905060005b82811015610d3557610d09848483818110610cfd57fe5b90506020020135610e96565b15610d2d576001828281518110610d1c57fe5b911515602092830291909101909101525b600101610ce6565b5092915050565b60688054600101908190556000828152606b602052604090205460ff1615610d955760405162461bcd60e51b81526004018080602001828103825260218152602001806116c56021913960400191505060405180910390fd5b6000610da083611017565b6000848152606b60205260409020805460ff191660011790559050610dc36111ae565b6040805163ffffffff83168152426020820152815185927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a2506068548114610e59576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60035460009060049063ffffffff1660648110610e7657fe5b0154905090565b60048160648110610e8a57fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610eb857fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610eb857fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f5a5760405162461bcd60e51b81526004018080602001828103825260308152602001806115fe6030913960400191505060405180910390fd5b610f688483606954036111fa565b8115610f7857610f7883836111fa565b8015611011576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fc9576040519150601f19603f3d011682016040523d82523d6000602084013e610fce565b606091505b505090508061100f576040516001600160a01b0385169083156108fc029084906000818181858888f1935050505015801561100d573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a168114156110745760405162461bcd60e51b815260040180806020018281038252602f8152602001806115a5602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561114c57600185166111085783925060028163ffffffff16815481106110d657fe5b906000526020600020015491508360018263ffffffff16815481106110f757fe5b60009182526020909120015561112c565b60018163ffffffff168154811061111b57fe5b906000526020600020015492508391505b61113683836109a1565b9350600263ffffffff86160494506001016110a4565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff90811692909217908190558491600491166064811061118e57fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156111eb5760405162461bcd60e51b81526004018080602001828103825260308152602001806116e66030913960400191505060405180910390fd5b6111f833306069546113c5565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b602083106112775780518252601f199092019160209182019101611258565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112d9576040519150601f19603f3d011682016040523d82523d6000602084013e6112de565b606091505b509150915081611329576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110115780516020146113705760405162461bcd60e51b815260040180806020018281038252602a8152602001806115d4602a913960400191505060405180910390fd5b80806020019051602081101561138557600080fd5b50519150816110115760405162461bcd60e51b815260040180806020018281038252602781526020018061162e6027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b6020831061144a5780518252601f19909201916020918201910161142b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114ac576040519150601f19603f3d011682016040523d82523d6000602084013e6114b1565b606091505b509150915081611508576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b80511561100f57805160201461154f5760405162461bcd60e51b815260040180806020018281038252602a8152602001806115d4602a913960400191505060405180910390fd5b80806020019051602081101561156457600080fd5b505191508161100f5760405162461bcd60e51b815260040180806020018281038252602f815260200180611676602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820e1c5144cb9686ce6e6ddfdff557eadc4214fbeb4f9a37da84c12c202331fe40364736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6",
|
|
"deployedBytecode": "0x60806040526004361061014b5760003560e01c806397fc007c116100b6578063e5285dcc1161006f578063e5285dcc14610514578063e82955881461053e578063ec73295914610568578063f178e47c1461057d578063fc0c546a146105a7578063fc7e9c6f146105bc5761014b565b806397fc007c146103a55780639fa12d0b146103d8578063b214faa5146104a3578063ba70f757146104c0578063c2b40ae4146104d5578063cd87a3b4146104ff5761014b565b80634ecf518b116101085780634ecf518b146102e4578063570ca735146103125780636d9833e314610327578063839df945146103515780638bca6d161461037b57806390eeb02b146103905761014b565b806306394c9b1461015057806317cc915c1461018557806321a0adb6146101c35780632b7ac3f31461025c57806338bf282e1461028d578063414a37ba146102cf575b600080fd5b34801561015c57600080fd5b506101836004803603602081101561017357600080fd5b50356001600160a01b03166105d1565b005b34801561019157600080fd5b506101af600480360360208110156101a857600080fd5b503561063c565b604080519115158252519081900360200190f35b610183600480360360e08110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460018302840111600160201b8311171561022657600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610651565b34801561026857600080fd5b50610271610992565b604080516001600160a01b039092168252519081900360200190f35b34801561029957600080fd5b506102bd600480360360408110156102b057600080fd5b50803590602001356109a1565b60408051918252519081900360200190f35b3480156102db57600080fd5b506102bd610b82565b3480156102f057600080fd5b506102f9610b94565b6040805163ffffffff9092168252519081900360200190f35b34801561031e57600080fd5b50610271610ba0565b34801561033357600080fd5b506101af6004803603602081101561034a57600080fd5b5035610baf565b34801561035d57600080fd5b506101af6004803603602081101561037457600080fd5b5035610c22565b34801561038757600080fd5b506102bd610c37565b34801561039c57600080fd5b506102f9610c3d565b3480156103b157600080fd5b50610183600480360360208110156103c857600080fd5b50356001600160a01b0316610c49565b3480156103e457600080fd5b50610453600480360360208110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b509092509050610cb4565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048f578181015183820152602001610477565b505050509050019250505060405180910390f35b610183600480360360208110156104b957600080fd5b5035610d3c565b3480156104cc57600080fd5b506102bd610e5d565b3480156104e157600080fd5b506102bd600480360360208110156104f857600080fd5b5035610e7d565b34801561050b57600080fd5b506102f9610e91565b34801561052057600080fd5b506101af6004803603602081101561053757600080fd5b5035610e96565b34801561054a57600080fd5b506102bd6004803603602081101561056157600080fd5b5035610eab565b34801561057457600080fd5b506102bd610ec9565b34801561058957600080fd5b506102bd600480360360208110156105a057600080fd5b5035610eed565b3480156105b357600080fd5b50610271610efa565b3480156105c857600080fd5b506102f9610f09565b606d546001600160a01b0316331461061a5760405162461bcd60e51b81526004018080602001828103825260258152602001806117166025913960400191505060405180910390fd5b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b606a6020526000908152604090205460ff1681565b60688054600101908190556069548311156106b3576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000868152606a602052604090205460ff1615610717576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61072087610baf565b610771576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c080820183528a8252602082018a90526001600160a01b038981168385015288811660608401526080830188905260a08301879052925163695ef6f960e01b8152929093169263695ef6f9928d928d9290916004810191829160240190849080838360005b838110156107f65781810151838201526020016107de565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561084857600080fd5b505af115801561085c573d6000803e3d6000fd5b505050506040513d602081101561087257600080fd5b50516108be576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000868152606a60205260409020805460ff191660011790556108e385858585610f1c565b604080516001600160a01b038781168252602082018990528183018690529151918616917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a26068548114610987576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b505050505050505050565b606c546001600160a01b031681565b60006000805160206116a58339815191528310610a05576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206116a58339815191528210610a515760405162461bcd60e51b81526004018080602001828103825260218152602001806116556021913960400191505060405180910390fd5b6040805163f47d33b560e01b81526004810185905260006024820181905282518693919273__Hasher________________________________9263f47d33b592604480840193829003018186803b158015610aab57600080fd5b505af4158015610abf573d6000803e3d6000fd5b505050506040513d6040811015610ad557600080fd5b50805160209091015190925090506000805160206116a5833981519152848308915073__Hasher________________________________63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b4d57600080fd5b505af4158015610b61573d6000803e3d6000fd5b505050506040513d6040811015610b7757600080fd5b505195945050505050565b6000805160206116a583398151915281565b60005463ffffffff1681565b606d546001600160a01b031681565b600081610bbe57506000610c1d565b60035463ffffffff165b60048163ffffffff1660648110610bdb57fe5b0154831415610bee576001915050610c1d565b63ffffffff8116610bfd575060645b6003546000199091019063ffffffff80831691161415610bc85760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b606d546001600160a01b03163314610c925760405162461bcd60e51b81526004018080602001828103825260258152602001806117166025913960400191505060405180910390fd5b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b604080518281526020808402820101909152606090828015610ce0578160200160208202803883390190505b50905060005b82811015610d3557610d09848483818110610cfd57fe5b90506020020135610e96565b15610d2d576001828281518110610d1c57fe5b911515602092830291909101909101525b600101610ce6565b5092915050565b60688054600101908190556000828152606b602052604090205460ff1615610d955760405162461bcd60e51b81526004018080602001828103825260218152602001806116c56021913960400191505060405180910390fd5b6000610da083611017565b6000848152606b60205260409020805460ff191660011790559050610dc36111ae565b6040805163ffffffff83168152426020820152815185927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a2506068548114610e59576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60035460009060049063ffffffff1660648110610e7657fe5b0154905090565b60048160648110610e8a57fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610eb857fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610eb857fe5b606e546001600160a01b031681565b600354600160201b900463ffffffff1681565b803414610f5a5760405162461bcd60e51b81526004018080602001828103825260308152602001806115fe6030913960400191505060405180910390fd5b610f688483606954036111fa565b8115610f7857610f7883836111fa565b8015611011576040516000906001600160a01b0386169083908381818185875af1925050503d8060008114610fc9576040519150601f19603f3d011682016040523d82523d6000602084013e610fce565b606091505b505090508061100f576040516001600160a01b0385169083156108fc029084906000818181858888f1935050505015801561100d573d6000803e3d6000fd5b505b505b50505050565b60035460008054909163ffffffff600160201b909104811691811660020a168114156110745760405162461bcd60e51b815260040180806020018281038252602f8152602001806115a5602f913960400191505060405180910390fd5b6003805463ffffffff600160201b80830482166001019091160267ffffffff000000001990911617905582600080805b60005463ffffffff908116908216101561114c57600185166111085783925060028163ffffffff16815481106110d657fe5b906000526020600020015491508360018263ffffffff16815481106110f757fe5b60009182526020909120015561112c565b60018163ffffffff168154811061111b57fe5b906000526020600020015492508391505b61113683836109a1565b9350600263ffffffff86160494506001016110a4565b5060035460649063ffffffff908116600101166003805463ffffffff19169290910663ffffffff90811692909217908190558491600491166064811061118e57fe5b01555050600354600160201b900463ffffffff1660001901949350505050565b34156111eb5760405162461bcd60e51b81526004018080602001828103825260308152602001806116e66030913960400191505060405180910390fd5b6111f833306069546113c5565b565b606e54604080516001600160a01b038581166024830152604480830186905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000956060959316939282918083835b602083106112775780518252601f199092019160209182019101611258565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112d9576040519150601f19603f3d011682016040523d82523d6000602084013e6112de565b606091505b509150915081611329576040805162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820746f6b656e7360781b604482015290519081900360640190fd5b8051156110115780516020146113705760405162461bcd60e51b815260040180806020018281038252602a8152602001806115d4602a913960400191505060405180910390fd5b80806020019051602081101561138557600080fd5b50519150816110115760405162461bcd60e51b815260040180806020018281038252602781526020018061162e6027913960400191505060405180910390fd5b606e54604080516001600160a01b0386811660248301528581166044830152606480830186905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b178152925182516000956060959316939282918083835b6020831061144a5780518252601f19909201916020918201910161142b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114ac576040519150601f19603f3d011682016040523d82523d6000602084013e6114b1565b606091505b509150915081611508576040805162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820616c6c6f77656420746f6b656e7300000000000000604482015290519081900360640190fd5b80511561100f57805160201461154f5760405162461bcd60e51b815260040180806020018281038252602a8152602001806115d4602a913960400191505060405180910390fd5b80806020019051602081101561156457600080fd5b505191508161100f5760405162461bcd60e51b815260040180806020018281038252602f815260200180611676602f913960400191505060405180910390fdfe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e20626520616464656464617461206c656e6774682073686f756c64206265206569746865722030206f72203332206279746573496e636f727265637420726566756e6420616d6f756e742072656365697665642062792074686520636f6e74726163746e6f7420656e6f75676820746f6b656e732e20546f6b656e2072657475726e732066616c73652e5f72696768742073686f756c6420626520696e7369646520746865206669656c646e6f7420656e6f75676820616c6c6f77656420746f6b656e732e20546f6b656e2072657475726e732066616c73652e30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465644554482076616c756520697320737570706f73656420746f206265203020666f7220455243323020696e7374616e63654f6e6c79206f70657261746f722063616e2063616c6c20746869732066756e6374696f6e2ea265627a7a72315820e1c5144cb9686ce6e6ddfdff557eadc4214fbeb4f9a37da84c12c202331fe40364736f6c63430005110032",
|
|
"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;:50;-1:-1:-1;;879:1:18;863:13;:17;2260::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::-;1296:13:18;:18;;1313:1;1296: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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1405:13:18;;1389:12;:29;1381:73;;;;;-1:-1:-1;;;1381:73:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;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::-;1296:13:18;:18;;1313:1;1296:18;;;;;:13;2741:24:8;;;:11;:24;;;;;;;;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;;;;;;;;1370:1:18;1405:13;;1389:12;:29;1381:73;;;;;-1:-1:-1;;;1381:73: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/rstorm/repos/stormdapps/tornado-core/contracts/ERC20Tornado.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/rstorm/repos/stormdapps/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/rstorm/repos/stormdapps/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,
|
|
2931
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 227,
|
|
"linearizedBaseContracts": [
|
|
227,
|
|
1194,
|
|
2931,
|
|
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": 2946,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2946,
|
|
"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": 2970,
|
|
"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": 2946,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2933,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2933,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2933,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2933,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": {
|
|
"absolutePath": "/Users/rstorm/repos/stormdapps/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/rstorm/repos/stormdapps/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,
|
|
2931
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 227,
|
|
"linearizedBaseContracts": [
|
|
227,
|
|
1194,
|
|
2931,
|
|
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": 2946,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2946,
|
|
"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": 2970,
|
|
"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": 2946,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2933,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2933,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2933,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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": 2933,
|
|
"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": [
|
|
2949,
|
|
2950
|
|
],
|
|
"referencedDeclaration": 2950,
|
|
"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"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.5.17+commit.d19bba13.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.0.18",
|
|
"updatedAt": "2020-05-21T19:03:54.134Z",
|
|
"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": {}
|
|
}
|
|
} |