UNPKG

@reality.eth/contracts

Version:

Collection of smart contracts for the Realitio fact verification platform

898 lines 33.2 kB
{ "contractName": "Owned", "abi": [ { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a03191633179055610166806100326000396000f30060806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638da5cb5b8114610050578063f2fde38b1461008e575b600080fd5b34801561005c57600080fd5b506100656100be565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100bc73ffffffffffffffffffffffffffffffffffffffff600435166100da565b005b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146100fe57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a723058203aa726eff9ad949a137b974a1cd286786b230aa7b688125f9f959d114a846d220029", "deployedBytecode": "0x60806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638da5cb5b8114610050578063f2fde38b1461008e575b600080fd5b34801561005c57600080fd5b506100656100be565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100bc73ffffffffffffffffffffffffffffffffffffffff600435166100da565b005b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146100fe57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a723058203aa726eff9ad949a137b974a1cd286786b230aa7b688125f9f959d114a846d220029", "sourceMap": "27:307:3:-;;;75:61;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;111:5:3;:18;;-1:-1:-1;;;;;;111:18:3;119:10;111:18;;;27:307;;;;;;", "deployedSourceMap": "27:307:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;48:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;48:20:3;;;;;;;;;;;;;;;;;;;;;;;223:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;223:109:3;;;;;;;;;48:20;;;;;;:::o;223:109::-;193:5;;;;179:10;:19;171:28;;;;;;309:5;:16;;-1:-1:-1;;309:16:3;;;;;;;;;;;;223:109::o", "source": "pragma solidity ^0.4.18;\n\n\ncontract Owned {\n address public owner;\n\n constructor() \n public {\n owner = msg.sender;\n }\n\n modifier onlyOwner {\n require(msg.sender == owner);\n _;\n }\n\n function transferOwnership(address newOwner) \n onlyOwner \n public {\n owner = newOwner;\n }\n}\n", "sourcePath": "/home/ed/working/realitio-contracts-newtest/truffle/contracts/Owned.sol", "ast": { "absolutePath": "/home/ed/working/realitio-contracts-newtest/truffle/contracts/Owned.sol", "exportedSymbols": { "Owned": [ 490 ] }, "id": 491, "nodeType": "SourceUnit", "nodes": [ { "id": 455, "literals": [ "solidity", "^", "0.4", ".18" ], "nodeType": "PragmaDirective", "src": "0:24:3" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 490, "linearizedBaseContracts": [ 490 ], "name": "Owned", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 457, "name": "owner", "nodeType": "VariableDeclaration", "scope": 490, "src": "48:20:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 456, "name": "address", "nodeType": "ElementaryTypeName", "src": "48:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "body": { "id": 465, "nodeType": "Block", "src": "101:35:3", "statements": [ { "expression": { "argumentTypes": null, "id": 463, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 460, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "111:5:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 461, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2726, "src": "119:3:3", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 462, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "119:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "111:18:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 464, "nodeType": "ExpressionStatement", "src": "111:18:3" } ] }, "documentation": null, "id": 466, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 458, "nodeType": "ParameterList", "parameters": [], "src": "86:2:3" }, "payable": false, "returnParameters": { "id": 459, "nodeType": "ParameterList", "parameters": [], "src": "101:0:3" }, "scope": 490, "src": "75:61:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 476, "nodeType": "Block", "src": "161:56:3", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 469, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2726, "src": "179:3:3", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 470, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "179:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 471, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "193:5:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "179:19:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 468, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2729, 2730 ], "referencedDeclaration": 2729, "src": "171:7:3", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 473, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "171:28:3", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 474, "nodeType": "ExpressionStatement", "src": "171:28:3" }, { "id": 475, "nodeType": "PlaceholderStatement", "src": "209:1:3" } ] }, "documentation": null, "id": 477, "name": "onlyOwner", "nodeType": "ModifierDefinition", "parameters": { "id": 467, "nodeType": "ParameterList", "parameters": [], "src": "161:0:3" }, "src": "142:75:3", "visibility": "internal" }, { "body": { "id": 488, "nodeType": "Block", "src": "299:33:3", "statements": [ { "expression": { "argumentTypes": null, "id": 486, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 484, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "309:5:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 485, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 479, "src": "317:8:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "309:16:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 487, "nodeType": "ExpressionStatement", "src": "309:16:3" } ] }, "documentation": null, "id": 489, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 482, "modifierName": { "argumentTypes": null, "id": 481, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 477, "src": "277:9:3", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "277:9:3" } ], "name": "transferOwnership", "nodeType": "FunctionDefinition", "parameters": { "id": 480, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 479, "name": "newOwner", "nodeType": "VariableDeclaration", "scope": 489, "src": "250:16:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 478, "name": "address", "nodeType": "ElementaryTypeName", "src": "250:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "249:18:3" }, "payable": false, "returnParameters": { "id": 483, "nodeType": "ParameterList", "parameters": [], "src": "299:0:3" }, "scope": 490, "src": "223:109:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 491, "src": "27:307:3" } ], "src": "0:335:3" }, "legacyAST": { "absolutePath": "/home/ed/working/realitio-contracts-newtest/truffle/contracts/Owned.sol", "exportedSymbols": { "Owned": [ 490 ] }, "id": 491, "nodeType": "SourceUnit", "nodes": [ { "id": 455, "literals": [ "solidity", "^", "0.4", ".18" ], "nodeType": "PragmaDirective", "src": "0:24:3" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 490, "linearizedBaseContracts": [ 490 ], "name": "Owned", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 457, "name": "owner", "nodeType": "VariableDeclaration", "scope": 490, "src": "48:20:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 456, "name": "address", "nodeType": "ElementaryTypeName", "src": "48:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "body": { "id": 465, "nodeType": "Block", "src": "101:35:3", "statements": [ { "expression": { "argumentTypes": null, "id": 463, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 460, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "111:5:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 461, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2726, "src": "119:3:3", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 462, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "119:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "111:18:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 464, "nodeType": "ExpressionStatement", "src": "111:18:3" } ] }, "documentation": null, "id": 466, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 458, "nodeType": "ParameterList", "parameters": [], "src": "86:2:3" }, "payable": false, "returnParameters": { "id": 459, "nodeType": "ParameterList", "parameters": [], "src": "101:0:3" }, "scope": 490, "src": "75:61:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 476, "nodeType": "Block", "src": "161:56:3", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 469, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2726, "src": "179:3:3", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 470, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "179:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 471, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "193:5:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "179:19:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 468, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2729, 2730 ], "referencedDeclaration": 2729, "src": "171:7:3", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 473, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "171:28:3", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 474, "nodeType": "ExpressionStatement", "src": "171:28:3" }, { "id": 475, "nodeType": "PlaceholderStatement", "src": "209:1:3" } ] }, "documentation": null, "id": 477, "name": "onlyOwner", "nodeType": "ModifierDefinition", "parameters": { "id": 467, "nodeType": "ParameterList", "parameters": [], "src": "161:0:3" }, "src": "142:75:3", "visibility": "internal" }, { "body": { "id": 488, "nodeType": "Block", "src": "299:33:3", "statements": [ { "expression": { "argumentTypes": null, "id": 486, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 484, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "309:5:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 485, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 479, "src": "317:8:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "309:16:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 487, "nodeType": "ExpressionStatement", "src": "309:16:3" } ] }, "documentation": null, "id": 489, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 482, "modifierName": { "argumentTypes": null, "id": 481, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 477, "src": "277:9:3", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "277:9:3" } ], "name": "transferOwnership", "nodeType": "FunctionDefinition", "parameters": { "id": 480, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 479, "name": "newOwner", "nodeType": "VariableDeclaration", "scope": 489, "src": "250:16:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 478, "name": "address", "nodeType": "ElementaryTypeName", "src": "250:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "249:18:3" }, "payable": false, "returnParameters": { "id": 483, "nodeType": "ParameterList", "parameters": [], "src": "299:0:3" }, "scope": 490, "src": "223:109:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 491, "src": "27:307:3" } ], "src": "0:335:3" }, "compiler": { "name": "solc", "version": "0.4.25+commit.59dbf8f1.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.2", "updatedAt": "2019-06-04T09:09:21.975Z" }