7909 lines
316 KiB
JSON
7909 lines
316 KiB
JSON
{
|
|
"contractName": "Ownable",
|
|
"abi": [
|
|
{
|
|
"inputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "constructor"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "previousOwner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "newOwner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "OwnershipTransferred",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "owner",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address payable",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "isOwner",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"inputs": [],
|
|
"name": "renounceOwnership",
|
|
"outputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"inputs": [
|
|
{
|
|
"internalType": "address payable",
|
|
"name": "newOwner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"outputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The reason using this instead of openzeppelin, because owner are not 'payable'\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the deployer as the initial owner.\"},\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/p1r0/dcc/contracts/DECA_ERC20_0.5.3.sol\":\"Ownable\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/p1r0/dcc/contracts/DECA_ERC20_0.5.3.sol\":{\"keccak256\":\"0x983d3fd7bb6ff94fa16420ddf775c6daf65f78bb853e58b5899fcddf810136b1\",\"urls\":[\"bzz-raw://a35a43ea4796aa5c34758af0b49fec20c9d3f5e5deccc3dd83b87ce408e118c3\",\"dweb:/ipfs/QmQMeMbFEF4CwdZy2FQEyibYW7Vw1idqbepAVKtMdRoTuf\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzz-raw://216ef9d6b614db4eb46970b4e84903f2534a45572dd30a79f0041f1a5830f436\",\"dweb:/ipfs/QmNPrJ4MWKUAWzKXpUqeyKRUfosaoANZAqXgvepdrCwZAG\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x65a4078c03875c25413a068ce9cfdd7e68a90f8786612d1189c89341e6e3b802\",\"urls\":[\"bzz-raw://45c0d95495b944fbb1aa09d900b0ab530903a432125ab8fddfa05064a7988991\",\"dweb:/ipfs/Qma2VeknkKA1THeubGzshWFk44BktXkXP1UKp9Un2uDSsu\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzz-raw://59fd025151435da35faa8093a5c7a17de02de9d08ad27275c5cdf05050820d91\",\"dweb:/ipfs/QmQMvwEcPhoRXzbXyrdoeRtvLoifUW9Qh7Luho7bmUPRkc\"]}},\"version\":1}",
|
|
"bytecode": "0x",
|
|
"deployedBytecode": "0x",
|
|
"sourceMap": "",
|
|
"deployedSourceMap": "",
|
|
"source": "pragma solidity 0.5.12;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\n// ----------------------------------------------------------------------------\n// 'DECA' DEcentralized CArbon tokens - ITDE (initial token distribution event)\n//\n// Deployed to : ------\n// Network : Ropsten\n// Symbol : DECA\n// Name : DEcentralized CArbon tokens\n// Total supply: Gazillion\n// Decimals : 18\n// \n// Designed and wrote by D. Perez Negron <david@neetsec.com> A.K.A p1r0\n// Test and Migrations to truffle by vitaliykuzmich\n// ----------------------------------------------------------------------------\n/**\n * @dev The reason using this instead of openzeppelin, because owner are not 'payable'\n */\ncontract Ownable is Context {\n address payable private _owner;\n using SafeMath for uint256;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address payable) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address payable newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address payable newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// ----------------------------------------------------------------------------\n// ERC20 Token, with the addition of symbol, name and decimals and assisted\n// token transfers\n// ----------------------------------------------------------------------------\ncontract DECAToken is ERC20, Ownable {\n using SafeMath for uint256;\n string constant public symbol = \"DECA\";\n string constant public name = \"DEcentralized CArbon tokens\";\n uint8 constant public decimals = 18;\n //for testing change weeks for hours...\n uint public preICOEnds = now + 1 weeks;\n uint public bonus1Ends = now + 3 weeks;\n uint public bonus2Ends = now + 6 weeks;\n uint public endDate = now + 11 weeks;\n // ------------------------------------------------------------------------\n // 100 DECA Tokens per 1 ETH\n // ------------------------------------------------------------------------\n function() external payable {\n require(now <= endDate);\n uint tokens;\n uint toOwner;\n uint toSender;\n uint divBy;\n\n divBy = 40; //2.5% extra printed to be 2% of the marketcap, please see README.md\n if (now <= preICOEnds) {\n tokens = msg.value * 200;\n } else if (now > preICOEnds && now <= bonus1Ends) {\n tokens = msg.value * 150;\n } else if (now > bonus1Ends && now <= bonus2Ends) {\n tokens = msg.value * 125;\n } else {\n tokens = msg.value * 100;\n }\n\n toOwner = tokens.div(divBy);\n //created 2.5% extra to the contract owner to approach 2% total marketcap\n toSender = tokens;\n //tokens that goes to the sender\n\n _mint(owner(), toOwner);\n _mint(msg.sender, toSender);\n }\n\n //Close down the ICO and claim the Ether.\n function getETH() public onlyOwner {\n require(now >= endDate);\n // transfer the ETH balance in the contract to the owner\n owner().transfer(address(this).balance);\n }\n\n // ------------------------------------------------------------------------\n // Owner can transfer out any accidentally sent ERC20 tokens\n // ------------------------------------------------------------------------\n function transferAnyERC20Token(address payable tokenAddress, uint tokens) public onlyOwner returns (bool success) {\n return IERC20(tokenAddress).transfer(owner(), tokens);\n }\n}\n",
|
|
"sourcePath": "/home/p1r0/dcc/contracts/DECA_ERC20_0.5.3.sol",
|
|
"ast": {
|
|
"absolutePath": "/home/p1r0/dcc/contracts/DECA_ERC20_0.5.3.sol",
|
|
"exportedSymbols": {
|
|
"DECAToken": [
|
|
297
|
|
],
|
|
"Ownable": [
|
|
117
|
|
]
|
|
},
|
|
"id": 298,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"0.5",
|
|
".12"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:0"
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
|
|
"file": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
|
|
"id": 2,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 298,
|
|
"sourceUnit": 974,
|
|
"src": "25:55:0",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
|
|
"file": "@openzeppelin/contracts/math/SafeMath.sol",
|
|
"id": 3,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 298,
|
|
"sourceUnit": 569,
|
|
"src": "81:51:0",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 4,
|
|
"name": "Context",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 381,
|
|
"src": "782:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Context_$381",
|
|
"typeString": "contract Context"
|
|
}
|
|
},
|
|
"id": 5,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "782:7:0"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
381
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": "@dev The reason using this instead of openzeppelin, because owner are not 'payable'",
|
|
"fullyImplemented": true,
|
|
"id": 117,
|
|
"linearizedBaseContracts": [
|
|
117,
|
|
381
|
|
],
|
|
"name": "Ownable",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"id": 7,
|
|
"name": "_owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 117,
|
|
"src": "796:30:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 6,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "796:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"id": 10,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 8,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 568,
|
|
"src": "838:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$568",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "832:27:0",
|
|
"typeName": {
|
|
"id": 9,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "851:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 16,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 15,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 12,
|
|
"indexed": true,
|
|
"name": "previousOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 16,
|
|
"src": "892:29:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 11,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "892:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 14,
|
|
"indexed": true,
|
|
"name": "newOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 16,
|
|
"src": "923:24:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "923:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "891:57:0"
|
|
},
|
|
"src": "865:84:0"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 31,
|
|
"nodeType": "Block",
|
|
"src": "1075:93:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 22,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 19,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1085:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 20,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 369,
|
|
"src": "1094:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 21,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1094:12:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "1085:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 23,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1085:21:0"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 26,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1150:1:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 25,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1142:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 27,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1142:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 28,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1154:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 24,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 16,
|
|
"src": "1121:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 29,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1121:40:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 30,
|
|
"nodeType": "EmitStatement",
|
|
"src": "1116:45:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Initializes the contract setting the deployer as the initial owner.",
|
|
"id": 32,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 17,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1063:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 18,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1075:0:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "1051:117:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 39,
|
|
"nodeType": "Block",
|
|
"src": "1299:30:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 37,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1316:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"functionReturnParameters": 36,
|
|
"id": 38,
|
|
"nodeType": "Return",
|
|
"src": "1309:13:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Returns the address of the current owner.",
|
|
"id": 40,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "owner",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 33,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1258:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 36,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 35,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 40,
|
|
"src": "1282:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 34,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1282:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1281:17:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "1244:85:0",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 49,
|
|
"nodeType": "Block",
|
|
"src": "1438:82:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 43,
|
|
"name": "isOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 61,
|
|
"src": "1456:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
|
|
"typeString": "function () view returns (bool)"
|
|
}
|
|
},
|
|
"id": 44,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1456:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
|
|
"id": 45,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1467:34:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe",
|
|
"typeString": "literal_string \"Ownable: caller is not the owner\""
|
|
},
|
|
"value": "Ownable: caller is not the owner"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe",
|
|
"typeString": "literal_string \"Ownable: caller is not the owner\""
|
|
}
|
|
],
|
|
"id": 42,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1060,
|
|
1061
|
|
],
|
|
"referencedDeclaration": 1061,
|
|
"src": "1448:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 46,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1448:54:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 47,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1448:54:0"
|
|
},
|
|
{
|
|
"id": 48,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1512:1:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Throws if called by any account other than the owner.",
|
|
"id": 50,
|
|
"name": "onlyOwner",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 41,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1435:2:0"
|
|
},
|
|
"src": "1417:103:0",
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 60,
|
|
"nodeType": "Block",
|
|
"src": "1649:46:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"id": 58,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 55,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 369,
|
|
"src": "1666:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 56,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1666:12:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 57,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1682:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "1666:22:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 54,
|
|
"id": 59,
|
|
"nodeType": "Return",
|
|
"src": "1659:29:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Returns true if the caller is the current owner.",
|
|
"id": 61,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "isOwner",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 51,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1619:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 54,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 53,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 61,
|
|
"src": "1643:4:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 52,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1643:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1642:6:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "1603:92:0",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 79,
|
|
"nodeType": "Block",
|
|
"src": "2083:91:0",
|
|
"statements": [
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 67,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2119:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 69,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2135:1:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 68,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2127:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 70,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2127:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 66,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 16,
|
|
"src": "2098:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 71,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2098:40:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 72,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2093:45:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 77,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 73,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2148:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 75,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2165:1:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 74,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2157:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 76,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2157:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "2148:19:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 78,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2148:19:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.",
|
|
"id": 80,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 64,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 63,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 50,
|
|
"src": "2073:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2073:9:0"
|
|
}
|
|
],
|
|
"name": "renounceOwnership",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 62,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2063:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 65,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2083:0:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "2037:137:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 91,
|
|
"nodeType": "Block",
|
|
"src": "2393:45:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 88,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 82,
|
|
"src": "2422:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 87,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 116,
|
|
"src": "2403:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$returns$__$",
|
|
"typeString": "function (address payable)"
|
|
}
|
|
},
|
|
"id": 89,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2403:28:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 90,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2403:28:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.",
|
|
"id": 92,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 85,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 84,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 50,
|
|
"src": "2383:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2383:9:0"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 83,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 82,
|
|
"name": "newOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 92,
|
|
"src": "2350:24:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 81,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2350:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2349:26:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 86,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2393:0:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "2323:115:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 115,
|
|
"nodeType": "Block",
|
|
"src": "2602:170:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"id": 102,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 98,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 94,
|
|
"src": "2620:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 100,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2640:1:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 99,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2632:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 101,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2632:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "2620:22:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373",
|
|
"id": 103,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2644:40:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe",
|
|
"typeString": "literal_string \"Ownable: new owner is the zero address\""
|
|
},
|
|
"value": "Ownable: new owner is the zero address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe",
|
|
"typeString": "literal_string \"Ownable: new owner is the zero address\""
|
|
}
|
|
],
|
|
"id": 97,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1060,
|
|
1061
|
|
],
|
|
"referencedDeclaration": 1061,
|
|
"src": "2612:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 104,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2612:73:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 105,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2612:73:0"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 107,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2721:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 108,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 94,
|
|
"src": "2729:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 106,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 16,
|
|
"src": "2700:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 109,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2700:38:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 110,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2695:43:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 113,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 111,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2748:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 112,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 94,
|
|
"src": "2757:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "2748:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 114,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2748:17:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).",
|
|
"id": 116,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_transferOwnership",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 95,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 94,
|
|
"name": "newOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 116,
|
|
"src": "2567:24:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 93,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2567:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2566:26:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 96,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2602:0:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "2539:233:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 298,
|
|
"src": "762:2012:0"
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 118,
|
|
"name": "ERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 973,
|
|
"src": "3053:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$973",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"id": 119,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "3053:5:0"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 120,
|
|
"name": "Ownable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 117,
|
|
"src": "3060:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Ownable_$117",
|
|
"typeString": "contract Ownable"
|
|
}
|
|
},
|
|
"id": 121,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "3060:7:0"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
117,
|
|
381,
|
|
973,
|
|
1042
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 297,
|
|
"linearizedBaseContracts": [
|
|
297,
|
|
117,
|
|
973,
|
|
1042,
|
|
381
|
|
],
|
|
"name": "DECAToken",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 124,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 122,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 568,
|
|
"src": "3080:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$568",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "3074:27:0",
|
|
"typeName": {
|
|
"id": 123,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3093:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 127,
|
|
"name": "symbol",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3106:38:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 125,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3106:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "44454341",
|
|
"id": 126,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3138:6:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a49565813a43765a9dfdf315aaa77336d9844a752bb9a788d2dad0f019de1858",
|
|
"typeString": "literal_string \"DECA\""
|
|
},
|
|
"value": "DECA"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 130,
|
|
"name": "name",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3150:59:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 128,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3150:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "444563656e7472616c697a656420434172626f6e20746f6b656e73",
|
|
"id": 129,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3180:29:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a71fc6dd39cdb20c976c32b6365d2e473e0bcd38ac1af23f856facc675f989cb",
|
|
"typeString": "literal_string \"DEcentralized CArbon tokens\""
|
|
},
|
|
"value": "DEcentralized CArbon tokens"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 133,
|
|
"name": "decimals",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3215:35:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 131,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3215:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3138",
|
|
"id": 132,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3248:2:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_18_by_1",
|
|
"typeString": "int_const 18"
|
|
},
|
|
"value": "18"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 138,
|
|
"name": "preICOEnds",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3300:38:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 134,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3300:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 137,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 135,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3325:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 136,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3331:7:0",
|
|
"subdenomination": "weeks",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_604800_by_1",
|
|
"typeString": "int_const 604800"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "3325:13:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 143,
|
|
"name": "bonus1Ends",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3344:38:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 139,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3344:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 142,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 140,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3369:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "33",
|
|
"id": 141,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3375:7:0",
|
|
"subdenomination": "weeks",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1814400_by_1",
|
|
"typeString": "int_const 1814400"
|
|
},
|
|
"value": "3"
|
|
},
|
|
"src": "3369:13:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 148,
|
|
"name": "bonus2Ends",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3388:38:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 144,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3388:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 147,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 145,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3413:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "36",
|
|
"id": 146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3419:7:0",
|
|
"subdenomination": "weeks",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_3628800_by_1",
|
|
"typeString": "int_const 3628800"
|
|
},
|
|
"value": "6"
|
|
},
|
|
"src": "3413:13:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 153,
|
|
"name": "endDate",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3432:36:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 149,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3432:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 152,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 150,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3454:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3131",
|
|
"id": 151,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3460:8:0",
|
|
"subdenomination": "weeks",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_6652800_by_1",
|
|
"typeString": "int_const 6652800"
|
|
},
|
|
"value": "11"
|
|
},
|
|
"src": "3454:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 253,
|
|
"nodeType": "Block",
|
|
"src": "3695:807:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 159,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 157,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3713:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 158,
|
|
"name": "endDate",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 153,
|
|
"src": "3720:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3713:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 156,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1060,
|
|
1061
|
|
],
|
|
"referencedDeclaration": 1060,
|
|
"src": "3705:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 160,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3705:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 161,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3705:23:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
163
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 163,
|
|
"name": "tokens",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 253,
|
|
"src": "3738:11:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 162,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3738:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 164,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3738:11:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
166
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 166,
|
|
"name": "toOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 253,
|
|
"src": "3759:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 165,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3759:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 167,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3759:12:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
169
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 169,
|
|
"name": "toSender",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 253,
|
|
"src": "3781:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 168,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3781:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 170,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3781:13:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
172
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 172,
|
|
"name": "divBy",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 253,
|
|
"src": "3804:10:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 171,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3804:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 173,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3804:10:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 176,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 174,
|
|
"name": "divBy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 172,
|
|
"src": "3825:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3430",
|
|
"id": 175,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3833:2:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_40_by_1",
|
|
"typeString": "int_const 40"
|
|
},
|
|
"value": "40"
|
|
},
|
|
"src": "3825:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 177,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3825:10:0"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 180,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 178,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3918:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 179,
|
|
"name": "preICOEnds",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 138,
|
|
"src": "3925:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3918:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 195,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 191,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 189,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3996:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 190,
|
|
"name": "preICOEnds",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 138,
|
|
"src": "4002:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3996:16:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 194,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 192,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "4016:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 193,
|
|
"name": "bonus1Ends",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 143,
|
|
"src": "4023:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4016:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "3996:37:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 210,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 206,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 204,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "4094:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 205,
|
|
"name": "bonus1Ends",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 143,
|
|
"src": "4100:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4094:16:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 209,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 207,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "4114:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 208,
|
|
"name": "bonus2Ends",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 148,
|
|
"src": "4121:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4114:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "4094:37:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 226,
|
|
"nodeType": "Block",
|
|
"src": "4188:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 224,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 219,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4202:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 223,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 220,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "4211:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 221,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4211:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "313030",
|
|
"id": 222,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4223:3:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100_by_1",
|
|
"typeString": "int_const 100"
|
|
},
|
|
"value": "100"
|
|
},
|
|
"src": "4211:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4202:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 225,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4202:24:0"
|
|
}
|
|
]
|
|
},
|
|
"id": 227,
|
|
"nodeType": "IfStatement",
|
|
"src": "4090:147:0",
|
|
"trueBody": {
|
|
"id": 218,
|
|
"nodeType": "Block",
|
|
"src": "4133:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 216,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 211,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4147:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 215,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 212,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "4156:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 213,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4156:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "313235",
|
|
"id": 214,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4168:3:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_125_by_1",
|
|
"typeString": "int_const 125"
|
|
},
|
|
"value": "125"
|
|
},
|
|
"src": "4156:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4147:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 217,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4147:24:0"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 228,
|
|
"nodeType": "IfStatement",
|
|
"src": "3992:245:0",
|
|
"trueBody": {
|
|
"id": 203,
|
|
"nodeType": "Block",
|
|
"src": "4035:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 201,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 196,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4049:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 200,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 197,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "4058:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 198,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4058:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "313530",
|
|
"id": 199,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4070:3:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_150_by_1",
|
|
"typeString": "int_const 150"
|
|
},
|
|
"value": "150"
|
|
},
|
|
"src": "4058:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4049:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 202,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4049:24:0"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 229,
|
|
"nodeType": "IfStatement",
|
|
"src": "3914:323:0",
|
|
"trueBody": {
|
|
"id": 188,
|
|
"nodeType": "Block",
|
|
"src": "3937:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 186,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 181,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "3951:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 185,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 182,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "3960:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 183,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3960:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "323030",
|
|
"id": 184,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3972:3:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_200_by_1",
|
|
"typeString": "int_const 200"
|
|
},
|
|
"value": "200"
|
|
},
|
|
"src": "3960:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3951:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 187,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3951:24:0"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 235,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 230,
|
|
"name": "toOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 166,
|
|
"src": "4247:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 233,
|
|
"name": "divBy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 172,
|
|
"src": "4268:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 231,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4257:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 232,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "div",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 501,
|
|
"src": "4257:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 234,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4257:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4247:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 236,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4247:27:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 239,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 237,
|
|
"name": "toSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 169,
|
|
"src": "4366:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 238,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4377:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4366:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 240,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4366:17:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 242,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 40,
|
|
"src": "4441:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 243,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4441:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 244,
|
|
"name": "toOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 166,
|
|
"src": "4450:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 241,
|
|
"name": "_mint",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 857,
|
|
"src": "4435:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 245,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4435:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 246,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4435:23:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 248,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "4474:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 249,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4474:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 250,
|
|
"name": "toSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 169,
|
|
"src": "4486:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 247,
|
|
"name": "_mint",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 857,
|
|
"src": "4468:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 251,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4468:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 252,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4468:27:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 254,
|
|
"implemented": true,
|
|
"kind": "fallback",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 154,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "3675:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 155,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "3695:0:0"
|
|
},
|
|
"scope": 297,
|
|
"src": "3667:835:0",
|
|
"stateMutability": "payable",
|
|
"superFunction": null,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 274,
|
|
"nodeType": "Block",
|
|
"src": "4589:154:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 262,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 260,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "4607:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 261,
|
|
"name": "endDate",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 153,
|
|
"src": "4614:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4607:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 259,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1060,
|
|
1061
|
|
],
|
|
"referencedDeclaration": 1060,
|
|
"src": "4599:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 263,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4599:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 264,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4599:23:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 269,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1081,
|
|
"src": "4722:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_DECAToken_$297",
|
|
"typeString": "contract DECAToken"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_DECAToken_$297",
|
|
"typeString": "contract DECAToken"
|
|
}
|
|
],
|
|
"id": 268,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "4714:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 270,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4714:13:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 271,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4714:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 265,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 40,
|
|
"src": "4697:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 266,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4697:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 267,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4697:16:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 272,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4697:39:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 273,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4697:39:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 275,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 257,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 256,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 50,
|
|
"src": "4579:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "4579:9:0"
|
|
}
|
|
],
|
|
"name": "getETH",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 255,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4569:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 258,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4589:0:0"
|
|
},
|
|
"scope": 297,
|
|
"src": "4554:189:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 295,
|
|
"nodeType": "Block",
|
|
"src": "5088:70:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 290,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 40,
|
|
"src": "5135:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 291,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5135:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 292,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 279,
|
|
"src": "5144:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 287,
|
|
"name": "tokenAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 277,
|
|
"src": "5112:12:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 286,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1042,
|
|
"src": "5105:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IERC20_$1042_$",
|
|
"typeString": "type(contract IERC20)"
|
|
}
|
|
},
|
|
"id": 288,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5105:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$1042",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 289,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 996,
|
|
"src": "5105:29:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 293,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5105:46:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 285,
|
|
"id": 294,
|
|
"nodeType": "Return",
|
|
"src": "5098:53:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 296,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 282,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 281,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 50,
|
|
"src": "5055:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "5055:9:0"
|
|
}
|
|
],
|
|
"name": "transferAnyERC20Token",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 280,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 277,
|
|
"name": "tokenAddress",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 296,
|
|
"src": "5005:28:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 276,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5005:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 279,
|
|
"name": "tokens",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 296,
|
|
"src": "5035:11:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 278,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5035:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5004:43:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 285,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 284,
|
|
"name": "success",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 296,
|
|
"src": "5074:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 283,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5074:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5073:14:0"
|
|
},
|
|
"scope": 297,
|
|
"src": "4974:184:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 298,
|
|
"src": "3031:2129:0"
|
|
}
|
|
],
|
|
"src": "0:5161:0"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/home/p1r0/dcc/contracts/DECA_ERC20_0.5.3.sol",
|
|
"exportedSymbols": {
|
|
"DECAToken": [
|
|
297
|
|
],
|
|
"Ownable": [
|
|
117
|
|
]
|
|
},
|
|
"id": 298,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"0.5",
|
|
".12"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:0"
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
|
|
"file": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
|
|
"id": 2,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 298,
|
|
"sourceUnit": 974,
|
|
"src": "25:55:0",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
|
|
"file": "@openzeppelin/contracts/math/SafeMath.sol",
|
|
"id": 3,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 298,
|
|
"sourceUnit": 569,
|
|
"src": "81:51:0",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 4,
|
|
"name": "Context",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 381,
|
|
"src": "782:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Context_$381",
|
|
"typeString": "contract Context"
|
|
}
|
|
},
|
|
"id": 5,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "782:7:0"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
381
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": "@dev The reason using this instead of openzeppelin, because owner are not 'payable'",
|
|
"fullyImplemented": true,
|
|
"id": 117,
|
|
"linearizedBaseContracts": [
|
|
117,
|
|
381
|
|
],
|
|
"name": "Ownable",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"id": 7,
|
|
"name": "_owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 117,
|
|
"src": "796:30:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 6,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "796:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"id": 10,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 8,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 568,
|
|
"src": "838:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$568",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "832:27:0",
|
|
"typeName": {
|
|
"id": 9,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "851:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 16,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 15,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 12,
|
|
"indexed": true,
|
|
"name": "previousOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 16,
|
|
"src": "892:29:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 11,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "892:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 14,
|
|
"indexed": true,
|
|
"name": "newOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 16,
|
|
"src": "923:24:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "923:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "891:57:0"
|
|
},
|
|
"src": "865:84:0"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 31,
|
|
"nodeType": "Block",
|
|
"src": "1075:93:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 22,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 19,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1085:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 20,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 369,
|
|
"src": "1094:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 21,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1094:12:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "1085:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 23,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1085:21:0"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 26,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1150:1:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 25,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1142:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 27,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1142:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 28,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1154:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 24,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 16,
|
|
"src": "1121:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 29,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1121:40:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 30,
|
|
"nodeType": "EmitStatement",
|
|
"src": "1116:45:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Initializes the contract setting the deployer as the initial owner.",
|
|
"id": 32,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 17,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1063:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 18,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1075:0:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "1051:117:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 39,
|
|
"nodeType": "Block",
|
|
"src": "1299:30:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 37,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1316:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"functionReturnParameters": 36,
|
|
"id": 38,
|
|
"nodeType": "Return",
|
|
"src": "1309:13:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Returns the address of the current owner.",
|
|
"id": 40,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "owner",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 33,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1258:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 36,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 35,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 40,
|
|
"src": "1282:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 34,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1282:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1281:17:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "1244:85:0",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 49,
|
|
"nodeType": "Block",
|
|
"src": "1438:82:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 43,
|
|
"name": "isOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 61,
|
|
"src": "1456:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
|
|
"typeString": "function () view returns (bool)"
|
|
}
|
|
},
|
|
"id": 44,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1456:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
|
|
"id": 45,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1467:34:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe",
|
|
"typeString": "literal_string \"Ownable: caller is not the owner\""
|
|
},
|
|
"value": "Ownable: caller is not the owner"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe",
|
|
"typeString": "literal_string \"Ownable: caller is not the owner\""
|
|
}
|
|
],
|
|
"id": 42,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1060,
|
|
1061
|
|
],
|
|
"referencedDeclaration": 1061,
|
|
"src": "1448:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 46,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1448:54:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 47,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1448:54:0"
|
|
},
|
|
{
|
|
"id": 48,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1512:1:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Throws if called by any account other than the owner.",
|
|
"id": 50,
|
|
"name": "onlyOwner",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 41,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1435:2:0"
|
|
},
|
|
"src": "1417:103:0",
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 60,
|
|
"nodeType": "Block",
|
|
"src": "1649:46:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"id": 58,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 55,
|
|
"name": "_msgSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 369,
|
|
"src": "1666:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 56,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1666:12:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 57,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "1682:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "1666:22:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 54,
|
|
"id": 59,
|
|
"nodeType": "Return",
|
|
"src": "1659:29:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Returns true if the caller is the current owner.",
|
|
"id": 61,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "isOwner",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 51,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1619:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 54,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 53,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 61,
|
|
"src": "1643:4:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 52,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1643:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1642:6:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "1603:92:0",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 79,
|
|
"nodeType": "Block",
|
|
"src": "2083:91:0",
|
|
"statements": [
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 67,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2119:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 69,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2135:1:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 68,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2127:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 70,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2127:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 66,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 16,
|
|
"src": "2098:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 71,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2098:40:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 72,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2093:45:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 77,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 73,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2148:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 75,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2165:1:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 74,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2157:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 76,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2157:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "2148:19:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 78,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2148:19:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.",
|
|
"id": 80,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 64,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 63,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 50,
|
|
"src": "2073:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2073:9:0"
|
|
}
|
|
],
|
|
"name": "renounceOwnership",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 62,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2063:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 65,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2083:0:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "2037:137:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 91,
|
|
"nodeType": "Block",
|
|
"src": "2393:45:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 88,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 82,
|
|
"src": "2422:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 87,
|
|
"name": "_transferOwnership",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 116,
|
|
"src": "2403:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$returns$__$",
|
|
"typeString": "function (address payable)"
|
|
}
|
|
},
|
|
"id": 89,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2403:28:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 90,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2403:28:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.",
|
|
"id": 92,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 85,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 84,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 50,
|
|
"src": "2383:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2383:9:0"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 83,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 82,
|
|
"name": "newOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 92,
|
|
"src": "2350:24:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 81,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2350:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2349:26:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 86,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2393:0:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "2323:115:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 115,
|
|
"nodeType": "Block",
|
|
"src": "2602:170:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"id": 102,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 98,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 94,
|
|
"src": "2620:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 100,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2640:1:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 99,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2632:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 101,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2632:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "2620:22:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373",
|
|
"id": 103,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2644:40:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe",
|
|
"typeString": "literal_string \"Ownable: new owner is the zero address\""
|
|
},
|
|
"value": "Ownable: new owner is the zero address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe",
|
|
"typeString": "literal_string \"Ownable: new owner is the zero address\""
|
|
}
|
|
],
|
|
"id": 97,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1060,
|
|
1061
|
|
],
|
|
"referencedDeclaration": 1061,
|
|
"src": "2612:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 104,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2612:73:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 105,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2612:73:0"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 107,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2721:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 108,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 94,
|
|
"src": "2729:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 106,
|
|
"name": "OwnershipTransferred",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 16,
|
|
"src": "2700:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
|
|
"typeString": "function (address,address)"
|
|
}
|
|
},
|
|
"id": 109,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2700:38:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 110,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2695:43:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 113,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 111,
|
|
"name": "_owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 7,
|
|
"src": "2748:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 112,
|
|
"name": "newOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 94,
|
|
"src": "2757:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "2748:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 114,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2748:17:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).",
|
|
"id": 116,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_transferOwnership",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 95,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 94,
|
|
"name": "newOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 116,
|
|
"src": "2567:24:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 93,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2567:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2566:26:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 96,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2602:0:0"
|
|
},
|
|
"scope": 117,
|
|
"src": "2539:233:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 298,
|
|
"src": "762:2012:0"
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 118,
|
|
"name": "ERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 973,
|
|
"src": "3053:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$973",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"id": 119,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "3053:5:0"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 120,
|
|
"name": "Ownable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 117,
|
|
"src": "3060:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Ownable_$117",
|
|
"typeString": "contract Ownable"
|
|
}
|
|
},
|
|
"id": 121,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "3060:7:0"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
117,
|
|
381,
|
|
973,
|
|
1042
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 297,
|
|
"linearizedBaseContracts": [
|
|
297,
|
|
117,
|
|
973,
|
|
1042,
|
|
381
|
|
],
|
|
"name": "DECAToken",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 124,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 122,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 568,
|
|
"src": "3080:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$568",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "3074:27:0",
|
|
"typeName": {
|
|
"id": 123,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3093:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 127,
|
|
"name": "symbol",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3106:38:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 125,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3106:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "44454341",
|
|
"id": 126,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3138:6:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a49565813a43765a9dfdf315aaa77336d9844a752bb9a788d2dad0f019de1858",
|
|
"typeString": "literal_string \"DECA\""
|
|
},
|
|
"value": "DECA"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 130,
|
|
"name": "name",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3150:59:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 128,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3150:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "444563656e7472616c697a656420434172626f6e20746f6b656e73",
|
|
"id": 129,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3180:29:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a71fc6dd39cdb20c976c32b6365d2e473e0bcd38ac1af23f856facc675f989cb",
|
|
"typeString": "literal_string \"DEcentralized CArbon tokens\""
|
|
},
|
|
"value": "DEcentralized CArbon tokens"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 133,
|
|
"name": "decimals",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3215:35:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 131,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3215:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3138",
|
|
"id": 132,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3248:2:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_18_by_1",
|
|
"typeString": "int_const 18"
|
|
},
|
|
"value": "18"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 138,
|
|
"name": "preICOEnds",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3300:38:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 134,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3300:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 137,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 135,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3325:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 136,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3331:7:0",
|
|
"subdenomination": "weeks",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_604800_by_1",
|
|
"typeString": "int_const 604800"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "3325:13:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 143,
|
|
"name": "bonus1Ends",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3344:38:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 139,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3344:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 142,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 140,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3369:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "33",
|
|
"id": 141,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3375:7:0",
|
|
"subdenomination": "weeks",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1814400_by_1",
|
|
"typeString": "int_const 1814400"
|
|
},
|
|
"value": "3"
|
|
},
|
|
"src": "3369:13:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 148,
|
|
"name": "bonus2Ends",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3388:38:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 144,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3388:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 147,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 145,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3413:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "36",
|
|
"id": 146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3419:7:0",
|
|
"subdenomination": "weeks",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_3628800_by_1",
|
|
"typeString": "int_const 3628800"
|
|
},
|
|
"value": "6"
|
|
},
|
|
"src": "3413:13:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 153,
|
|
"name": "endDate",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 297,
|
|
"src": "3432:36:0",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 149,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3432:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 152,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 150,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3454:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3131",
|
|
"id": 151,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3460:8:0",
|
|
"subdenomination": "weeks",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_6652800_by_1",
|
|
"typeString": "int_const 6652800"
|
|
},
|
|
"value": "11"
|
|
},
|
|
"src": "3454:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 253,
|
|
"nodeType": "Block",
|
|
"src": "3695:807:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 159,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 157,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3713:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 158,
|
|
"name": "endDate",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 153,
|
|
"src": "3720:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3713:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 156,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1060,
|
|
1061
|
|
],
|
|
"referencedDeclaration": 1060,
|
|
"src": "3705:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 160,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3705:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 161,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3705:23:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
163
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 163,
|
|
"name": "tokens",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 253,
|
|
"src": "3738:11:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 162,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3738:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 164,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3738:11:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
166
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 166,
|
|
"name": "toOwner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 253,
|
|
"src": "3759:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 165,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3759:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 167,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3759:12:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
169
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 169,
|
|
"name": "toSender",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 253,
|
|
"src": "3781:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 168,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3781:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 170,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3781:13:0"
|
|
},
|
|
{
|
|
"assignments": [
|
|
172
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 172,
|
|
"name": "divBy",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 253,
|
|
"src": "3804:10:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 171,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3804:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 173,
|
|
"initialValue": null,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3804:10:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 176,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 174,
|
|
"name": "divBy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 172,
|
|
"src": "3825:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3430",
|
|
"id": 175,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3833:2:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_40_by_1",
|
|
"typeString": "int_const 40"
|
|
},
|
|
"value": "40"
|
|
},
|
|
"src": "3825:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 177,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3825:10:0"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 180,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 178,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3918:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 179,
|
|
"name": "preICOEnds",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 138,
|
|
"src": "3925:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3918:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 195,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 191,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 189,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "3996:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 190,
|
|
"name": "preICOEnds",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 138,
|
|
"src": "4002:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3996:16:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 194,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 192,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "4016:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 193,
|
|
"name": "bonus1Ends",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 143,
|
|
"src": "4023:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4016:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "3996:37:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 210,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 206,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 204,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "4094:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 205,
|
|
"name": "bonus1Ends",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 143,
|
|
"src": "4100:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4094:16:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 209,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 207,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "4114:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 208,
|
|
"name": "bonus2Ends",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 148,
|
|
"src": "4121:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4114:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "4094:37:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 226,
|
|
"nodeType": "Block",
|
|
"src": "4188:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 224,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 219,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4202:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 223,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 220,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "4211:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 221,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4211:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "313030",
|
|
"id": 222,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4223:3:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100_by_1",
|
|
"typeString": "int_const 100"
|
|
},
|
|
"value": "100"
|
|
},
|
|
"src": "4211:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4202:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 225,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4202:24:0"
|
|
}
|
|
]
|
|
},
|
|
"id": 227,
|
|
"nodeType": "IfStatement",
|
|
"src": "4090:147:0",
|
|
"trueBody": {
|
|
"id": 218,
|
|
"nodeType": "Block",
|
|
"src": "4133:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 216,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 211,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4147:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 215,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 212,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "4156:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 213,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4156:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "313235",
|
|
"id": 214,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4168:3:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_125_by_1",
|
|
"typeString": "int_const 125"
|
|
},
|
|
"value": "125"
|
|
},
|
|
"src": "4156:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4147:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 217,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4147:24:0"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 228,
|
|
"nodeType": "IfStatement",
|
|
"src": "3992:245:0",
|
|
"trueBody": {
|
|
"id": 203,
|
|
"nodeType": "Block",
|
|
"src": "4035:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 201,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 196,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4049:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 200,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 197,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "4058:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 198,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4058:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "313530",
|
|
"id": 199,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4070:3:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_150_by_1",
|
|
"typeString": "int_const 150"
|
|
},
|
|
"value": "150"
|
|
},
|
|
"src": "4058:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4049:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 202,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4049:24:0"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": 229,
|
|
"nodeType": "IfStatement",
|
|
"src": "3914:323:0",
|
|
"trueBody": {
|
|
"id": 188,
|
|
"nodeType": "Block",
|
|
"src": "3937:49:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 186,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 181,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "3951:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 185,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 182,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "3960:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 183,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3960:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "323030",
|
|
"id": 184,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3972:3:0",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_200_by_1",
|
|
"typeString": "int_const 200"
|
|
},
|
|
"value": "200"
|
|
},
|
|
"src": "3960:15:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3951:24:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 187,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3951:24:0"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 235,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 230,
|
|
"name": "toOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 166,
|
|
"src": "4247:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 233,
|
|
"name": "divBy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 172,
|
|
"src": "4268:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 231,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4257:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 232,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "div",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 501,
|
|
"src": "4257:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 234,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4257:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4247:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 236,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4247:27:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 239,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 237,
|
|
"name": "toSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 169,
|
|
"src": "4366:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 238,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 163,
|
|
"src": "4377:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4366:17:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 240,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4366:17:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 242,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 40,
|
|
"src": "4441:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 243,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4441:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 244,
|
|
"name": "toOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 166,
|
|
"src": "4450:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 241,
|
|
"name": "_mint",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 857,
|
|
"src": "4435:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 245,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4435:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 246,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4435:23:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 248,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1057,
|
|
"src": "4474:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 249,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4474:10:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 250,
|
|
"name": "toSender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 169,
|
|
"src": "4486:8:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 247,
|
|
"name": "_mint",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 857,
|
|
"src": "4468:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 251,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4468:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 252,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4468:27:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 254,
|
|
"implemented": true,
|
|
"kind": "fallback",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 154,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "3675:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 155,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "3695:0:0"
|
|
},
|
|
"scope": 297,
|
|
"src": "3667:835:0",
|
|
"stateMutability": "payable",
|
|
"superFunction": null,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 274,
|
|
"nodeType": "Block",
|
|
"src": "4589:154:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 262,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 260,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1059,
|
|
"src": "4607:3:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 261,
|
|
"name": "endDate",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 153,
|
|
"src": "4614:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4607:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 259,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
1060,
|
|
1061
|
|
],
|
|
"referencedDeclaration": 1060,
|
|
"src": "4599:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 263,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4599:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 264,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4599:23:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 269,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1081,
|
|
"src": "4722:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_DECAToken_$297",
|
|
"typeString": "contract DECAToken"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_DECAToken_$297",
|
|
"typeString": "contract DECAToken"
|
|
}
|
|
],
|
|
"id": 268,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "4714:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 270,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4714:13:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 271,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4714:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 265,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 40,
|
|
"src": "4697:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 266,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4697:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 267,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "4697:16:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 272,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4697:39:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 273,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4697:39:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 275,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 257,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 256,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 50,
|
|
"src": "4579:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "4579:9:0"
|
|
}
|
|
],
|
|
"name": "getETH",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 255,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4569:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 258,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4589:0:0"
|
|
},
|
|
"scope": 297,
|
|
"src": "4554:189:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 295,
|
|
"nodeType": "Block",
|
|
"src": "5088:70:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 290,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 40,
|
|
"src": "5135:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$",
|
|
"typeString": "function () view returns (address payable)"
|
|
}
|
|
},
|
|
"id": 291,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5135:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 292,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 279,
|
|
"src": "5144:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 287,
|
|
"name": "tokenAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 277,
|
|
"src": "5112:12:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
],
|
|
"id": 286,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1042,
|
|
"src": "5105:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IERC20_$1042_$",
|
|
"typeString": "type(contract IERC20)"
|
|
}
|
|
},
|
|
"id": 288,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5105:20:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$1042",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 289,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 996,
|
|
"src": "5105:29:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 293,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5105:46:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 285,
|
|
"id": 294,
|
|
"nodeType": "Return",
|
|
"src": "5098:53:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 296,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 282,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 281,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 50,
|
|
"src": "5055:9:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "5055:9:0"
|
|
}
|
|
],
|
|
"name": "transferAnyERC20Token",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 280,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 277,
|
|
"name": "tokenAddress",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 296,
|
|
"src": "5005:28:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 276,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5005:15:0",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 279,
|
|
"name": "tokens",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 296,
|
|
"src": "5035:11:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 278,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5035:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5004:43:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 285,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 284,
|
|
"name": "success",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 296,
|
|
"src": "5074:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 283,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5074:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5073:14:0"
|
|
},
|
|
"scope": 297,
|
|
"src": "4974:184:0",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 298,
|
|
"src": "3031:2129:0"
|
|
}
|
|
],
|
|
"src": "0:5161:0"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.5.12+commit.7709ece9.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.0.19",
|
|
"updatedAt": "2019-12-29T01:52:30.747Z",
|
|
"devdoc": {
|
|
"details": "The reason using this instead of openzeppelin, because owner are not 'payable'",
|
|
"methods": {
|
|
"constructor": {
|
|
"details": "Initializes the contract setting the deployer as the initial owner."
|
|
},
|
|
"isOwner()": {
|
|
"details": "Returns true if the caller is the current owner."
|
|
},
|
|
"owner()": {
|
|
"details": "Returns the address of the current owner."
|
|
},
|
|
"renounceOwnership()": {
|
|
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
|
|
},
|
|
"transferOwnership(address)": {
|
|
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
|
|
}
|
|
}
|
|
},
|
|
"userdoc": {
|
|
"methods": {}
|
|
}
|
|
} |