arc_dx
Version:
A platform for building DAOs
1,205 lines • 92.3 kB
JSON
{
"contractName": "ActionMock",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "_addr",
"type": "address"
}
],
"name": "WithoutReturnValue",
"type": "event"
},
{
"constant": true,
"inputs": [
{
"name": "_a",
"type": "uint256"
},
{
"name": "_b",
"type": "address"
},
{
"name": "_c",
"type": "bytes32"
}
],
"name": "test",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_addr",
"type": "address"
}
],
"name": "test2",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_addr",
"type": "address"
}
],
"name": "withoutReturnValue",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b506102f4806100206000396000f3006080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630db12fad811461005b578063b11bead41461007e578063f3e8dcd0146100b3575b600080fd5b34801561006757600080fd5b5061007c600160a060020a03600435166100ec565b005b34801561008a57600080fd5b5061009f600160a060020a03600435166101c8565b604080519115158252519081900360200190f35b3480156100bf57600080fd5b506100da600435600160a060020a036024351660443561026f565b60408051918252519081900360200190f35b33600160a060020a0382161461018957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f7468652063616c6c6572206d75737420626520657175616c20746f205f61646460448201527f7200000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60408051600160a060020a038316815290517f296b3ab69f08b831e3eba781baef82f44885a5d62be6e22903cc9416d47812779181900360200190a150565b600033600160a060020a0383161461026757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f7468652063616c6c6572206d75737420626520657175616c20746f205f61646460448201527f7200000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b506001919050565b60006007841461027e57600080fd5b600160a060020a038316301461029357600080fd5b7f123400000000000000000000000000000000000000000000000000000000000082146102bf57600080fd5b505050600202905600a165627a7a72305820dfbfa6a03f5e4004ea0e3c11a8f5d02346a3bd11ceddcf5264d1e892aa858a2d0029",
"deployedBytecode": "0x6080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630db12fad811461005b578063b11bead41461007e578063f3e8dcd0146100b3575b600080fd5b34801561006757600080fd5b5061007c600160a060020a03600435166100ec565b005b34801561008a57600080fd5b5061009f600160a060020a03600435166101c8565b604080519115158252519081900360200190f35b3480156100bf57600080fd5b506100da600435600160a060020a036024351660443561026f565b60408051918252519081900360200190f35b33600160a060020a0382161461018957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f7468652063616c6c6572206d75737420626520657175616c20746f205f61646460448201527f7200000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60408051600160a060020a038316815290517f296b3ab69f08b831e3eba781baef82f44885a5d62be6e22903cc9416d47812779181900360200190a150565b600033600160a060020a0383161461026757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f7468652063616c6c6572206d75737420626520657175616c20746f205f61646460448201527f7200000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b506001919050565b60006007841461027e57600080fd5b600160a060020a038316301461029357600080fd5b7f123400000000000000000000000000000000000000000000000000000000000082146102bf57600080fd5b505050600202905600a165627a7a72305820dfbfa6a03f5e4004ea0e3c11a8f5d02346a3bd11ceddcf5264d1e892aa858a2d0029",
"sourceMap": "63:670:18:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;63:670:18;;;;;;;",
"deployedSourceMap": "63:670:18:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;559:171;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;559:171:18;-1:-1:-1;;;;;559:171:18;;;;;;;395:158;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;395:158:18;-1:-1:-1;;;;;395:158:18;;;;;;;;;;;;;;;;;;;;;;;135:254;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;135:254:18;;;-1:-1:-1;;;;;135:254:18;;;;;;;;;;;;;;;;;;;;;;;559:171;627:10;-1:-1:-1;;;;;627:19:18;;;619:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;698:25;;;-1:-1:-1;;;;;698:25:18;;;;;;;;;;;;;;;559:171;:::o;395:158::-;445:4;469:10;-1:-1:-1;;;;;469:19:18;;;461:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;542:4:18;395:158;;;:::o;135:254::-;200:4;230:1;224:7;;216:16;;;;;;-1:-1:-1;;;;;250:19:18;;264:4;250:19;242:28;;;;;;294:66;288:72;;280:81;;;;;;-1:-1:-1;;;381:1:18;378:4;;135:254::o",
"source": "pragma solidity ^0.4.25;\n\nimport \"../controller/Avatar.sol\";\n\n\ncontract ActionMock {\n\n event WithoutReturnValue(address _addr);\n function test(uint _a,address _b,bytes32 _c) public view returns(uint) {\n require(_a == 7);\n require(_b == address(this));\n require(_c == 0x1234000000000000000000000000000000000000000000000000000000000000);\n return _a*2;\n }\n\n function test2(address _addr) public view returns(bool) {\n require(msg.sender == _addr,\"the caller must be equal to _addr\");\n return true;\n }\n\n function withoutReturnValue(address _addr) public {\n require(msg.sender == _addr,\"the caller must be equal to _addr\");\n emit WithoutReturnValue(_addr);\n }\n\n}\n",
"sourcePath": "/Users/oren/daostack/daostack2/daostack/contracts/test/ActionMock.sol",
"ast": {
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/test/ActionMock.sol",
"exportedSymbols": {
"ActionMock": [
6553
]
},
"id": 6554,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6475,
"literals": [
"solidity",
"^",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:24:18"
},
{
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/controller/Avatar.sol",
"file": "../controller/Avatar.sol",
"id": 6476,
"nodeType": "ImportDirective",
"scope": 6554,
"sourceUnit": 334,
"src": "26:34:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 6553,
"linearizedBaseContracts": [
6553
],
"name": "ActionMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 6480,
"name": "WithoutReturnValue",
"nodeType": "EventDefinition",
"parameters": {
"id": 6479,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6478,
"indexed": false,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 6480,
"src": "115:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6477,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "115:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "114:15:18"
},
"src": "90:40:18"
},
{
"body": {
"id": 6515,
"nodeType": "Block",
"src": "206:183:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6494,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6492,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6482,
"src": "224:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "37",
"id": 6493,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "230:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_7_by_1",
"typeString": "int_const 7"
},
"value": "7"
},
"src": "224:7:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 6491,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
21552,
21553
],
"referencedDeclaration": 21552,
"src": "216:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 6495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "216:16:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6496,
"nodeType": "ExpressionStatement",
"src": "216:16:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6502,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6498,
"name": "_b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6484,
"src": "250:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6500,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21652,
"src": "264:4:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ActionMock_$6553",
"typeString": "contract ActionMock"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ActionMock_$6553",
"typeString": "contract ActionMock"
}
],
"id": 6499,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "256:7:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 6501,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "256:13:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "250:19:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 6497,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
21552,
21553
],
"referencedDeclaration": 21552,
"src": "242:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 6503,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "242:28:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6504,
"nodeType": "ExpressionStatement",
"src": "242:28:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"id": 6508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6506,
"name": "_c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6486,
"src": "288:2:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "307831323334303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030",
"id": 6507,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "294:66:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_8233507321867270975858166353462000283756074959440384344846684898023608156160_by_1",
"typeString": "int_const 8233...(68 digits omitted)...6160"
},
"value": "0x1234000000000000000000000000000000000000000000000000000000000000"
},
"src": "288:72:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 6505,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
21552,
21553
],
"referencedDeclaration": 21552,
"src": "280:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 6509,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "280:81:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6510,
"nodeType": "ExpressionStatement",
"src": "280:81:18"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6513,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6511,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6482,
"src": "378:2:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 6512,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "381:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "378:4:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6490,
"id": 6514,
"nodeType": "Return",
"src": "371:11:18"
}
]
},
"documentation": null,
"id": 6516,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "test",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6487,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6482,
"name": "_a",
"nodeType": "VariableDeclaration",
"scope": 6516,
"src": "149:7:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6481,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "149:4:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 6484,
"name": "_b",
"nodeType": "VariableDeclaration",
"scope": 6516,
"src": "157:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6483,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "157:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 6486,
"name": "_c",
"nodeType": "VariableDeclaration",
"scope": 6516,
"src": "168:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6485,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "168:7:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "148:31:18"
},
"payable": false,
"returnParameters": {
"id": 6490,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6489,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6516,
"src": "200:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6488,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "200:4:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "199:6:18"
},
"scope": 6553,
"src": "135:254:18",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6533,
"nodeType": "Block",
"src": "451:102:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6527,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 6524,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21549,
"src": "469:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 6525,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "469:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 6526,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6518,
"src": "483:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "469:19:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7468652063616c6c6572206d75737420626520657175616c20746f205f61646472",
"id": 6528,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "489:35:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f05ac7fc4aff63317a7738e1b80ec54dd974d44f2fb2518de5bdaacb47b456c8",
"typeString": "literal_string \"the caller must be equal to _addr\""
},
"value": "the caller must be equal to _addr"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f05ac7fc4aff63317a7738e1b80ec54dd974d44f2fb2518de5bdaacb47b456c8",
"typeString": "literal_string \"the caller must be equal to _addr\""
}
],
"id": 6523,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
21552,
21553
],
"referencedDeclaration": 21553,
"src": "461:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6529,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "461:64:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6530,
"nodeType": "ExpressionStatement",
"src": "461:64:18"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 6531,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "542:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 6522,
"id": 6532,
"nodeType": "Return",
"src": "535:11:18"
}
]
},
"documentation": null,
"id": 6534,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "test2",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6519,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6518,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 6534,
"src": "410:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6517,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "410:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "409:15:18"
},
"payable": false,
"returnParameters": {
"id": 6522,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6521,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6534,
"src": "445:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6520,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "445:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "444:6:18"
},
"scope": 6553,
"src": "395:158:18",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 6551,
"nodeType": "Block",
"src": "609:121:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 6543,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 6540,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21549,
"src": "627:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 6541,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "627:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 6542,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6536,
"src": "641:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "627:19:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "7468652063616c6c6572206d75737420626520657175616c20746f205f61646472",
"id": 6544,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "647:35:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f05ac7fc4aff63317a7738e1b80ec54dd974d44f2fb2518de5bdaacb47b456c8",
"typeString": "literal_string \"the caller must be equal to _addr\""
},
"value": "the caller must be equal to _addr"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f05ac7fc4aff63317a7738e1b80ec54dd974d44f2fb2518de5bdaacb47b456c8",
"typeString": "literal_string \"the caller must be equal to _addr\""
}
],
"id": 6539,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
21552,
21553
],
"referencedDeclaration": 21553,
"src": "619:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 6545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "619:64:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6546,
"nodeType": "ExpressionStatement",
"src": "619:64:18"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 6548,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6536,
"src": "717:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 6547,
"name": "WithoutReturnValue",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6480,
"src": "698:18:18",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 6549,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "698:25:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 6550,
"nodeType": "EmitStatement",
"src": "693:30:18"
}
]
},
"documentation": null,
"id": 6552,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "withoutReturnValue",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6537,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6536,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 6552,
"src": "587:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6535,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "587:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "586:15:18"
},
"payable": false,
"returnParameters": {
"id": 6538,
"nodeType": "ParameterList",
"parameters": [],
"src": "609:0:18"
},
"scope": 6553,
"src": "559:171:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 6554,
"src": "63:670:18"
}
],
"src": "0:734:18"
},
"legacyAST": {
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/test/ActionMock.sol",
"exportedSymbols": {
"ActionMock": [
6553
]
},
"id": 6554,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6475,
"literals": [
"solidity",
"^",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:24:18"
},
{
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/controller/Avatar.sol",
"file": "../controller/Avatar.sol",
"id": 6476,
"nodeType": "ImportDirective",
"scope": 6554,
"sourceUnit": 334,
"src": "26:34:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": []