UNPKG

@dnextco/tokenboost-solidity-erc223token

Version:

Solidity contracts for TokenBoost (ERC223Token)

818 lines 28.9 kB
{ "contractName": "Activatable", "abi": [ { "constant": true, "inputs": [], "name": "activated", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "activate", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5060cd8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630f15f4c08114604d578063186601ca146073575b600080fd5b348015605857600080fd5b50605f6085565b604080519115158252519081900360200190f35b348015607e57600080fd5b50605f6098565b6000805460ff1916600190811790915590565b60005460ff16815600a165627a7a723058202f24ef30c807e730c11e8d6f25a1560fc5e612dc2b9a082a809483588a2d0cbe0029", "deployedBytecode": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630f15f4c08114604d578063186601ca146073575b600080fd5b348015605857600080fd5b50605f6085565b604080519115158252519081900360200190f35b348015607e57600080fd5b50605f6098565b6000805460ff1916600190811790915590565b60005460ff16815600a165627a7a723058202f24ef30c807e730c11e8d6f25a1560fc5e612dc2b9a082a809483588a2d0cbe0029", "sourceMap": "26:307:21:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:307:21;;;;;;;", "deployedSourceMap": "26:307:21:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;235:96;;8:9:-1;5:2;;;30:1;27;20:12;5:2;235:96:21;;;;;;;;;;;;;;;;;;;;;;53:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;53:21:21;;;;235:96;271:4;287:16;;-1:-1:-1;;287:16:21;299:4;287:16;;;;;;235:96;:::o;53:21::-;;;;;;:::o", "source": "pragma solidity ^0.4.24;\n\ncontract Activatable {\n bool public activated;\n\n modifier whenActivated {\n require(activated);\n _;\n }\n\n modifier whenNotActivated {\n require(!activated);\n _;\n }\n\n function activate() public returns (bool) {\n activated = true;\n return true;\n }\n}\n", "sourcePath": "tokenboost-solidity/contracts/Activatable.sol", "ast": { "absolutePath": "tokenboost-solidity/contracts/Activatable.sol", "exportedSymbols": { "Activatable": [ 3168 ] }, "id": 3169, "nodeType": "SourceUnit", "nodes": [ { "id": 3136, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:21" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 3168, "linearizedBaseContracts": [ 3168 ], "name": "Activatable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3138, "name": "activated", "nodeType": "VariableDeclaration", "scope": 3168, "src": "53:21:21", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3137, "name": "bool", "nodeType": "ElementaryTypeName", "src": "53:4:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "body": { "id": 3145, "nodeType": "Block", "src": "104:46:21", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3141, "name": "activated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3138, "src": "122:9:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 3140, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 7665, 7666 ], "referencedDeclaration": 7665, "src": "114:7:21", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 3142, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "114:18:21", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3143, "nodeType": "ExpressionStatement", "src": "114:18:21" }, { "id": 3144, "nodeType": "PlaceholderStatement", "src": "142:1:21" } ] }, "documentation": null, "id": 3146, "name": "whenActivated", "nodeType": "ModifierDefinition", "parameters": { "id": 3139, "nodeType": "ParameterList", "parameters": [], "src": "104:0:21" }, "src": "81:69:21", "visibility": "internal" }, { "body": { "id": 3154, "nodeType": "Block", "src": "182:47:21", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3150, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "200:10:21", "subExpression": { "argumentTypes": null, "id": 3149, "name": "activated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3138, "src": "201:9:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 3148, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 7665, 7666 ], "referencedDeclaration": 7665, "src": "192:7:21", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 3151, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "192:19:21", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3152, "nodeType": "ExpressionStatement", "src": "192:19:21" }, { "id": 3153, "nodeType": "PlaceholderStatement", "src": "221:1:21" } ] }, "documentation": null, "id": 3155, "name": "whenNotActivated", "nodeType": "ModifierDefinition", "parameters": { "id": 3147, "nodeType": "ParameterList", "parameters": [], "src": "182:0:21" }, "src": "156:73:21", "visibility": "internal" }, { "body": { "id": 3166, "nodeType": "Block", "src": "277:54:21", "statements": [ { "expression": { "argumentTypes": null, "id": 3162, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3160, "name": "activated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3138, "src": "287:9:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 3161, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "299:4:21", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "287:16:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3163, "nodeType": "ExpressionStatement", "src": "287:16:21" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 3164, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "320:4:21", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 3159, "id": 3165, "nodeType": "Return", "src": "313:11:21" } ] }, "documentation": null, "id": 3167, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "activate", "nodeType": "FunctionDefinition", "parameters": { "id": 3156, "nodeType": "ParameterList", "parameters": [], "src": "252:2:21" }, "payable": false, "returnParameters": { "id": 3159, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3158, "name": "", "nodeType": "VariableDeclaration", "scope": 3167, "src": "271:4:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3157, "name": "bool", "nodeType": "ElementaryTypeName", "src": "271:4:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "270:6:21" }, "scope": 3168, "src": "235:96:21", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 3169, "src": "26:307:21" } ], "src": "0:334:21" }, "legacyAST": { "absolutePath": "tokenboost-solidity/contracts/Activatable.sol", "exportedSymbols": { "Activatable": [ 3168 ] }, "id": 3169, "nodeType": "SourceUnit", "nodes": [ { "id": 3136, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:21" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 3168, "linearizedBaseContracts": [ 3168 ], "name": "Activatable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3138, "name": "activated", "nodeType": "VariableDeclaration", "scope": 3168, "src": "53:21:21", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3137, "name": "bool", "nodeType": "ElementaryTypeName", "src": "53:4:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "body": { "id": 3145, "nodeType": "Block", "src": "104:46:21", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3141, "name": "activated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3138, "src": "122:9:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 3140, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 7665, 7666 ], "referencedDeclaration": 7665, "src": "114:7:21", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 3142, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "114:18:21", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3143, "nodeType": "ExpressionStatement", "src": "114:18:21" }, { "id": 3144, "nodeType": "PlaceholderStatement", "src": "142:1:21" } ] }, "documentation": null, "id": 3146, "name": "whenActivated", "nodeType": "ModifierDefinition", "parameters": { "id": 3139, "nodeType": "ParameterList", "parameters": [], "src": "104:0:21" }, "src": "81:69:21", "visibility": "internal" }, { "body": { "id": 3154, "nodeType": "Block", "src": "182:47:21", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3150, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "200:10:21", "subExpression": { "argumentTypes": null, "id": 3149, "name": "activated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3138, "src": "201:9:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 3148, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 7665, 7666 ], "referencedDeclaration": 7665, "src": "192:7:21", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 3151, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "192:19:21", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3152, "nodeType": "ExpressionStatement", "src": "192:19:21" }, { "id": 3153, "nodeType": "PlaceholderStatement", "src": "221:1:21" } ] }, "documentation": null, "id": 3155, "name": "whenNotActivated", "nodeType": "ModifierDefinition", "parameters": { "id": 3147, "nodeType": "ParameterList", "parameters": [], "src": "182:0:21" }, "src": "156:73:21", "visibility": "internal" }, { "body": { "id": 3166, "nodeType": "Block", "src": "277:54:21", "statements": [ { "expression": { "argumentTypes": null, "id": 3162, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3160, "name": "activated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3138, "src": "287:9:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 3161, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "299:4:21", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "287:16:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3163, "nodeType": "ExpressionStatement", "src": "287:16:21" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 3164, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "320:4:21", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 3159, "id": 3165, "nodeType": "Return", "src": "313:11:21" } ] }, "documentation": null, "id": 3167, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "activate", "nodeType": "FunctionDefinition", "parameters": { "id": 3156, "nodeType": "ParameterList", "parameters": [], "src": "252:2:21" }, "payable": false, "returnParameters": { "id": 3159, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3158, "name": "", "nodeType": "VariableDeclaration", "scope": 3167, "src": "271:4:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3157, "name": "bool", "nodeType": "ElementaryTypeName", "src": "271:4:21", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "270:6:21" }, "scope": 3168, "src": "235:96:21", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 3169, "src": "26:307:21" } ], "src": "0:334:21" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2018-10-24T12:40:22.235Z" }