tokenboost-solidity-erc20sale
Version:
Solidity contracts for TokenBoost (ERC20Sale)
1,574 lines (1,573 loc) • 67.3 kB
JSON
{
"contractName": "ERC20SaleStrategy",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "_interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"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"
},
{
"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": "started",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "deactivate",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"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_ERC20SaleStrategy",
"outputs": [
{
"name": "",
"type": "bytes4"
}
],
"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"
},
{
"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": true,
"inputs": [
{
"name": "_purchaser",
"type": "address"
},
{
"name": "_weiAmount",
"type": "uint256"
}
],
"name": "purchasable",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_purchaser",
"type": "address"
},
{
"name": "_weiAmount",
"type": "uint256"
}
],
"name": "tokenRate",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_purchaser",
"type": "address"
},
{
"name": "_tokenAmount",
"type": "uint256"
}
],
"name": "supplyTokens",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_purchaser",
"type": "address"
},
{
"name": "_tokenAmount",
"type": "uint256"
}
],
"name": "receivesTokens",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.4.24;\n\nimport \"tokenboost-solidity/contracts/strategy/sale/SaleStrategy.sol\";\nimport \"../../../sale/erc20/ERC20Sale.sol\";\n\ncontract ERC20SaleStrategy is SaleStrategy {\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 ^ this.purchasable.selector ^ this.tokenRate.selector ^ this.supplyTokens.selector\n ^ this.receivesTokens.selector\n */\n bytes4 public constant InterfaceId_ERC20SaleStrategy = 0xa0d0304b;\n\n ERC20Sale public sale;\n\n constructor(address _owner, ERC20Sale _sale) public SaleStrategy(_owner, _sale) {\n sale = _sale;\n\n _registerInterface(InterfaceId_ERC20SaleStrategy);\n }\n\n function purchasable(address _purchaser, uint256 _weiAmount) public view returns (bool);\n\n function tokenRate(address _purchaser, uint256 _weiAmount) public view returns (uint256);\n\n function supplyTokens(address _purchaser, uint256 _tokenAmount) public returns (bool);\n\n function receivesTokens(address _purchaser, uint256 _tokenAmount) public returns (bool);\n}\n",
"sourcePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity-erc20sale/contracts/strategy/sale/erc20/ERC20SaleStrategy.sol",
"ast": {
"absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity-erc20sale/contracts/strategy/sale/erc20/ERC20SaleStrategy.sol",
"exportedSymbols": {
"ERC20SaleStrategy": [
1242
]
},
"id": 1243,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1176,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:5"
},
{
"absolutePath": "tokenboost-solidity/contracts/strategy/sale/SaleStrategy.sol",
"file": "tokenboost-solidity/contracts/strategy/sale/SaleStrategy.sol",
"id": 1177,
"nodeType": "ImportDirective",
"scope": 1243,
"sourceUnit": 2092,
"src": "26:70:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity-erc20sale/contracts/sale/erc20/ERC20Sale.sol",
"file": "../../../sale/erc20/ERC20Sale.sol",
"id": 1178,
"nodeType": "ImportDirective",
"scope": 1243,
"sourceUnit": 387,
"src": "97:43:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1179,
"name": "SaleStrategy",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2091,
"src": "172:12:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SaleStrategy_$2091",
"typeString": "contract SaleStrategy"
}
},
"id": 1180,
"nodeType": "InheritanceSpecifier",
"src": "172:12:5"
}
],
"contractDependencies": [
1276,
1320,
1996,
2091,
5124,
5175,
5355
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 1242,
"linearizedBaseContracts": [
1242,
2091,
1996,
1276,
1320,
5175,
5124,
5355
],
"name": "ERC20SaleStrategy",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 1183,
"name": "InterfaceId_ERC20SaleStrategy",
"nodeType": "VariableDeclaration",
"scope": 1242,
"src": "609:65:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 1181,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "609:6:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"hexValue": "30786130643033303462",
"id": 1182,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "664:10:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2697998411_by_1",
"typeString": "int_const 2697998411"
},
"value": "0xa0d0304b"
},
"visibility": "public"
},
{
"constant": false,
"id": 1185,
"name": "sale",
"nodeType": "VariableDeclaration",
"scope": 1242,
"src": "681:21:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
},
"typeName": {
"contractScope": null,
"id": 1184,
"name": "ERC20Sale",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 386,
"src": "681:9:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1204,
"nodeType": "Block",
"src": "789:89:5",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1198,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1196,
"name": "sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1185,
"src": "799:4:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1197,
"name": "_sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1189,
"src": "806:5:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
},
"src": "799:12:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
},
"id": 1199,
"nodeType": "ExpressionStatement",
"src": "799:12:5"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1201,
"name": "InterfaceId_ERC20SaleStrategy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1183,
"src": "841:29:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 1200,
"name": "_registerInterface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5174,
"src": "822:18:5",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes4_$returns$__$",
"typeString": "function (bytes4)"
}
},
"id": 1202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "822:49:5",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1203,
"nodeType": "ExpressionStatement",
"src": "822:49:5"
}
]
},
"documentation": null,
"id": 1205,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 1192,
"name": "_owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1187,
"src": "774:6:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1193,
"name": "_sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1189,
"src": "782:5:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
}
],
"id": 1194,
"modifierName": {
"argumentTypes": null,
"id": 1191,
"name": "SaleStrategy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2091,
"src": "761:12:5",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SaleStrategy_$2091_$",
"typeString": "type(contract SaleStrategy)"
}
},
"nodeType": "ModifierInvocation",
"src": "761:27:5"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1190,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1187,
"name": "_owner",
"nodeType": "VariableDeclaration",
"scope": 1205,
"src": "721:14:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1186,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "721:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1189,
"name": "_sale",
"nodeType": "VariableDeclaration",
"scope": 1205,
"src": "737:15:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
},
"typeName": {
"contractScope": null,
"id": 1188,
"name": "ERC20Sale",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 386,
"src": "737:9:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "720:33:5"
},
"payable": false,
"returnParameters": {
"id": 1195,
"nodeType": "ParameterList",
"parameters": [],
"src": "789:0:5"
},
"scope": 1242,
"src": "709:169:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 1214,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "purchasable",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1210,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1207,
"name": "_purchaser",
"nodeType": "VariableDeclaration",
"scope": 1214,
"src": "905:18:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1206,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "905:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1209,
"name": "_weiAmount",
"nodeType": "VariableDeclaration",
"scope": 1214,
"src": "925:18:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1208,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "925:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "904:40:5"
},
"payable": false,
"returnParameters": {
"id": 1213,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1212,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1214,
"src": "966:4:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1211,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "966:4:5",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "965:6:5"
},
"scope": 1242,
"src": "884:88:5",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 1223,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "tokenRate",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1219,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1216,
"name": "_purchaser",
"nodeType": "VariableDeclaration",
"scope": 1223,
"src": "997:18:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1215,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "997:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1218,
"name": "_weiAmount",
"nodeType": "VariableDeclaration",
"scope": 1223,
"src": "1017:18:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1217,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1017:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "996:40:5"
},
"payable": false,
"returnParameters": {
"id": 1222,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1221,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1223,
"src": "1058:7:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1220,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1058:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1057:9:5"
},
"scope": 1242,
"src": "978:89:5",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 1232,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "supplyTokens",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1228,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1225,
"name": "_purchaser",
"nodeType": "VariableDeclaration",
"scope": 1232,
"src": "1095:18:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1224,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1095:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1227,
"name": "_tokenAmount",
"nodeType": "VariableDeclaration",
"scope": 1232,
"src": "1115:20:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1226,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1115:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1094:42:5"
},
"payable": false,
"returnParameters": {
"id": 1231,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1230,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1232,
"src": "1153:4:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1229,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1153:4:5",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1152:6:5"
},
"scope": 1242,
"src": "1073:86:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 1241,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "receivesTokens",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1237,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1234,
"name": "_purchaser",
"nodeType": "VariableDeclaration",
"scope": 1241,
"src": "1189:18:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1233,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1189:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1236,
"name": "_tokenAmount",
"nodeType": "VariableDeclaration",
"scope": 1241,
"src": "1209:20:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1235,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1209:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1188:42:5"
},
"payable": false,
"returnParameters": {
"id": 1240,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1239,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1241,
"src": "1247:4:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1238,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1247:4:5",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1246:6:5"
},
"scope": 1242,
"src": "1165:88:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1243,
"src": "142:1113:5"
}
],
"src": "0:1256:5"
},
"legacyAST": {
"absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity-erc20sale/contracts/strategy/sale/erc20/ERC20SaleStrategy.sol",
"exportedSymbols": {
"ERC20SaleStrategy": [
1242
]
},
"id": 1243,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1176,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:5"
},
{
"absolutePath": "tokenboost-solidity/contracts/strategy/sale/SaleStrategy.sol",
"file": "tokenboost-solidity/contracts/strategy/sale/SaleStrategy.sol",
"id": 1177,
"nodeType": "ImportDirective",
"scope": 1243,
"sourceUnit": 2092,
"src": "26:70:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity-erc20sale/contracts/sale/erc20/ERC20Sale.sol",
"file": "../../../sale/erc20/ERC20Sale.sol",
"id": 1178,
"nodeType": "ImportDirective",
"scope": 1243,
"sourceUnit": 387,
"src": "97:43:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1179,
"name": "SaleStrategy",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2091,
"src": "172:12:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SaleStrategy_$2091",
"typeString": "contract SaleStrategy"
}
},
"id": 1180,
"nodeType": "InheritanceSpecifier",
"src": "172:12:5"
}
],
"contractDependencies": [
1276,
1320,
1996,
2091,
5124,
5175,
5355
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 1242,
"linearizedBaseContracts": [
1242,
2091,
1996,
1276,
1320,
5175,
5124,
5355
],
"name": "ERC20SaleStrategy",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 1183,
"name": "InterfaceId_ERC20SaleStrategy",
"nodeType": "VariableDeclaration",
"scope": 1242,
"src": "609:65:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 1181,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "609:6:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"hexValue": "30786130643033303462",
"id": 1182,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "664:10:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2697998411_by_1",
"typeString": "int_const 2697998411"
},
"value": "0xa0d0304b"
},
"visibility": "public"
},
{
"constant": false,
"id": 1185,
"name": "sale",
"nodeType": "VariableDeclaration",
"scope": 1242,
"src": "681:21:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
},
"typeName": {
"contractScope": null,
"id": 1184,
"name": "ERC20Sale",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 386,
"src": "681:9:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1204,
"nodeType": "Block",
"src": "789:89:5",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1198,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1196,
"name": "sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1185,
"src": "799:4:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1197,
"name": "_sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1189,
"src": "806:5:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
},
"src": "799:12:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
},
"id": 1199,
"nodeType": "ExpressionStatement",
"src": "799:12:5"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1201,
"name": "InterfaceId_ERC20SaleStrategy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1183,
"src": "841:29:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 1200,
"name": "_registerInterface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5174,
"src": "822:18:5",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes4_$returns$__$",
"typeString": "function (bytes4)"
}
},
"id": 1202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "822:49:5",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1203,
"nodeType": "ExpressionStatement",
"src": "822:49:5"
}
]
},
"documentation": null,
"id": 1205,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 1192,
"name": "_owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1187,
"src": "774:6:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1193,
"name": "_sale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1189,
"src": "782:5:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Sale_$386",
"typeString": "contract ERC20Sale"
}
}
],
"id": 1194,
"modifierName": {
"argumentTypes": null,
"id": 1191,
"name": "SaleStrategy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2091,
"src": "761:12:5",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_SaleStrategy_$2091_$",
"typeString": "type(contract SaleStrategy)"
}
},
"nodeType": "ModifierInvocation",
"src": "761:27:5"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1190,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1187,
"name": "_owner",
"nodeType": "VariableDeclaration",
"scope": 1205,
"src": "721:14:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1186,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "721:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",