479 lines
19 KiB
JSON
479 lines
19 KiB
JSON
{
|
|
"contractName": "SelfAuthorized",
|
|
"abi": [],
|
|
"bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a72305820ec80f1b4520aa5197e4181778f1e2e4fc460002d4a40e2e8e6709c8986067c220029",
|
|
"deployedBytecode": "0x6080604052600080fd00a165627a7a72305820ec80f1b4520aa5197e4181778f1e2e4fc460002d4a40e2e8e6709c8986067c220029",
|
|
"sourceMap": "152:166:16:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;152:166:16;;;;;;;",
|
|
"deployedSourceMap": "152:166:16:-;;;;;",
|
|
"source": "pragma solidity 0.4.24;\n\n\n/// @title SelfAuthorized - authorizes current contract to perform actions\n/// @author Richard Meissner - <richard@gnosis.pm>\ncontract SelfAuthorized {\n modifier authorized() {\n require(msg.sender == address(this), \"Method can only be called from this contract\");\n _;\n }\n}\n",
|
|
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/SelfAuthorized.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/SelfAuthorized.sol",
|
|
"exportedSymbols": {
|
|
"SelfAuthorized": [
|
|
1765
|
|
]
|
|
},
|
|
"id": 1766,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1750,
|
|
"literals": [
|
|
"solidity",
|
|
"0.4",
|
|
".24"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:16"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": "@title SelfAuthorized - authorizes current contract to perform actions\n @author Richard Meissner - <richard@gnosis.pm>",
|
|
"fullyImplemented": true,
|
|
"id": 1765,
|
|
"linearizedBaseContracts": [
|
|
1765
|
|
],
|
|
"name": "SelfAuthorized",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 1763,
|
|
"nodeType": "Block",
|
|
"src": "204:112:16",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 1758,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1753,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3828,
|
|
"src": "222:3:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 1754,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "222:10:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1756,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3851,
|
|
"src": "244:4:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SelfAuthorized_$1765",
|
|
"typeString": "contract SelfAuthorized"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_SelfAuthorized_$1765",
|
|
"typeString": "contract SelfAuthorized"
|
|
}
|
|
],
|
|
"id": 1755,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "236:7:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 1757,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "236:13:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "222:27:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d207468697320636f6e7472616374",
|
|
"id": 1759,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "251:46:16",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c4780ef0a1d41d59bac8c510cf9ada421bccf2b90f75a8e4ba2e8c09e8d72733",
|
|
"typeString": "literal_string \"Method can only be called from this contract\""
|
|
},
|
|
"value": "Method can only be called from this contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c4780ef0a1d41d59bac8c510cf9ada421bccf2b90f75a8e4ba2e8c09e8d72733",
|
|
"typeString": "literal_string \"Method can only be called from this contract\""
|
|
}
|
|
],
|
|
"id": 1752,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
3831,
|
|
3832
|
|
],
|
|
"referencedDeclaration": 3832,
|
|
"src": "214:7:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1760,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "214:84:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1761,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "214:84:16"
|
|
},
|
|
{
|
|
"id": 1762,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "308:1:16"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1764,
|
|
"name": "authorized",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 1751,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "201:2:16"
|
|
},
|
|
"src": "182:134:16",
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 1766,
|
|
"src": "152:166:16"
|
|
}
|
|
],
|
|
"src": "0:319:16"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/SelfAuthorized.sol",
|
|
"exportedSymbols": {
|
|
"SelfAuthorized": [
|
|
1765
|
|
]
|
|
},
|
|
"id": 1766,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1750,
|
|
"literals": [
|
|
"solidity",
|
|
"0.4",
|
|
".24"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:16"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": "@title SelfAuthorized - authorizes current contract to perform actions\n @author Richard Meissner - <richard@gnosis.pm>",
|
|
"fullyImplemented": true,
|
|
"id": 1765,
|
|
"linearizedBaseContracts": [
|
|
1765
|
|
],
|
|
"name": "SelfAuthorized",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 1763,
|
|
"nodeType": "Block",
|
|
"src": "204:112:16",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 1758,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1753,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3828,
|
|
"src": "222:3:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 1754,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "222:10:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1756,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 3851,
|
|
"src": "244:4:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SelfAuthorized_$1765",
|
|
"typeString": "contract SelfAuthorized"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_SelfAuthorized_$1765",
|
|
"typeString": "contract SelfAuthorized"
|
|
}
|
|
],
|
|
"id": 1755,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "236:7:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 1757,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "236:13:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "222:27:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d207468697320636f6e7472616374",
|
|
"id": 1759,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "251:46:16",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c4780ef0a1d41d59bac8c510cf9ada421bccf2b90f75a8e4ba2e8c09e8d72733",
|
|
"typeString": "literal_string \"Method can only be called from this contract\""
|
|
},
|
|
"value": "Method can only be called from this contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c4780ef0a1d41d59bac8c510cf9ada421bccf2b90f75a8e4ba2e8c09e8d72733",
|
|
"typeString": "literal_string \"Method can only be called from this contract\""
|
|
}
|
|
],
|
|
"id": 1752,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
3831,
|
|
3832
|
|
],
|
|
"referencedDeclaration": 3832,
|
|
"src": "214:7:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1760,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "214:84:16",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1761,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "214:84:16"
|
|
},
|
|
{
|
|
"id": 1762,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "308:1:16"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1764,
|
|
"name": "authorized",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 1751,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "201:2:16"
|
|
},
|
|
"src": "182:134:16",
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 1766,
|
|
"src": "152:166:16"
|
|
}
|
|
],
|
|
"src": "0:319:16"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "2.0.0",
|
|
"updatedAt": "2018-08-20T07:44:41.093Z"
|
|
} |