UNPKG

elliptic-solidity

Version:

Elliptic curve implementation in solidity; includes secp256r1

1,200 lines (1,199 loc) 60.5 kB
{ "contractName": "Ownable", "abi": [ { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" }, { "indexed": true, "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "constant": false, "inputs": [ { "name": "_newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610299806100606000396000f3fe608060405260043610610046576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b1461004b578063f2fde38b146100a2575b600080fd5b34801561005757600080fd5b506100606100f3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100ae57600080fd5b506100f1600480360360208110156100c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610118565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156101af57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fea165627a7a72305820ef5338ac4ba2ce1b7807811b72d3e338379a6d6ea435e8fff43862a18d7f6da40029", "deployedBytecode": "0x608060405260043610610046576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b1461004b578063f2fde38b146100a2575b600080fd5b34801561005757600080fd5b506100606100f3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100ae57600080fd5b506100f1600480360360208110156100c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610118565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156101af57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fea165627a7a72305820ef5338ac4ba2ce1b7807811b72d3e338379a6d6ea435e8fff43862a18d7f6da40029", "sourceMap": "249:1002:2:-;;;687:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;687:56:2;728:10;720:5;;:18;;;;;;;;;;;;;;;;;;249:1002;;;;;;", "deployedSourceMap": "249:1002:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;270:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;270:20:2;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1052:196;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1052:196:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1052:196:2;;;;;;;;;;;;;;;;;;;:::i;:::-;;270:20;;;;;;;;;;;;;:::o;1052:196::-;872:5;;;;;;;;;;;858:19;;:10;:19;;;850:28;;;;;;;;1168:1;1147:23;;:9;:23;;;;1139:32;;;;;;;;1210:9;1182:38;;1203:5;;;;;;;;;;;1182:38;;;;;;;;;;;;1234:9;1226:5;;:17;;;;;;;;;;;;;;;;;;1052:196;:::o", "source": "pragma solidity ^0.5.0;\n\n/**\n * @dev The contract has an owner address, and provides basic authorization control whitch\n * simplifies the implementation of user permissions. This contract is based on the source code\n * at https://goo.gl/n2ZGVt.\n */\ncontract Ownable {\n address public owner;\n\n /**\n * @dev An event which is triggered when the owner is changed.\n * @param previousOwner The address of the previous owner.\n * @param newOwner The address of the new owner.\n */\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n /**\n * @dev The constructor sets the original `owner` of the contract to the sender account.\n */\n constructor()\n public\n {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param _newOwner The address to transfer ownership to.\n */\n function transferOwnership(\n address _newOwner\n )\n onlyOwner\n public\n {\n require(_newOwner != address(0));\n emit OwnershipTransferred(owner, _newOwner);\n owner = _newOwner;\n }\n\n}", "sourcePath": "/Users/tilmandrerup/Desktop/airtime/github/elliptic-curve-solidity/contracts/ownership/Ownable.sol", "ast": { "absolutePath": "/Users/tilmandrerup/Desktop/airtime/github/elliptic-curve-solidity/contracts/ownership/Ownable.sol", "exportedSymbols": { "Ownable": [ 1439 ] }, "id": 1440, "nodeType": "SourceUnit", "nodes": [ { "id": 1385, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:2" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@dev The contract has an owner address, and provides basic authorization control whitch\nsimplifies the implementation of user permissions. This contract is based on the source code\nat https://goo.gl/n2ZGVt.", "fullyImplemented": true, "id": 1439, "linearizedBaseContracts": [ 1439 ], "name": "Ownable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 1387, "name": "owner", "nodeType": "VariableDeclaration", "scope": 1439, "src": "270:20:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1386, "name": "address", "nodeType": "ElementaryTypeName", "src": "270:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": "@dev An event which is triggered when the owner is changed.\n@param previousOwner The address of the previous owner.\n@param newOwner The address of the new owner.", "id": 1393, "name": "OwnershipTransferred", "nodeType": "EventDefinition", "parameters": { "id": 1392, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1389, "indexed": true, "name": "previousOwner", "nodeType": "VariableDeclaration", "scope": 1393, "src": "516:29:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1388, "name": "address", "nodeType": "ElementaryTypeName", "src": "516:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1391, "indexed": true, "name": "newOwner", "nodeType": "VariableDeclaration", "scope": 1393, "src": "551:24:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1390, "name": "address", "nodeType": "ElementaryTypeName", "src": "551:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "510:69:2" }, "src": "484:96:2" }, { "body": { "id": 1401, "nodeType": "Block", "src": "714:29:2", "statements": [ { "expression": { "argumentTypes": null, "id": 1399, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 1396, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1387, "src": "720:5:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1397, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1454, "src": "728:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1398, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "728:10:2", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "720:18:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1400, "nodeType": "ExpressionStatement", "src": "720:18:2" } ] }, "documentation": "@dev The constructor sets the original `owner` of the contract to the sender account.", "id": 1402, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 1394, "nodeType": "ParameterList", "parameters": [], "src": "698:2:2" }, "returnParameters": { "id": 1395, "nodeType": "ParameterList", "parameters": [], "src": "714:0:2" }, "scope": 1439, "src": "687:56:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 1412, "nodeType": "Block", "src": "844:46:2", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 1408, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1405, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1454, "src": "858:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1406, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "858:10:2", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 1407, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1387, "src": "872:5:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "858:19:2", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1404, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1457, 1458 ], "referencedDeclaration": 1457, "src": "850:7:2", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1409, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "850:28:2", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1410, "nodeType": "ExpressionStatement", "src": "850:28:2" }, { "id": 1411, "nodeType": "PlaceholderStatement", "src": "884:1:2" } ] }, "documentation": "@dev Throws if called by any account other than the owner.", "id": 1413, "name": "onlyOwner", "nodeType": "ModifierDefinition", "parameters": { "id": 1403, "nodeType": "ParameterList", "parameters": [], "src": "841:2:2" }, "src": "823:67:2", "visibility": "internal" }, { "body": { "id": 1437, "nodeType": "Block", "src": "1133:115:2", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 1425, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1421, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1415, "src": "1147:9:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 1423, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1168:1:2", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 1422, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1160:7:2", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 1424, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1160:10:2", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "1147:23:2", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1420, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1457, 1458 ], "referencedDeclaration": 1457, "src": "1139:7:2", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1426, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1139:32:2", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1427, "nodeType": "ExpressionStatement", "src": "1139:32:2" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1429, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1387, "src": "1203:5:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 1430, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1415, "src": "1210:9:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 1428, "name": "OwnershipTransferred", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1393, "src": "1182:20:2", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 1431, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1182:38:2", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1432, "nodeType": "EmitStatement", "src": "1177:43:2" }, { "expression": { "argumentTypes": null, "id": 1435, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 1433, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1387, "src": "1226:5:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 1434, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1415, "src": "1234:9:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1226:17:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1436, "nodeType": "ExpressionStatement", "src": "1226:17:2" } ] }, "documentation": "@dev Allows the current owner to transfer control of the contract to a newOwner.\n@param _newOwner The address to transfer ownership to.", "id": 1438, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 1418, "modifierName": { "argumentTypes": null, "id": 1417, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1413, "src": "1110:9:2", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1110:9:2" } ], "name": "transferOwnership", "nodeType": "FunctionDefinition", "parameters": { "id": 1416, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1415, "name": "_newOwner", "nodeType": "VariableDeclaration", "scope": 1438, "src": "1084:17:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1414, "name": "address", "nodeType": "ElementaryTypeName", "src": "1084:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1078:27:2" }, "returnParameters": { "id": 1419, "nodeType": "ParameterList", "parameters": [], "src": "1133:0:2" }, "scope": 1439, "src": "1052:196:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 1440, "src": "249:1002:2" } ], "src": "0:1251:2" }, "legacyAST": { "absolutePath": "/Users/tilmandrerup/Desktop/airtime/github/elliptic-curve-solidity/contracts/ownership/Ownable.sol", "exportedSymbols": { "Ownable": [ 1439 ] }, "id": 1440, "nodeType": "SourceUnit", "nodes": [ { "id": 1385, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:2" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@dev The contract has an owner address, and provides basic authorization control whitch\nsimplifies the implementation of user permissions. This contract is based on the source code\nat https://goo.gl/n2ZGVt.", "fullyImplemented": true, "id": 1439, "linearizedBaseContracts": [ 1439 ], "name": "Ownable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 1387, "name": "owner", "nodeType": "VariableDeclaration", "scope": 1439, "src": "270:20:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1386, "name": "address", "nodeType": "ElementaryTypeName", "src": "270:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": "@dev An event which is triggered when the owner is changed.\n@param previousOwner The address of the previous owner.\n@param newOwner The address of the new owner.", "id": 1393, "name": "OwnershipTransferred", "nodeType": "EventDefinition", "parameters": { "id": 1392, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1389, "indexed": true, "name": "previousOwner", "nodeType": "VariableDeclaration", "scope": 1393, "src": "516:29:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1388, "name": "address", "nodeType": "ElementaryTypeName", "src": "516:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1391, "indexed": true, "name": "newOwner", "nodeType": "VariableDeclaration", "scope": 1393, "src": "551:24:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1390, "name": "address", "nodeType": "ElementaryTypeName", "src": "551:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "510:69:2" }, "src": "484:96:2" }, { "body": { "id": 1401, "nodeType": "Block", "src": "714:29:2", "statements": [ { "expression": { "argumentTypes": null, "id": 1399, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 1396, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1387, "src": "720:5:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1397, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1454, "src": "728:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1398, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "728:10:2", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "720:18:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1400, "nodeType": "ExpressionStatement", "src": "720:18:2" } ] }, "documentation": "@dev The constructor sets the original `owner` of the contract to the sender account.", "id": 1402, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 1394, "nodeType": "ParameterList", "parameters": [], "src": "698:2:2" }, "returnParameters": { "id": 1395, "nodeType": "ParameterList", "parameters": [], "src": "714:0:2" }, "scope": 1439, "src": "687:56:2", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 1412, "nodeType": "Block", "src": "844:46:2", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 1408, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1405, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1454, "src": "858:3:2", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1406, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "858:10:2", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 1407, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1387, "src": "872:5:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "858:19:2", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1404, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1457, 1458 ], "referencedDeclaration": 1457, "src": "850:7:2", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1409, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "850:28:2", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1410, "nodeType": "ExpressionStatement", "src": "850:28:2" }, { "id": 1411, "nodeType": "PlaceholderStatement", "src": "884:1:2" } ] }, "documentation": "@dev Throws if called by any account other than the owner.", "id": 1413, "name": "onlyOwner", "nodeType": "ModifierDefinition", "parameters": { "id": 1403, "nodeType": "ParameterList", "parameters": [], "src": "841:2:2" }, "src": "823:67:2", "visibility": "internal" }, { "body": { "id": 1437, "nodeType": "Block", "src": "1133:115:2", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 1425, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1421, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1415, "src": "1147:9:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 1423, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1168:1:2", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 1422, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1160:7:2", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 1424, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [],