tokenboost-solidity-erc20sale
Version:
Solidity contracts for TokenBoost (ERC20Sale)
818 lines • 28.9 kB
JSON
{
"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:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:307:6;;;;;;;",
"deployedSourceMap": "26:307:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;235:96;;8:9:-1;5:2;;;30:1;27;20:12;5:2;235:96:6;;;;;;;;;;;;;;;;;;;;;;53:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;53:21:6;;;;235:96;271:4;287:16;;-1:-1:-1;;287:16:6;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": [
1276
]
},
"id": 1277,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1244,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:6"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1276,
"linearizedBaseContracts": [
1276
],
"name": "Activatable",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1246,
"name": "activated",
"nodeType": "VariableDeclaration",
"scope": 1276,
"src": "53:21:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1245,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "53:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1253,
"nodeType": "Block",
"src": "104:46:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1249,
"name": "activated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1246,
"src": "122:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1248,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
5448,
5449
],
"referencedDeclaration": 5448,
"src": "114:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1250,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "114:18:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1251,
"nodeType": "ExpressionStatement",
"src": "114:18:6"
},
{
"id": 1252,
"nodeType": "PlaceholderStatement",
"src": "142:1:6"
}
]
},
"documentation": null,
"id": 1254,
"name": "whenActivated",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1247,
"nodeType": "ParameterList",
"parameters": [],
"src": "104:0:6"
},
"src": "81:69:6",
"visibility": "internal"
},
{
"body": {
"id": 1262,
"nodeType": "Block",
"src": "182:47:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1258,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "200:10:6",
"subExpression": {
"argumentTypes": null,
"id": 1257,
"name": "activated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1246,
"src": "201:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1256,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
5448,
5449
],
"referencedDeclaration": 5448,
"src": "192:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1259,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "192:19:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1260,
"nodeType": "ExpressionStatement",
"src": "192:19:6"
},
{
"id": 1261,
"nodeType": "PlaceholderStatement",
"src": "221:1:6"
}
]
},
"documentation": null,
"id": 1263,
"name": "whenNotActivated",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1255,
"nodeType": "ParameterList",
"parameters": [],
"src": "182:0:6"
},
"src": "156:73:6",
"visibility": "internal"
},
{
"body": {
"id": 1274,
"nodeType": "Block",
"src": "277:54:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1268,
"name": "activated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1246,
"src": "287:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1269,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "299:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "287:16:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1271,
"nodeType": "ExpressionStatement",
"src": "287:16:6"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1272,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "320:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1267,
"id": 1273,
"nodeType": "Return",
"src": "313:11:6"
}
]
},
"documentation": null,
"id": 1275,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "activate",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1264,
"nodeType": "ParameterList",
"parameters": [],
"src": "252:2:6"
},
"payable": false,
"returnParameters": {
"id": 1267,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1266,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1275,
"src": "271:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1265,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "271:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "270:6:6"
},
"scope": 1276,
"src": "235:96:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1277,
"src": "26:307:6"
}
],
"src": "0:334:6"
},
"legacyAST": {
"absolutePath": "tokenboost-solidity/contracts/Activatable.sol",
"exportedSymbols": {
"Activatable": [
1276
]
},
"id": 1277,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1244,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:6"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1276,
"linearizedBaseContracts": [
1276
],
"name": "Activatable",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1246,
"name": "activated",
"nodeType": "VariableDeclaration",
"scope": 1276,
"src": "53:21:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1245,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "53:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1253,
"nodeType": "Block",
"src": "104:46:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1249,
"name": "activated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1246,
"src": "122:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1248,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
5448,
5449
],
"referencedDeclaration": 5448,
"src": "114:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1250,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "114:18:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1251,
"nodeType": "ExpressionStatement",
"src": "114:18:6"
},
{
"id": 1252,
"nodeType": "PlaceholderStatement",
"src": "142:1:6"
}
]
},
"documentation": null,
"id": 1254,
"name": "whenActivated",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1247,
"nodeType": "ParameterList",
"parameters": [],
"src": "104:0:6"
},
"src": "81:69:6",
"visibility": "internal"
},
{
"body": {
"id": 1262,
"nodeType": "Block",
"src": "182:47:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1258,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "200:10:6",
"subExpression": {
"argumentTypes": null,
"id": 1257,
"name": "activated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1246,
"src": "201:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1256,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
5448,
5449
],
"referencedDeclaration": 5448,
"src": "192:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1259,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "192:19:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1260,
"nodeType": "ExpressionStatement",
"src": "192:19:6"
},
{
"id": 1261,
"nodeType": "PlaceholderStatement",
"src": "221:1:6"
}
]
},
"documentation": null,
"id": 1263,
"name": "whenNotActivated",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1255,
"nodeType": "ParameterList",
"parameters": [],
"src": "182:0:6"
},
"src": "156:73:6",
"visibility": "internal"
},
{
"body": {
"id": 1274,
"nodeType": "Block",
"src": "277:54:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1268,
"name": "activated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1246,
"src": "287:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1269,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "299:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "287:16:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1271,
"nodeType": "ExpressionStatement",
"src": "287:16:6"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1272,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "320:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1267,
"id": 1273,
"nodeType": "Return",
"src": "313:11:6"
}
]
},
"documentation": null,
"id": 1275,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "activate",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1264,
"nodeType": "ParameterList",
"parameters": [],
"src": "252:2:6"
},
"payable": false,
"returnParameters": {
"id": 1267,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1266,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1275,
"src": "271:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1265,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "271:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "270:6:6"
},
"scope": 1276,
"src": "235:96:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1277,
"src": "26:307:6"
}
],
"src": "0:334:6"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2018-11-01T09:01:02.374Z"
}