tokenboost-solidity-erc20sale
Version:
Solidity contracts for TokenBoost (ERC20Sale)
1,521 lines (1,520 loc) • 86.4 kB
JSON
{
"contractName": "SaleStrategy",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "_interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "activated",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "InterfaceId_ERC165",
"outputs": [
{
"name": "",
"type": "bytes4"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "InterfaceId_Strategy",
"outputs": [
{
"name": "",
"type": "bytes4"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "sale",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "template",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "InterfaceId_SaleStrategy",
"outputs": [
{
"name": "",
"type": "bytes4"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "InterfaceId_Contract",
"outputs": [
{
"name": "",
"type": "bytes4"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_sale",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
}
],
"name": "OwnershipRenounced",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"constant": false,
"inputs": [],
"name": "activate",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "deactivate",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "started",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "successful",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "finished",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.4.24;\n\nimport \"../Strategy.sol\";\nimport \"../../sale/Sale.sol\";\n\ncontract SaleStrategy is Strategy {\n /**\n * @notice this.owner.selector ^ this.renounceOwnership.selector ^ this.transferOwnership.selector\n ^ this.template.selector ^ this.activate.selector ^ this.deactivate.selector\n ^ this.started.selector ^ this.successful.selector ^ this.finished.selector\n */\n bytes4 public constant InterfaceId_SaleStrategy = 0x04c8123d;\n\n Sale public sale;\n\n constructor(address _owner, Sale _sale) public Strategy(_owner) {\n sale = _sale;\n\n _registerInterface(InterfaceId_SaleStrategy);\n }\n\n modifier whenSaleActivated {\n require(sale.activated());\n _;\n }\n\n modifier whenSaleNotActivated {\n require(!sale.activated());\n _;\n }\n\n function activate() whenSaleNotActivated public returns (bool) {\n return super.activate();\n }\n\n function deactivate() onlyOwner whenSaleNotActivated public returns (bool) {\n activated = false;\n return true;\n }\n\n function started() public view returns (bool);\n\n function successful() public view returns (bool);\n\n function finished() public view returns (bool);\n}\n",
"sourcePath": "tokenboost-solidity/contracts/strategy/sale/SaleStrategy.sol",
"ast": {
"absolutePath": "tokenboost-solidity/contracts/strategy/sale/SaleStrategy.sol",
"exportedSymbols": {
"SaleStrategy": [
2091
]
},
"id": 2092,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1998,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:10"
},
{
"absolutePath": "tokenboost-solidity/contracts/strategy/Strategy.sol",
"file": "../Strategy.sol",
"id": 1999,
"nodeType": "ImportDirective",
"scope": 2092,
"sourceUnit": 1997,
"src": "26:25:10",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "tokenboost-solidity/contracts/sale/Sale.sol",
"file": "../../sale/Sale.sol",
"id": 2000,
"nodeType": "ImportDirective",
"scope": 2092,
"sourceUnit": 1960,
"src": "52:29:10",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 2001,
"name": "Strategy",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1996,
"src": "108:8:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Strategy_$1996",
"typeString": "contract Strategy"
}
},
"id": 2002,
"nodeType": "InheritanceSpecifier",
"src": "108:8:10"
}
],
"contractDependencies": [
1276,
1320,
1996,
5124,
5175,
5355
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 2091,
"linearizedBaseContracts": [
2091,
1996,
1276,
1320,
5175,
5124,
5355
],
"name": "SaleStrategy",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 2005,
"name": "InterfaceId_SaleStrategy",
"nodeType": "VariableDeclaration",
"scope": 2091,
"src": "411:60:10",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2003,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "411:6:10",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"hexValue": "30783034633831323364",
"id": 2004,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "461:10:10",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_80220733_by_1",
"typeString": "int_const 80220733"
},
"value": "0x04c8123d"
},
"visibility": "public"
},
{
"constant": false,
"id": 2007,
"name": "sale",
"nodeType": "VariableDeclaration",
"scope": 2091,
"src": "478:16:10",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Sale_$1959",
"typeString": "contract Sale"
},
"typeName": {
"contractScope": null,
"id": 2006,
"name": "Sale",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1959,
"src": "478:4:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Sale_$1959",
"typeString": "contract Sale"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 2025,
"nodeType": "Block",
"src": "565:84:10",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2019,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2017,
"name": "sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2007,
"src": "575:4:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Sale_$1959",
"typeString": "contract Sale"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2018,
"name": "_sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2011,
"src": "582:5:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Sale_$1959",
"typeString": "contract Sale"
}
},
"src": "575:12:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Sale_$1959",
"typeString": "contract Sale"
}
},
"id": 2020,
"nodeType": "ExpressionStatement",
"src": "575:12:10"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2022,
"name": "InterfaceId_SaleStrategy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2005,
"src": "617:24:10",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 2021,
"name": "_registerInterface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5174,
"src": "598:18:10",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes4_$returns$__$",
"typeString": "function (bytes4)"
}
},
"id": 2023,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "598:44:10",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2024,
"nodeType": "ExpressionStatement",
"src": "598:44:10"
}
]
},
"documentation": null,
"id": 2026,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 2014,
"name": "_owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2009,
"src": "557:6:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 2015,
"modifierName": {
"argumentTypes": null,
"id": 2013,
"name": "Strategy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1996,
"src": "548:8:10",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Strategy_$1996_$",
"typeString": "type(contract Strategy)"
}
},
"nodeType": "ModifierInvocation",
"src": "548:16:10"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2012,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2009,
"name": "_owner",
"nodeType": "VariableDeclaration",
"scope": 2026,
"src": "513:14:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2008,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "513:7:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2011,
"name": "_sale",
"nodeType": "VariableDeclaration",
"scope": 2026,
"src": "529:10:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Sale_$1959",
"typeString": "contract Sale"
},
"typeName": {
"contractScope": null,
"id": 2010,
"name": "Sale",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1959,
"src": "529:4:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Sale_$1959",
"typeString": "contract Sale"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "512:28:10"
},
"payable": false,
"returnParameters": {
"id": 2016,
"nodeType": "ParameterList",
"parameters": [],
"src": "565:0:10"
},
"scope": 2091,
"src": "501:148:10",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2035,
"nodeType": "Block",
"src": "682:53:10",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 2029,
"name": "sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2007,
"src": "700:4:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Sale_$1959",
"typeString": "contract Sale"
}
},
"id": 2030,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "activated",
"nodeType": "MemberAccess",
"referencedDeclaration": 1246,
"src": "700:14:10",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_bool_$",
"typeString": "function () view external returns (bool)"
}
},
"id": 2031,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "700:16:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 2028,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
5448,
5449
],
"referencedDeclaration": 5448,
"src": "692:7:10",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 2032,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "692:25:10",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2033,
"nodeType": "ExpressionStatement",
"src": "692:25:10"
},
{
"id": 2034,
"nodeType": "PlaceholderStatement",
"src": "727:1:10"
}
]
},
"documentation": null,
"id": 2036,
"name": "whenSaleActivated",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 2027,
"nodeType": "ParameterList",
"parameters": [],
"src": "682:0:10"
},
"src": "655:80:10",
"visibility": "internal"
},
{
"body": {
"id": 2046,
"nodeType": "Block",
"src": "771:54:10",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2042,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "789:17:10",
"subExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 2039,
"name": "sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2007,
"src": "790:4:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Sale_$1959",
"typeString": "contract Sale"
}
},
"id": 2040,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "activated",
"nodeType": "MemberAccess",
"referencedDeclaration": 1246,
"src": "790:14:10",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_bool_$",
"typeString": "function () view external returns (bool)"
}
},
"id": 2041,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "790:16:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 2038,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
5448,
5449
],
"referencedDeclaration": 5448,
"src": "781:7:10",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 2043,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "781:26:10",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2044,
"nodeType": "ExpressionStatement",
"src": "781:26:10"
},
{
"id": 2045,
"nodeType": "PlaceholderStatement",
"src": "817:1:10"
}
]
},
"documentation": null,
"id": 2047,
"name": "whenSaleNotActivated",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 2037,
"nodeType": "ParameterList",
"parameters": [],
"src": "771:0:10"
},
"src": "741:84:10",
"visibility": "internal"
},
{
"body": {
"id": 2058,
"nodeType": "Block",
"src": "894:40:10",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 2054,
"name": "super",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5477,
"src": "911:5:10",
"typeDescriptions": {
"typeIdentifier": "t_super$_SaleStrategy_$2091",
"typeString": "contract super SaleStrategy"
}
},
"id": 2055,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "activate",
"nodeType": "MemberAccess",
"referencedDeclaration": 1995,
"src": "911:14:10",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bool_$",
"typeString": "function () returns (bool)"
}
},
"id": 2056,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "911:16:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 2053,
"id": 2057,
"nodeType": "Return",
"src": "904:23:10"
}
]
},
"documentation": null,
"id": 2059,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 2050,
"modifierName": {
"argumentTypes": null,
"id": 2049,
"name": "whenSaleNotActivated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2047,
"src": "851:20:10",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "851:20:10"
}
],
"name": "activate",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2048,
"nodeType": "ParameterList",
"parameters": [],
"src": "848:2:10"
},
"payable": false,
"returnParameters": {
"id": 2053,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2052,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2059,
"src": "888:4:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2051,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "888:4:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "887:6:10"
},
"scope": 2091,
"src": "831:103:10",
"stateMutability": "nonpayable",
"superFunction": 1995,
"visibility": "public"
},
{
"body": {
"id": 2074,
"nodeType": "Block",
"src": "1015:55:10",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2070,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2068,
"name": "activated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1246,
"src": "1025:9:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2069,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1037:5:10",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "1025:17:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2071,
"nodeType": "ExpressionStatement",
"src": "1025:17:10"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2072,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1059:4:10",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2067,
"id": 2073,
"nodeType": "Return",
"src": "1052:11:10"
}
]
},
"documentation": null,
"id": 2075,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 2062,
"modifierName": {
"argumentTypes": null,
"id": 2061,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5303,
"src": "962:9:10",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "962:9:10"
},
{
"arguments": null,
"id": 2064,
"modifierName": {
"argumentTypes": null,
"id": 2063,
"name": "whenSaleNotActivated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2047,
"src": "972:20:10",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "972:20:10"
}
],
"name": "deactivate",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2060,
"nodeType": "ParameterList",
"parameters": [],
"src": "959:2:10"
},
"payable": false,
"returnParameters": {
"id": 2067,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2066,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2075,
"src": "1009:4:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2065,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1009:4:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1008:6:10"
},
"scope": 2091,
"src": "940:130:10",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 2080,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "started",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2076,
"nodeType": "ParameterList",
"parameters": [],
"src": "1092:2:10"
},
"payable": false,
"returnParameters": {
"id": 2079,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2078,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2080,
"src": "1116:4:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2077,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1116:4:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1115:6:10"
},
"scope": 2091,
"src": "1076:46:10",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 2085,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "successful",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2081,
"nodeType": "ParameterList",
"parameters": [],
"src": "1147:2:10"
},
"payable": false,
"returnParameters": {
"id": 2084,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2083,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2085,
"src": "1171:4:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2082,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1171:4:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1170:6:10"
},
"scope": 2091,
"src": "1128:49:10",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 2090,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "finished",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2086,
"nodeType": "ParameterList",
"parameters": [],
"src": "1200:2:10"
},
"payable": false,
"returnParameters": {
"id": 2089,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2088,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2090,
"src": "1224:4:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2087,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1224:4:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1223:6:10"
},
"scope": 2091,
"src": "1183:47:10",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 2092,
"src": "83:1149:10"
}
],
"src": "0:1233:10"
},
"legacyAST": {
"absolutePath": "tokenboost-solidity/contracts/strategy/sale/SaleStrategy.sol",
"exportedSymbols": {
"SaleStrategy": [
2091
]
},
"id": 2092,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1998,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:10"
},
{
"absolutePath": "tokenboost-solidity/contracts/strategy/Strategy.sol",
"file": "../Strategy.sol",
"id": 1999,
"nodeType": "ImportDirective",
"scope": 2092,
"sourceUnit": 1997,
"src": "26:25:10",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "tokenboost-solidity/contracts/sale/Sale.sol",
"file": "../../sale/Sale.sol",
"id": 2000,
"nodeType": "ImportDirective",
"scope": 2092,
"sourceUnit": 1960,
"src": "52:29:10",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 2001,
"name": "Strategy",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1996,
"src": "108:8:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Strategy_$1996",
"typeString": "contract Strategy"
}
},
"id": 2002,
"nodeType": "InheritanceSpecifier",
"src": "108:8:10"
}
],
"contractDependencies": [
1276,
1320,
1996,
5124,
5175,
5355
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 2091,
"linearizedBaseContracts": [
2091,
1996,
1276,
1320,
5175,
5124,
5355
],
"name": "SaleStrategy",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 2005,
"name": "InterfaceId_SaleStrategy",
"nodeType": "VariableDeclaration",
"scope": 2091,
"src": "411:60:10",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2003,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "411:6:10",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"hexValue": "30783034633831323364",
"id": 2004,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "461:10:10",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_80220733_by_1",
"typeString": "int_const 80220733"