5692 lines
226 KiB
JSON
5692 lines
226 KiB
JSON
{
|
|
"contractName": "IVerifier",
|
|
"abi": [
|
|
{
|
|
"constant": false,
|
|
"inputs": [
|
|
{
|
|
"name": "a",
|
|
"type": "uint256[2]"
|
|
},
|
|
{
|
|
"name": "b",
|
|
"type": "uint256[2][2]"
|
|
},
|
|
{
|
|
"name": "c",
|
|
"type": "uint256[2]"
|
|
},
|
|
{
|
|
"name": "input",
|
|
"type": "uint256[4]"
|
|
}
|
|
],
|
|
"name": "verify",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"a\",\"type\":\"uint256[2]\"},{\"name\":\"b\",\"type\":\"uint256[2][2]\"},{\"name\":\"c\",\"type\":\"uint256[2]\"},{\"name\":\"input\",\"type\":\"uint256[4]\"}],\"name\":\"verify\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/poma/dev/mixer/contracts/contracts/Mixer.sol\":\"IVerifier\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/poma/dev/mixer/contracts/contracts/MerkleTreeWithHistory.sol\":{\"keccak256\":\"0x642b31dbef7c34b66cd911042cfc6d5a6821cbf631e87c8b8a9fc4f7a2db7280\",\"urls\":[\"bzzr://0b616b34d1ca9c10f095eb402edc09f3f9d6cc1e4ec37da29f67c2c86d2f964a\"]},\"/Users/poma/dev/mixer/contracts/contracts/Mixer.sol\":{\"keccak256\":\"0xf7fa5b07896d32af414cd93b23031f766d9491526456fa1e316b479f239e63e9\",\"urls\":[\"bzzr://407758b01a03c7795de7160b22c8453db22d483a3e52e8f11b1f24f7a3ad28a0\"]},\"/Users/poma/dev/mixer/contracts/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]}},\"version\":1}",
|
|
"bytecode": "0x",
|
|
"deployedBytecode": "0x",
|
|
"sourceMap": "",
|
|
"deployedSourceMap": "",
|
|
"source": "pragma solidity ^0.5.8;\n\nimport \"./MerkleTreeWithHistory.sol\";\nimport \"../node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\";\n\ncontract IVerifier {\n function verify(uint256[2] memory a, uint256[2][2] memory b, uint256[2] memory c, uint256[4] memory input) public returns(bool);\n}\n\ncontract Mixer is MerkleTreeWithHistory {\n using SafeMath for uint256;\n\n uint256 public transferValue;\n mapping(uint256 => bool) public nullifiers;\n IVerifier verifier;\n\n event Deposit(address from, uint256 commitment);\n event Withdraw(address to, uint256 nullifier, uint256 fee);\n\n constructor(address _verifier, uint256 _transferValue) public {\n verifier = IVerifier(_verifier);\n transferValue = _transferValue;\n }\n\n function deposit(uint256 commitment) public payable {\n require(msg.value == transferValue, \"Please send `transferValue` funds alone with transaction\");\n insert(commitment);\n emit Deposit(msg.sender, commitment);\n }\n\n function withdraw(uint256[2] memory a, uint256[2][2] memory b, uint256[2] memory c, uint256[4] memory input) public {\n address payable receiver = address(input[0]);\n uint256 nullifier = input[1];\n uint256 fee = input[2];\n uint256 root = input[3];\n\n require(fee < transferValue, \"Fee exceeds transfer value\");\n require(!nullifiers[nullifier], \"The note has been already spent\");\n require(isKnownRoot(root), \"Cannot find your merkle root\"); // Make sure to use a recent one\n require(verifier.verify(a, b, c, input), \"Invalid withdraw proof\");\n\n nullifiers[nullifier] = true;\n receiver.transfer(transferValue - fee);\n if (fee > 0) {\n msg.sender.transfer(fee);\n }\n emit Withdraw(receiver, nullifier, fee);\n }\n}",
|
|
"sourcePath": "/Users/poma/dev/mixer/contracts/contracts/Mixer.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/poma/dev/mixer/contracts/contracts/Mixer.sol",
|
|
"exportedSymbols": {
|
|
"IVerifier": [
|
|
458
|
|
],
|
|
"Mixer": [
|
|
642
|
|
]
|
|
},
|
|
"id": 643,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 432,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.5",
|
|
".8"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:2"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/poma/dev/mixer/contracts/contracts/MerkleTreeWithHistory.sol",
|
|
"file": "./MerkleTreeWithHistory.sol",
|
|
"id": 433,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 643,
|
|
"sourceUnit": 374,
|
|
"src": "25:37:2",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/poma/dev/mixer/contracts/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol",
|
|
"file": "../node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol",
|
|
"id": 434,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 643,
|
|
"sourceUnit": 776,
|
|
"src": "63:75:2",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 458,
|
|
"linearizedBaseContracts": [
|
|
458
|
|
],
|
|
"name": "IVerifier",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"id": 457,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "verify",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 453,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 438,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "179:19:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 435,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "179:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 437,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 436,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "187:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "179:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 444,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "200:22:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr",
|
|
"typeString": "uint256[2][2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"baseType": {
|
|
"id": 439,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "200:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 441,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 440,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "208:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "200:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"id": 443,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 442,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "211:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "200:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_storage_$2_storage_ptr",
|
|
"typeString": "uint256[2][2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 448,
|
|
"name": "c",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "224:19:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 445,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "224:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 447,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 446,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "232:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "224:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 452,
|
|
"name": "input",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "245:23:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 449,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "245:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 451,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "34",
|
|
"id": 450,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "253:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "245:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_storage_ptr",
|
|
"typeString": "uint256[4]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "178:91:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 456,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 455,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "285:4:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 454,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "285:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "284:6:2"
|
|
},
|
|
"scope": 458,
|
|
"src": "163:128:2",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 643,
|
|
"src": "140:153:2"
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 459,
|
|
"name": "MerkleTreeWithHistory",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 373,
|
|
"src": "313:21:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_MerkleTreeWithHistory_$373",
|
|
"typeString": "contract MerkleTreeWithHistory"
|
|
}
|
|
},
|
|
"id": 460,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "313:21:2"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
373
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 642,
|
|
"linearizedBaseContracts": [
|
|
642,
|
|
373
|
|
],
|
|
"name": "Mixer",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 463,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 461,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 775,
|
|
"src": "345:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$775",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "339:27:2",
|
|
"typeName": {
|
|
"id": 462,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "358:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 465,
|
|
"name": "transferValue",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 642,
|
|
"src": "370:28:2",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 464,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "370:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 469,
|
|
"name": "nullifiers",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 642,
|
|
"src": "402:42:2",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$",
|
|
"typeString": "mapping(uint256 => bool)"
|
|
},
|
|
"typeName": {
|
|
"id": 468,
|
|
"keyType": {
|
|
"id": 466,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "410:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "402:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$",
|
|
"typeString": "mapping(uint256 => bool)"
|
|
},
|
|
"valueType": {
|
|
"id": 467,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "421:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 471,
|
|
"name": "verifier",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 642,
|
|
"src": "448:18:2",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 470,
|
|
"name": "IVerifier",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 458,
|
|
"src": "448:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 477,
|
|
"name": "Deposit",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 476,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 473,
|
|
"indexed": false,
|
|
"name": "from",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 477,
|
|
"src": "485:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 472,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "485:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 475,
|
|
"indexed": false,
|
|
"name": "commitment",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 477,
|
|
"src": "499:18:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 474,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "499:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "484:34:2"
|
|
},
|
|
"src": "471:48:2"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 485,
|
|
"name": "Withdraw",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 484,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 479,
|
|
"indexed": false,
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "537:10:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 478,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "537:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 481,
|
|
"indexed": false,
|
|
"name": "nullifier",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "549:17:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 480,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "549:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 483,
|
|
"indexed": false,
|
|
"name": "fee",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "568:11:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 482,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "568:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "536:44:2"
|
|
},
|
|
"src": "522:59:2"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 502,
|
|
"nodeType": "Block",
|
|
"src": "647:78:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 496,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 492,
|
|
"name": "verifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 471,
|
|
"src": "653:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 494,
|
|
"name": "_verifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 487,
|
|
"src": "674:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 493,
|
|
"name": "IVerifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 458,
|
|
"src": "664:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IVerifier_$458_$",
|
|
"typeString": "type(contract IVerifier)"
|
|
}
|
|
},
|
|
"id": 495,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "664:20:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"src": "653:31:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"id": 497,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "653:31:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 500,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 498,
|
|
"name": "transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 465,
|
|
"src": "690:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 499,
|
|
"name": "_transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 489,
|
|
"src": "706:14:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "690:30:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 501,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "690:30:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 503,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 490,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 487,
|
|
"name": "_verifier",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 503,
|
|
"src": "597:17:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 486,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "597:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 489,
|
|
"name": "_transferValue",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 503,
|
|
"src": "616:22:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 488,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "616:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "596:43:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 491,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "647:0:2"
|
|
},
|
|
"scope": 642,
|
|
"src": "585:140:2",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 526,
|
|
"nodeType": "Block",
|
|
"src": "781:172:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 512,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 509,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 790,
|
|
"src": "795:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 510,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "795:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 511,
|
|
"name": "transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 465,
|
|
"src": "808:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "795:26:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "506c656173652073656e6420607472616e7366657256616c7565602066756e647320616c6f6e652077697468207472616e73616374696f6e",
|
|
"id": 513,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "823:58:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_30309aa06eb27a30f0f30e53c4b574d416938a818a214b58fc4b0c136c70d5bd",
|
|
"typeString": "literal_string \"Please send `transferValue` funds alone with transaction\""
|
|
},
|
|
"value": "Please send `transferValue` funds alone with transaction"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_30309aa06eb27a30f0f30e53c4b574d416938a818a214b58fc4b0c136c70d5bd",
|
|
"typeString": "literal_string \"Please send `transferValue` funds alone with transaction\""
|
|
}
|
|
],
|
|
"id": 508,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "787:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 514,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "787:95:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 515,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "787:95:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 517,
|
|
"name": "commitment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 505,
|
|
"src": "895:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 516,
|
|
"name": "insert",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 298,
|
|
"src": "888:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 518,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "888:18:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 519,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "888:18:2"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 521,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 790,
|
|
"src": "925:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 522,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "925:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 523,
|
|
"name": "commitment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 505,
|
|
"src": "937:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 520,
|
|
"name": "Deposit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 477,
|
|
"src": "917:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 524,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "917:31:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 525,
|
|
"nodeType": "EmitStatement",
|
|
"src": "912:36:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 527,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "deposit",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 506,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 505,
|
|
"name": "commitment",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 527,
|
|
"src": "746:18:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 504,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "746:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "745:20:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 507,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "781:0:2"
|
|
},
|
|
"scope": 642,
|
|
"src": "729:224:2",
|
|
"stateMutability": "payable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 640,
|
|
"nodeType": "Block",
|
|
"src": "1073:633:2",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
549
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 549,
|
|
"name": "receiver",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 640,
|
|
"src": "1079:24:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 548,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1079:15:2",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 555,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 551,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1114:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
},
|
|
"id": 553,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 552,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1120:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1114:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 550,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1106:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 554,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1106:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1079:44:2"
|
|
},
|
|
{
|
|
"assignments": [
|
|
557
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 557,
|
|
"name": "nullifier",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 640,
|
|
"src": "1129:17:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 556,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1129:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 561,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 558,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1149:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
},
|
|
"id": 560,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 559,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1155:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1149:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1129:28:2"
|
|
},
|
|
{
|
|
"assignments": [
|
|
563
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 563,
|
|
"name": "fee",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 640,
|
|
"src": "1163:11:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 562,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1163:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 567,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 564,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1177:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
},
|
|
"id": 566,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 565,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1183:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1177:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1163:22:2"
|
|
},
|
|
{
|
|
"assignments": [
|
|
569
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 569,
|
|
"name": "root",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 640,
|
|
"src": "1191:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 568,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1191:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 573,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 570,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1206:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
},
|
|
"id": 572,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "33",
|
|
"id": 571,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1212:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_3_by_1",
|
|
"typeString": "int_const 3"
|
|
},
|
|
"value": "3"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1206:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1191:23:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 577,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 575,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1229:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 576,
|
|
"name": "transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 465,
|
|
"src": "1235:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1229:19:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4665652065786365656473207472616e736665722076616c7565",
|
|
"id": 578,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1250:28:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_2ce218df547d416f80ea8a5deadaf9453d23523ffa5f2e880a48adfdb4053a9c",
|
|
"typeString": "literal_string \"Fee exceeds transfer value\""
|
|
},
|
|
"value": "Fee exceeds transfer value"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_2ce218df547d416f80ea8a5deadaf9453d23523ffa5f2e880a48adfdb4053a9c",
|
|
"typeString": "literal_string \"Fee exceeds transfer value\""
|
|
}
|
|
],
|
|
"id": 574,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "1221:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 579,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1221:58:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 580,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1221:58:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 585,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "!",
|
|
"prefix": true,
|
|
"src": "1293:22:2",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 582,
|
|
"name": "nullifiers",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 469,
|
|
"src": "1294:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$",
|
|
"typeString": "mapping(uint256 => bool)"
|
|
}
|
|
},
|
|
"id": 584,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 583,
|
|
"name": "nullifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 557,
|
|
"src": "1305:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1294:21:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "546865206e6f746520686173206265656e20616c7265616479207370656e74",
|
|
"id": 586,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1317:33:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a1bef92d7a18b1c6975dc8de68df6140a52afea05a2c6c91da2b1562c617e896",
|
|
"typeString": "literal_string \"The note has been already spent\""
|
|
},
|
|
"value": "The note has been already spent"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_a1bef92d7a18b1c6975dc8de68df6140a52afea05a2c6c91da2b1562c617e896",
|
|
"typeString": "literal_string \"The note has been already spent\""
|
|
}
|
|
],
|
|
"id": 581,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "1285:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 587,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1285:66:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 588,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1285:66:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 591,
|
|
"name": "root",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 569,
|
|
"src": "1377:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 590,
|
|
"name": "isKnownRoot",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 362,
|
|
"src": "1365:11:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (uint256) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 592,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1365:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f74",
|
|
"id": 593,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1384:30:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_2a69086763073955418d2fd7dfee3d2f1fbc5b21047a216b7855d3f313d8e204",
|
|
"typeString": "literal_string \"Cannot find your merkle root\""
|
|
},
|
|
"value": "Cannot find your merkle root"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_2a69086763073955418d2fd7dfee3d2f1fbc5b21047a216b7855d3f313d8e204",
|
|
"typeString": "literal_string \"Cannot find your merkle root\""
|
|
}
|
|
],
|
|
"id": 589,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "1357:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 594,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1357:58:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 595,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1357:58:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 599,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 531,
|
|
"src": "1478:1:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 600,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 537,
|
|
"src": "1481:1:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory[2] memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 601,
|
|
"name": "c",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 541,
|
|
"src": "1484:1:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 602,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1487:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory[2] memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 597,
|
|
"name": "verifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 471,
|
|
"src": "1462:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"id": 598,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "verify",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 457,
|
|
"src": "1462:15:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_array$_t_uint256_$2_memory_ptr_$_t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr_$_t_array$_t_uint256_$2_memory_ptr_$_t_array$_t_uint256_$4_memory_ptr_$returns$_t_bool_$",
|
|
"typeString": "function (uint256[2] memory,uint256[2] memory[2] memory,uint256[2] memory,uint256[4] memory) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 603,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1462:31:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "496e76616c69642077697468647261772070726f6f66",
|
|
"id": 604,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1495:24:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_7021ea58137dba96e572e94936410b0b0e4cbc344e1ab2ee7f47660768b81ff4",
|
|
"typeString": "literal_string \"Invalid withdraw proof\""
|
|
},
|
|
"value": "Invalid withdraw proof"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_7021ea58137dba96e572e94936410b0b0e4cbc344e1ab2ee7f47660768b81ff4",
|
|
"typeString": "literal_string \"Invalid withdraw proof\""
|
|
}
|
|
],
|
|
"id": 596,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "1454:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 605,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1454:66:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 606,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1454:66:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 611,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 607,
|
|
"name": "nullifiers",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 469,
|
|
"src": "1527:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$",
|
|
"typeString": "mapping(uint256 => bool)"
|
|
}
|
|
},
|
|
"id": 609,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 608,
|
|
"name": "nullifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 557,
|
|
"src": "1538:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1527:21:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 610,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1551:4:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"src": "1527:28:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 612,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1527:28:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 618,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 616,
|
|
"name": "transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 465,
|
|
"src": "1579:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 617,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1595:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1579:19:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 613,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "1561:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 615,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1561:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 619,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1561:38:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 620,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1561:38:2"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 623,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 621,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1609:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 622,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1615:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1609:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 633,
|
|
"nodeType": "IfStatement",
|
|
"src": "1605:52:2",
|
|
"trueBody": {
|
|
"id": 632,
|
|
"nodeType": "Block",
|
|
"src": "1618:39:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 629,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1646:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 624,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 790,
|
|
"src": "1626:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 627,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1626:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 628,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1626:19:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 630,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1626:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 631,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1626:24:2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 635,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "1676:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 636,
|
|
"name": "nullifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 557,
|
|
"src": "1686:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 637,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1697:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 634,
|
|
"name": "Withdraw",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 485,
|
|
"src": "1667:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 638,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1667:34:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 639,
|
|
"nodeType": "EmitStatement",
|
|
"src": "1662:39:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 641,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "withdraw",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 546,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 531,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 641,
|
|
"src": "975:19:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 528,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "975:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 530,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 529,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "983:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "975:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 537,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 641,
|
|
"src": "996:22:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr",
|
|
"typeString": "uint256[2][2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"baseType": {
|
|
"id": 532,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "996:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 534,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 533,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1004:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "996:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"id": 536,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 535,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1007:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "996:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_storage_$2_storage_ptr",
|
|
"typeString": "uint256[2][2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 541,
|
|
"name": "c",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 641,
|
|
"src": "1020:19:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 538,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1020:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 540,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 539,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1028:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "1020:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 545,
|
|
"name": "input",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 641,
|
|
"src": "1041:23:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 542,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1041:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 544,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "34",
|
|
"id": 543,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1049:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "1041:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_storage_ptr",
|
|
"typeString": "uint256[4]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "974:91:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 547,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1073:0:2"
|
|
},
|
|
"scope": 642,
|
|
"src": "957:749:2",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 643,
|
|
"src": "295:1413:2"
|
|
}
|
|
],
|
|
"src": "0:1708:2"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/poma/dev/mixer/contracts/contracts/Mixer.sol",
|
|
"exportedSymbols": {
|
|
"IVerifier": [
|
|
458
|
|
],
|
|
"Mixer": [
|
|
642
|
|
]
|
|
},
|
|
"id": 643,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 432,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.5",
|
|
".8"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:2"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/poma/dev/mixer/contracts/contracts/MerkleTreeWithHistory.sol",
|
|
"file": "./MerkleTreeWithHistory.sol",
|
|
"id": 433,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 643,
|
|
"sourceUnit": 374,
|
|
"src": "25:37:2",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/poma/dev/mixer/contracts/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol",
|
|
"file": "../node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol",
|
|
"id": 434,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 643,
|
|
"sourceUnit": 776,
|
|
"src": "63:75:2",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 458,
|
|
"linearizedBaseContracts": [
|
|
458
|
|
],
|
|
"name": "IVerifier",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"id": 457,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "verify",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 453,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 438,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "179:19:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 435,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "179:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 437,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 436,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "187:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "179:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 444,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "200:22:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr",
|
|
"typeString": "uint256[2][2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"baseType": {
|
|
"id": 439,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "200:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 441,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 440,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "208:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "200:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"id": 443,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 442,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "211:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "200:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_storage_$2_storage_ptr",
|
|
"typeString": "uint256[2][2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 448,
|
|
"name": "c",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "224:19:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 445,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "224:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 447,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 446,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "232:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "224:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 452,
|
|
"name": "input",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "245:23:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 449,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "245:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 451,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "34",
|
|
"id": 450,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "253:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "245:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_storage_ptr",
|
|
"typeString": "uint256[4]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "178:91:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 456,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 455,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 457,
|
|
"src": "285:4:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 454,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "285:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "284:6:2"
|
|
},
|
|
"scope": 458,
|
|
"src": "163:128:2",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 643,
|
|
"src": "140:153:2"
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 459,
|
|
"name": "MerkleTreeWithHistory",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 373,
|
|
"src": "313:21:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_MerkleTreeWithHistory_$373",
|
|
"typeString": "contract MerkleTreeWithHistory"
|
|
}
|
|
},
|
|
"id": 460,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "313:21:2"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
373
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 642,
|
|
"linearizedBaseContracts": [
|
|
642,
|
|
373
|
|
],
|
|
"name": "Mixer",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 463,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 461,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 775,
|
|
"src": "345:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$775",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "339:27:2",
|
|
"typeName": {
|
|
"id": 462,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "358:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 465,
|
|
"name": "transferValue",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 642,
|
|
"src": "370:28:2",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 464,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "370:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 469,
|
|
"name": "nullifiers",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 642,
|
|
"src": "402:42:2",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$",
|
|
"typeString": "mapping(uint256 => bool)"
|
|
},
|
|
"typeName": {
|
|
"id": 468,
|
|
"keyType": {
|
|
"id": 466,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "410:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "402:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$",
|
|
"typeString": "mapping(uint256 => bool)"
|
|
},
|
|
"valueType": {
|
|
"id": 467,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "421:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 471,
|
|
"name": "verifier",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 642,
|
|
"src": "448:18:2",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 470,
|
|
"name": "IVerifier",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 458,
|
|
"src": "448:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 477,
|
|
"name": "Deposit",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 476,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 473,
|
|
"indexed": false,
|
|
"name": "from",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 477,
|
|
"src": "485:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 472,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "485:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 475,
|
|
"indexed": false,
|
|
"name": "commitment",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 477,
|
|
"src": "499:18:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 474,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "499:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "484:34:2"
|
|
},
|
|
"src": "471:48:2"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 485,
|
|
"name": "Withdraw",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 484,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 479,
|
|
"indexed": false,
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "537:10:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 478,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "537:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 481,
|
|
"indexed": false,
|
|
"name": "nullifier",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "549:17:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 480,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "549:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 483,
|
|
"indexed": false,
|
|
"name": "fee",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "568:11:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 482,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "568:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "536:44:2"
|
|
},
|
|
"src": "522:59:2"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 502,
|
|
"nodeType": "Block",
|
|
"src": "647:78:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 496,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 492,
|
|
"name": "verifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 471,
|
|
"src": "653:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 494,
|
|
"name": "_verifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 487,
|
|
"src": "674:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 493,
|
|
"name": "IVerifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 458,
|
|
"src": "664:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IVerifier_$458_$",
|
|
"typeString": "type(contract IVerifier)"
|
|
}
|
|
},
|
|
"id": 495,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "664:20:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"src": "653:31:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"id": 497,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "653:31:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 500,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 498,
|
|
"name": "transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 465,
|
|
"src": "690:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 499,
|
|
"name": "_transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 489,
|
|
"src": "706:14:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "690:30:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 501,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "690:30:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 503,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 490,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 487,
|
|
"name": "_verifier",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 503,
|
|
"src": "597:17:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 486,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "597:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 489,
|
|
"name": "_transferValue",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 503,
|
|
"src": "616:22:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 488,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "616:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "596:43:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 491,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "647:0:2"
|
|
},
|
|
"scope": 642,
|
|
"src": "585:140:2",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 526,
|
|
"nodeType": "Block",
|
|
"src": "781:172:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 512,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 509,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 790,
|
|
"src": "795:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 510,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "795:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 511,
|
|
"name": "transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 465,
|
|
"src": "808:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "795:26:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "506c656173652073656e6420607472616e7366657256616c7565602066756e647320616c6f6e652077697468207472616e73616374696f6e",
|
|
"id": 513,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "823:58:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_30309aa06eb27a30f0f30e53c4b574d416938a818a214b58fc4b0c136c70d5bd",
|
|
"typeString": "literal_string \"Please send `transferValue` funds alone with transaction\""
|
|
},
|
|
"value": "Please send `transferValue` funds alone with transaction"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_30309aa06eb27a30f0f30e53c4b574d416938a818a214b58fc4b0c136c70d5bd",
|
|
"typeString": "literal_string \"Please send `transferValue` funds alone with transaction\""
|
|
}
|
|
],
|
|
"id": 508,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "787:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 514,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "787:95:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 515,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "787:95:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 517,
|
|
"name": "commitment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 505,
|
|
"src": "895:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 516,
|
|
"name": "insert",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 298,
|
|
"src": "888:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 518,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "888:18:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 519,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "888:18:2"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 521,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 790,
|
|
"src": "925:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 522,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "925:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 523,
|
|
"name": "commitment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 505,
|
|
"src": "937:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 520,
|
|
"name": "Deposit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 477,
|
|
"src": "917:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 524,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "917:31:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 525,
|
|
"nodeType": "EmitStatement",
|
|
"src": "912:36:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 527,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "deposit",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 506,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 505,
|
|
"name": "commitment",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 527,
|
|
"src": "746:18:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 504,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "746:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "745:20:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 507,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "781:0:2"
|
|
},
|
|
"scope": 642,
|
|
"src": "729:224:2",
|
|
"stateMutability": "payable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 640,
|
|
"nodeType": "Block",
|
|
"src": "1073:633:2",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
549
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 549,
|
|
"name": "receiver",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 640,
|
|
"src": "1079:24:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 548,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1079:15:2",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 555,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 551,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1114:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
},
|
|
"id": 553,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 552,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1120:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1114:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 550,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1106:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 554,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1106:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1079:44:2"
|
|
},
|
|
{
|
|
"assignments": [
|
|
557
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 557,
|
|
"name": "nullifier",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 640,
|
|
"src": "1129:17:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 556,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1129:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 561,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 558,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1149:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
},
|
|
"id": 560,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 559,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1155:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1149:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1129:28:2"
|
|
},
|
|
{
|
|
"assignments": [
|
|
563
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 563,
|
|
"name": "fee",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 640,
|
|
"src": "1163:11:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 562,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1163:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 567,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 564,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1177:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
},
|
|
"id": 566,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 565,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1183:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1177:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1163:22:2"
|
|
},
|
|
{
|
|
"assignments": [
|
|
569
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 569,
|
|
"name": "root",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 640,
|
|
"src": "1191:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 568,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1191:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 573,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 570,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1206:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
},
|
|
"id": 572,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "33",
|
|
"id": 571,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1212:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_3_by_1",
|
|
"typeString": "int_const 3"
|
|
},
|
|
"value": "3"
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1206:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1191:23:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 577,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 575,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1229:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 576,
|
|
"name": "transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 465,
|
|
"src": "1235:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1229:19:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4665652065786365656473207472616e736665722076616c7565",
|
|
"id": 578,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1250:28:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_2ce218df547d416f80ea8a5deadaf9453d23523ffa5f2e880a48adfdb4053a9c",
|
|
"typeString": "literal_string \"Fee exceeds transfer value\""
|
|
},
|
|
"value": "Fee exceeds transfer value"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_2ce218df547d416f80ea8a5deadaf9453d23523ffa5f2e880a48adfdb4053a9c",
|
|
"typeString": "literal_string \"Fee exceeds transfer value\""
|
|
}
|
|
],
|
|
"id": 574,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "1221:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 579,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1221:58:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 580,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1221:58:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 585,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "!",
|
|
"prefix": true,
|
|
"src": "1293:22:2",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 582,
|
|
"name": "nullifiers",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 469,
|
|
"src": "1294:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$",
|
|
"typeString": "mapping(uint256 => bool)"
|
|
}
|
|
},
|
|
"id": 584,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 583,
|
|
"name": "nullifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 557,
|
|
"src": "1305:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1294:21:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "546865206e6f746520686173206265656e20616c7265616479207370656e74",
|
|
"id": 586,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1317:33:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a1bef92d7a18b1c6975dc8de68df6140a52afea05a2c6c91da2b1562c617e896",
|
|
"typeString": "literal_string \"The note has been already spent\""
|
|
},
|
|
"value": "The note has been already spent"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_a1bef92d7a18b1c6975dc8de68df6140a52afea05a2c6c91da2b1562c617e896",
|
|
"typeString": "literal_string \"The note has been already spent\""
|
|
}
|
|
],
|
|
"id": 581,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "1285:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 587,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1285:66:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 588,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1285:66:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 591,
|
|
"name": "root",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 569,
|
|
"src": "1377:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 590,
|
|
"name": "isKnownRoot",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 362,
|
|
"src": "1365:11:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (uint256) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 592,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1365:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f74",
|
|
"id": 593,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1384:30:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_2a69086763073955418d2fd7dfee3d2f1fbc5b21047a216b7855d3f313d8e204",
|
|
"typeString": "literal_string \"Cannot find your merkle root\""
|
|
},
|
|
"value": "Cannot find your merkle root"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_2a69086763073955418d2fd7dfee3d2f1fbc5b21047a216b7855d3f313d8e204",
|
|
"typeString": "literal_string \"Cannot find your merkle root\""
|
|
}
|
|
],
|
|
"id": 589,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "1357:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 594,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1357:58:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 595,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1357:58:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 599,
|
|
"name": "a",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 531,
|
|
"src": "1478:1:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 600,
|
|
"name": "b",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 537,
|
|
"src": "1481:1:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory[2] memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 601,
|
|
"name": "c",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 541,
|
|
"src": "1484:1:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 602,
|
|
"name": "input",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "1487:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory[2] memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2] memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4] memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 597,
|
|
"name": "verifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 471,
|
|
"src": "1462:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IVerifier_$458",
|
|
"typeString": "contract IVerifier"
|
|
}
|
|
},
|
|
"id": 598,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "verify",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 457,
|
|
"src": "1462:15:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_array$_t_uint256_$2_memory_ptr_$_t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr_$_t_array$_t_uint256_$2_memory_ptr_$_t_array$_t_uint256_$4_memory_ptr_$returns$_t_bool_$",
|
|
"typeString": "function (uint256[2] memory,uint256[2] memory[2] memory,uint256[2] memory,uint256[4] memory) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 603,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1462:31:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "496e76616c69642077697468647261772070726f6f66",
|
|
"id": 604,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1495:24:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_7021ea58137dba96e572e94936410b0b0e4cbc344e1ab2ee7f47660768b81ff4",
|
|
"typeString": "literal_string \"Invalid withdraw proof\""
|
|
},
|
|
"value": "Invalid withdraw proof"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_7021ea58137dba96e572e94936410b0b0e4cbc344e1ab2ee7f47660768b81ff4",
|
|
"typeString": "literal_string \"Invalid withdraw proof\""
|
|
}
|
|
],
|
|
"id": 596,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
793,
|
|
794
|
|
],
|
|
"referencedDeclaration": 794,
|
|
"src": "1454:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 605,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1454:66:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 606,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1454:66:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 611,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 607,
|
|
"name": "nullifiers",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 469,
|
|
"src": "1527:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$",
|
|
"typeString": "mapping(uint256 => bool)"
|
|
}
|
|
},
|
|
"id": 609,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 608,
|
|
"name": "nullifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 557,
|
|
"src": "1538:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1527:21:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 610,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1551:4:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"src": "1527:28:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 612,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1527:28:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 618,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 616,
|
|
"name": "transferValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 465,
|
|
"src": "1579:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 617,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1595:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1579:19:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 613,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "1561:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 615,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1561:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 619,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1561:38:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 620,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1561:38:2"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 623,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 621,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1609:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 622,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1615:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1609:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 633,
|
|
"nodeType": "IfStatement",
|
|
"src": "1605:52:2",
|
|
"trueBody": {
|
|
"id": 632,
|
|
"nodeType": "Block",
|
|
"src": "1618:39:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 629,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1646:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 624,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 790,
|
|
"src": "1626:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 627,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1626:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 628,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1626:19:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 630,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1626:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 631,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1626:24:2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 635,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 549,
|
|
"src": "1676:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 636,
|
|
"name": "nullifier",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 557,
|
|
"src": "1686:9:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 637,
|
|
"name": "fee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 563,
|
|
"src": "1697:3:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 634,
|
|
"name": "Withdraw",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 485,
|
|
"src": "1667:8:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 638,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1667:34:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 639,
|
|
"nodeType": "EmitStatement",
|
|
"src": "1662:39:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 641,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "withdraw",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 546,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 531,
|
|
"name": "a",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 641,
|
|
"src": "975:19:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 528,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "975:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 530,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 529,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "983:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "975:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 537,
|
|
"name": "b",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 641,
|
|
"src": "996:22:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$2_memory_ptr",
|
|
"typeString": "uint256[2][2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"baseType": {
|
|
"id": 532,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "996:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 534,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 533,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1004:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "996:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"id": 536,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 535,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1007:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "996:13:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_storage_$2_storage_ptr",
|
|
"typeString": "uint256[2][2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 541,
|
|
"name": "c",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 641,
|
|
"src": "1020:19:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_memory_ptr",
|
|
"typeString": "uint256[2]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 538,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1020:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 540,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "32",
|
|
"id": 539,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1028:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "1020:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
|
|
"typeString": "uint256[2]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 545,
|
|
"name": "input",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 641,
|
|
"src": "1041:23:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_memory_ptr",
|
|
"typeString": "uint256[4]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 542,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1041:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 544,
|
|
"length": {
|
|
"argumentTypes": null,
|
|
"hexValue": "34",
|
|
"id": 543,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1049:1:2",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4_by_1",
|
|
"typeString": "int_const 4"
|
|
},
|
|
"value": "4"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "1041:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$4_storage_ptr",
|
|
"typeString": "uint256[4]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "974:91:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 547,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1073:0:2"
|
|
},
|
|
"scope": 642,
|
|
"src": "957:749:2",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 643,
|
|
"src": "295:1413:2"
|
|
}
|
|
],
|
|
"src": "0:1708:2"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.5.8+commit.23d335f2.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.0.11",
|
|
"updatedAt": "2019-07-09T12:37:28.581Z",
|
|
"devdoc": {
|
|
"methods": {}
|
|
},
|
|
"userdoc": {
|
|
"methods": {}
|
|
}
|
|
} |