diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d35682f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +package-lock.json +/node_modules diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4d9e25a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +image: node:12.16.3 + +before_script: + - npm install -g ganache-cli + - npm install -g truffle@5.1.3 + - npm i @openzeppelin/contracts@2.4.0 + +stages: + - build + - test + + +build: + stage: build + script: + - truffle compile + tags: + - docker + +test: + stage: test + script: + - ./run-rpc.sh & + - truffle test + tags: + - docker diff --git a/LICENSE b/LICENSE index 7a61f54..9d81168 100644 --- a/LICENSE +++ b/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. DCC - Copyright (C) 2018 NH-DEVs + Copyright (C) 2018 NEETSEC INTERNATIONAL INC. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - DCC Copyright (C) 2018 NH-DEVs + DCC Copyright (C) 2018 NEETSEC INTERNATIONAL INC. This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/README.md b/README.md index 34316aa..207b79d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,185 @@ -# DCC +Decentralized Carbon Credits ERC20 +=== +![build](https://gitlab.com/deca-currency/dcc/badges/develop/pipeline.svg) +[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/deca-currency/community) +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -Decentralized Carbon Credits in an ERC20 by neetsec \ No newline at end of file +Decentralized Carbon Credits in an ERC20 by Neetsec + +## Table of Contents + +[[_TOC_]] + +## DECA Project Tree +```sh +|-- LICENSE +|-- README.md +|-- contracts +|-- build +| |-- contracts +| |-- Context.json +| |-- DECA.json +| |-- ERC20.json +| |-- IERC20.json +| |-- Migrations.json +| |-- Ownable.json +| `-- SafeMath.json +| |-- DECA.sol +| `-- Migrations.sol +|-- migrations +| |-- 1_initial_migration.js +| `-- 2_deploy_contracts.js +|-- package.json +|-- run-rpc.sh +|-- test +| `-- DECA.js +|-- truffle.js +|-- .gitignore +|-- .gitlab-ci.yml +``` + +## Requirements + +* Node.js >= 12 +* @openzeppelin/contracts = 2.4.0 + +#### Global install +* ganache-cli >= 6.9.1 +* truffle = 5.1.3 + +## Instalation + +**Download and install Node.js v12.x and npm.** + +* Node.js + +**Using Ubuntu** + +```sh + $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - + $ sudo apt-get install -y nodejs +``` +**Using Debian, as root** + +```sh + $ curl -sL https://deb.nodesource.com/setup_12.x | bash - + $ apt-get install -y nodejs +``` + +**Clone the repo** + +```sh + $ git clone https://gitlab.com/deca-currency/dcc.git + $ cd dcc +``` + +**Install the dependencies** + +```sh + $ npm install +``` + +**Install ganache-cli** +```sh + $ sudo npm install -g ganache-cli +``` + +**Install truffle** + +```sh + $ sudo npm install -g truffle@5.1.3 +``` + +## Testing the Smart Contract: +- can see the test in pipelines or you can run it locally + +#### Running locally +- open shell and execute "./run-rpc.sh" (remember change /usr/local/bin/ganache-cli to your path) +```sh +$ ./run-rpc.sh +``` + +- open second shell, and execute + +```sh +$ truffle tests +``` + + +## Class Diagram ERC20 Token generated with [sol2uml](https://github.com/naddison36/sol2uml) + +

+ +

+ +## Specification + +### Methods + +Apart from the [ERC20 standard](https://eips.ethereum.org/EIPS/eip-20) methods that our token complies, we introduce some +improvements, either for security or others that match DECA specific requirements. + +**Notes:** + +* The following specifications use syntax from Solidity (0.5.12) + +#### owner + +Returns the address of the current owner. + +```sh +function owner() public view returns (address payable) +``` + +#### isOwner + +Returns true if the caller is the current owner. + +```sh +function isOwner() public view returns (bool) +``` + +#### transferOwnership + +Can only be called by the current owner. + +```sh +function transferOwnership(address payable newOwner) public onlyOwner +``` + +#### updateCCDBAddress +Updates the official orbitDB address for carbon credits. + +Can Only be updated by the current owner + +```sh +function updateCCDBAddress(string memory newCCDBAddress) public onlyOwner +``` + +#### transferAnyERC20Token + +Owner can transfer out any accidentally sent ERC20 tokens + +```sh +function transferAnyERC20Token(address payable tokenAddress, uint tokens) public onlyOwner returns (bool success) +``` + +#### getETH + +Close down the ICO and claim the Ether. + +```sh +function getETH() public onlyOwner { require(now >= endDate); owner().transfer(address(this).balance); } +``` + +## DECA Promotion Dates + +Now, based on the total Ethereums we got by the ICO (ETHTS) +and considering our promodates which are: + +| PROMO | TIME (weeks) | DECA TOKENS PER ETH | +|--------|--------------|---------------------| +| preICO | 1 | 300 | +| Bonus1 | 2 | 275 | +| Bonus2 | 3 | 250 | +| ICO | 5 | 225 | diff --git a/build/contracts/Context.json b/build/contracts/Context.json new file mode 100644 index 0000000..de56a76 --- /dev/null +++ b/build/contracts/Context.json @@ -0,0 +1,595 @@ +{ + "contractName": "Context", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/GSN/Context.sol\":\"Context\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzz-raw://216ef9d6b614db4eb46970b4e84903f2534a45572dd30a79f0041f1a5830f436\",\"dweb:/ipfs/QmNPrJ4MWKUAWzKXpUqeyKRUfosaoANZAqXgvepdrCwZAG\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n", + "sourcePath": "@openzeppelin/contracts/GSN/Context.sol", + "ast": { + "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", + "exportedSymbols": { + "Context": [ + 417 + ] + }, + "id": 418, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 392, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 417, + "linearizedBaseContracts": [ + 417 + ], + "name": "Context", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 395, + "nodeType": "Block", + "src": "726:3:2", + "statements": [] + }, + "documentation": null, + "id": 396, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 393, + "nodeType": "ParameterList", + "parameters": [], + "src": "714:2:2" + }, + "returnParameters": { + "id": 394, + "nodeType": "ParameterList", + "parameters": [], + "src": "726:0:2" + }, + "scope": 417, + "src": "702:27:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 404, + "nodeType": "Block", + "src": "850:34:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 401, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "867:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "867:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 400, + "id": 403, + "nodeType": "Return", + "src": "860:17:2" + } + ] + }, + "documentation": null, + "id": 405, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgSender", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 397, + "nodeType": "ParameterList", + "parameters": [], + "src": "807:2:2" + }, + "returnParameters": { + "id": 400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 399, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 405, + "src": "833:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 398, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "833:15:2", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "832:17:2" + }, + "scope": 417, + "src": "788:96:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 415, + "nodeType": "Block", + "src": "947:165:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 410, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "957:4:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$417", + "typeString": "contract Context" + } + }, + "id": 411, + "nodeType": "ExpressionStatement", + "src": "957:4:2" + }, + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 412, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "1097:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1097:8:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "functionReturnParameters": 409, + "id": 414, + "nodeType": "Return", + "src": "1090:15:2" + } + ] + }, + "documentation": null, + "id": 416, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgData", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 406, + "nodeType": "ParameterList", + "parameters": [], + "src": "907:2:2" + }, + "returnParameters": { + "id": 409, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 408, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 416, + "src": "933:12:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 407, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "933:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "932:14:2" + }, + "scope": 417, + "src": "890:222:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 418, + "src": "525:589:2" + } + ], + "src": "0:1115:2" + }, + "legacyAST": { + "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", + "exportedSymbols": { + "Context": [ + 417 + ] + }, + "id": 418, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 392, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 417, + "linearizedBaseContracts": [ + 417 + ], + "name": "Context", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 395, + "nodeType": "Block", + "src": "726:3:2", + "statements": [] + }, + "documentation": null, + "id": 396, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 393, + "nodeType": "ParameterList", + "parameters": [], + "src": "714:2:2" + }, + "returnParameters": { + "id": 394, + "nodeType": "ParameterList", + "parameters": [], + "src": "726:0:2" + }, + "scope": 417, + "src": "702:27:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 404, + "nodeType": "Block", + "src": "850:34:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 401, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "867:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "867:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 400, + "id": 403, + "nodeType": "Return", + "src": "860:17:2" + } + ] + }, + "documentation": null, + "id": 405, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgSender", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 397, + "nodeType": "ParameterList", + "parameters": [], + "src": "807:2:2" + }, + "returnParameters": { + "id": 400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 399, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 405, + "src": "833:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 398, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "833:15:2", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "832:17:2" + }, + "scope": 417, + "src": "788:96:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 415, + "nodeType": "Block", + "src": "947:165:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 410, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "957:4:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$417", + "typeString": "contract Context" + } + }, + "id": 411, + "nodeType": "ExpressionStatement", + "src": "957:4:2" + }, + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 412, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "1097:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1097:8:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "functionReturnParameters": 409, + "id": 414, + "nodeType": "Return", + "src": "1090:15:2" + } + ] + }, + "documentation": null, + "id": 416, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgData", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 406, + "nodeType": "ParameterList", + "parameters": [], + "src": "907:2:2" + }, + "returnParameters": { + "id": 409, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 408, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 416, + "src": "933:12:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 407, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "933:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "932:14:2" + }, + "scope": 417, + "src": "890:222:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 418, + "src": "525:589:2" + } + ], + "src": "0:1115:2" + }, + "compiler": { + "name": "solc", + "version": "0.5.12+commit.7709ece9.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.19", + "updatedAt": "2020-02-18T05:14:13.973Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/DECA.json b/build/contracts/DECA.json new file mode 100644 index 0000000..9e5bd38 --- /dev/null +++ b/build/contracts/DECA.json @@ -0,0 +1,9146 @@ +{ + "contractName": "DECA", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bonus1Ends", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bonus2Ends", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "endDate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "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": true, + "inputs": [], + "name": "preICOEnds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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" + }, + { + "constant": true, + "inputs": [], + "name": "getPause", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bool", + "name": "p", + "type": "bool" + } + ], + "name": "setPause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "getETH", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "transferAnyERC20Token", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"bonus1Ends\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"bonus2Ends\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"endDate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getETH\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getPause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"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\":true,\"inputs\":[],\"name\":\"preICOEnds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bool\",\"name\":\"p\",\"type\":\"bool\"}],\"name\":\"setPause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"transferAnyERC20Token\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"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.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`.\"},\"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/Dev/git/neetsec/dcc/contracts/DECA.sol\":\"DECA\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/p1r0/Dev/git/neetsec/dcc/contracts/DECA.sol\":{\"keccak256\":\"0x49b90fcbd2f4b8522a8b24d6be34dde3655572f608c159bc45ee28a51e19282b\",\"urls\":[\"bzz-raw://e745ab72fc640a805878dacfa54226034d8c6b8c8cbe05b11a3c24347c86a404\",\"dweb:/ipfs/QmYbZi78rZHiV5kGUEQJB7C8AALSyBeGpiPhKu4HRPuojz\"]},\"@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": "0x608060405262093a804201600455621baf80420160055562375f0042016006556265838042016007556000600860006101000a81548160ff02191690831515021790555061005161011360201b60201c565b600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a361011b565b600033905090565b611e6b8061012a6000396000f3fe6080604052600436106101405760003560e01c80638f32d59b116100b6578063dc39d06d1161006f578063dc39d06d14610805578063dd62ed3e14610878578063e8294aad146108fd578063ef0b44db14610928578063f2fde38b14610953578063fc5fc8ae146109a457610140565b80638f32d59b146105f857806395d89b4114610627578063a457c2d7146106b7578063a9059cbb1461072a578063bedb86fb1461079d578063c24a0f8b146107da57610140565b8063313ce56711610108578063313ce5671461045257806339509351146104835780633e3ca9d3146104f657806370a0823114610525578063715018a61461058a5780638da5cb5b146105a157610140565b806306fdde031461027a578063095ea7b31461030a57806314f6c3be1461037d57806318160ddd1461039457806323b872dd146103bf575b600860009054906101000a900460ff16156101c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f63726f776473616c65206f6e207061757365000000000000000000000000000081525060200191505060405180910390fd5b6007544211156101d257600080fd5b6000806000806028905060045442116101f15761012c34029350610241565b6004544211801561020457506005544211155b156102155761011334029350610240565b6005544211801561022857506006544211155b156102385760fa3402935061023f565b60e1340293505b5b5b61025481856109cf90919063ffffffff16565b925083915061026a610264610a19565b84610a43565b6102743383610a43565b50505050005b34801561028657600080fd5b5061028f610bfe565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102cf5780820151818401526020810190506102b4565b50505050905090810190601f1680156102fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561031657600080fd5b506103636004803603604081101561032d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c37565b604051808215151515815260200191505060405180910390f35b34801561038957600080fd5b50610392610c55565b005b3480156103a057600080fd5b506103a9610d45565b6040518082815260200191505060405180910390f35b3480156103cb57600080fd5b50610438600480360360608110156103e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d4f565b604051808215151515815260200191505060405180910390f35b34801561045e57600080fd5b50610467610e28565b604051808260ff1660ff16815260200191505060405180910390f35b34801561048f57600080fd5b506104dc600480360360408110156104a657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e2d565b604051808215151515815260200191505060405180910390f35b34801561050257600080fd5b5061050b610ee0565b604051808215151515815260200191505060405180910390f35b34801561053157600080fd5b506105746004803603602081101561054857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef7565b6040518082815260200191505060405180910390f35b34801561059657600080fd5b5061059f610f3f565b005b3480156105ad57600080fd5b506105b6610a19565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561060457600080fd5b5061060d61107a565b604051808215151515815260200191505060405180910390f35b34801561063357600080fd5b5061063c6110d9565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561067c578082015181840152602081019050610661565b50505050905090810190601f1680156106a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156106c357600080fd5b50610710600480360360408110156106da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611112565b604051808215151515815260200191505060405180910390f35b34801561073657600080fd5b506107836004803603604081101561074d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111df565b604051808215151515815260200191505060405180910390f35b3480156107a957600080fd5b506107d8600480360360208110156107c057600080fd5b810190808035151590602001909291905050506111fd565b005b3480156107e657600080fd5b506107ef611294565b6040518082815260200191505060405180910390f35b34801561081157600080fd5b5061085e6004803603604081101561082857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061129a565b604051808215151515815260200191505060405180910390f35b34801561088457600080fd5b506108e76004803603604081101561089b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113e7565b6040518082815260200191505060405180910390f35b34801561090957600080fd5b5061091261146e565b6040518082815260200191505060405180910390f35b34801561093457600080fd5b5061093d611474565b6040518082815260200191505060405180910390f35b34801561095f57600080fd5b506109a26004803603602081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061147a565b005b3480156109b057600080fd5b506109b9611500565b6040518082815260200191505060405180910390f35b6000610a1183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611506565b905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ae6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b610afb816002546115cc90919063ffffffff16565b600281905550610b52816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115cc90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6040518060400160405280601b81526020017f444563656e7472616c697a656420434172626f6e20746f6b656e73000000000081525081565b6000610c4b610c44611654565b848461165c565b6001905092915050565b610c5d61107a565b610ccf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600754421015610cde57600080fd5b610ce6610a19565b73ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015610d42573d6000803e3d6000fd5b50565b6000600254905090565b6000610d5c848484611853565b610e1d84610d68611654565b610e1885604051806060016040528060288152602001611da160289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610dce611654565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b099092919063ffffffff16565b61165c565b600190509392505050565b601281565b6000610ed6610e3a611654565b84610ed18560016000610e4b611654565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115cc90919063ffffffff16565b61165c565b6001905092915050565b6000600860009054906101000a900460ff16905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610f4761107a565b610fb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110bd611654565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b6040518060400160405280600481526020017f444543410000000000000000000000000000000000000000000000000000000081525081565b60006111d561111f611654565b846111d085604051806060016040528060258152602001611e126025913960016000611149611654565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b099092919063ffffffff16565b61165c565b6001905092915050565b60006111f36111ec611654565b8484611853565b6001905092915050565b61120561107a565b611277576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600860006101000a81548160ff02191690831515021790555050565b60075481565b60006112a461107a565b611316576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61133a610a19565b846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156113a457600080fd5b505af11580156113b8573d6000803e3d6000fd5b505050506040513d60208110156113ce57600080fd5b8101908080519060200190929190505050905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60055481565b60065481565b61148261107a565b6114f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6114fd81611bc9565b50565b60045481565b600080831182906115b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561157757808201518184015260208101905061155c565b50505050905090810190601f1680156115a45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816115be57fe5b049050809150509392505050565b60008082840190508381101561164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611dee6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611768576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611d596022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118d9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611dc96025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561195f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611d106023913960400191505060405180910390fd5b6119ca81604051806060016040528060268152602001611d7b602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b099092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a5d816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115cc90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611bb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b7b578082015181840152602081019050611b60565b50505050905090810190601f168015611ba85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611d336026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a723158208434c2d30ea10dfc8af4774235b4b3c52e2124303326643d4bce304276783d3364736f6c634300050c0032", + "deployedBytecode": "0x6080604052600436106101405760003560e01c80638f32d59b116100b6578063dc39d06d1161006f578063dc39d06d14610805578063dd62ed3e14610878578063e8294aad146108fd578063ef0b44db14610928578063f2fde38b14610953578063fc5fc8ae146109a457610140565b80638f32d59b146105f857806395d89b4114610627578063a457c2d7146106b7578063a9059cbb1461072a578063bedb86fb1461079d578063c24a0f8b146107da57610140565b8063313ce56711610108578063313ce5671461045257806339509351146104835780633e3ca9d3146104f657806370a0823114610525578063715018a61461058a5780638da5cb5b146105a157610140565b806306fdde031461027a578063095ea7b31461030a57806314f6c3be1461037d57806318160ddd1461039457806323b872dd146103bf575b600860009054906101000a900460ff16156101c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f63726f776473616c65206f6e207061757365000000000000000000000000000081525060200191505060405180910390fd5b6007544211156101d257600080fd5b6000806000806028905060045442116101f15761012c34029350610241565b6004544211801561020457506005544211155b156102155761011334029350610240565b6005544211801561022857506006544211155b156102385760fa3402935061023f565b60e1340293505b5b5b61025481856109cf90919063ffffffff16565b925083915061026a610264610a19565b84610a43565b6102743383610a43565b50505050005b34801561028657600080fd5b5061028f610bfe565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102cf5780820151818401526020810190506102b4565b50505050905090810190601f1680156102fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561031657600080fd5b506103636004803603604081101561032d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c37565b604051808215151515815260200191505060405180910390f35b34801561038957600080fd5b50610392610c55565b005b3480156103a057600080fd5b506103a9610d45565b6040518082815260200191505060405180910390f35b3480156103cb57600080fd5b50610438600480360360608110156103e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d4f565b604051808215151515815260200191505060405180910390f35b34801561045e57600080fd5b50610467610e28565b604051808260ff1660ff16815260200191505060405180910390f35b34801561048f57600080fd5b506104dc600480360360408110156104a657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e2d565b604051808215151515815260200191505060405180910390f35b34801561050257600080fd5b5061050b610ee0565b604051808215151515815260200191505060405180910390f35b34801561053157600080fd5b506105746004803603602081101561054857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef7565b6040518082815260200191505060405180910390f35b34801561059657600080fd5b5061059f610f3f565b005b3480156105ad57600080fd5b506105b6610a19565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561060457600080fd5b5061060d61107a565b604051808215151515815260200191505060405180910390f35b34801561063357600080fd5b5061063c6110d9565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561067c578082015181840152602081019050610661565b50505050905090810190601f1680156106a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156106c357600080fd5b50610710600480360360408110156106da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611112565b604051808215151515815260200191505060405180910390f35b34801561073657600080fd5b506107836004803603604081101561074d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111df565b604051808215151515815260200191505060405180910390f35b3480156107a957600080fd5b506107d8600480360360208110156107c057600080fd5b810190808035151590602001909291905050506111fd565b005b3480156107e657600080fd5b506107ef611294565b6040518082815260200191505060405180910390f35b34801561081157600080fd5b5061085e6004803603604081101561082857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061129a565b604051808215151515815260200191505060405180910390f35b34801561088457600080fd5b506108e76004803603604081101561089b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113e7565b6040518082815260200191505060405180910390f35b34801561090957600080fd5b5061091261146e565b6040518082815260200191505060405180910390f35b34801561093457600080fd5b5061093d611474565b6040518082815260200191505060405180910390f35b34801561095f57600080fd5b506109a26004803603602081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061147a565b005b3480156109b057600080fd5b506109b9611500565b6040518082815260200191505060405180910390f35b6000610a1183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611506565b905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ae6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b610afb816002546115cc90919063ffffffff16565b600281905550610b52816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115cc90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6040518060400160405280601b81526020017f444563656e7472616c697a656420434172626f6e20746f6b656e73000000000081525081565b6000610c4b610c44611654565b848461165c565b6001905092915050565b610c5d61107a565b610ccf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600754421015610cde57600080fd5b610ce6610a19565b73ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015610d42573d6000803e3d6000fd5b50565b6000600254905090565b6000610d5c848484611853565b610e1d84610d68611654565b610e1885604051806060016040528060288152602001611da160289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610dce611654565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b099092919063ffffffff16565b61165c565b600190509392505050565b601281565b6000610ed6610e3a611654565b84610ed18560016000610e4b611654565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115cc90919063ffffffff16565b61165c565b6001905092915050565b6000600860009054906101000a900460ff16905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610f4761107a565b610fb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110bd611654565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b6040518060400160405280600481526020017f444543410000000000000000000000000000000000000000000000000000000081525081565b60006111d561111f611654565b846111d085604051806060016040528060258152602001611e126025913960016000611149611654565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b099092919063ffffffff16565b61165c565b6001905092915050565b60006111f36111ec611654565b8484611853565b6001905092915050565b61120561107a565b611277576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600860006101000a81548160ff02191690831515021790555050565b60075481565b60006112a461107a565b611316576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61133a610a19565b846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156113a457600080fd5b505af11580156113b8573d6000803e3d6000fd5b505050506040513d60208110156113ce57600080fd5b8101908080519060200190929190505050905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60055481565b60065481565b61148261107a565b6114f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6114fd81611bc9565b50565b60045481565b600080831182906115b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561157757808201518184015260208101905061155c565b50505050905090810190601f1680156115a45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816115be57fe5b049050809150509392505050565b60008082840190508381101561164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611dee6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611768576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611d596022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118d9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611dc96025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561195f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611d106023913960400191505060405180910390fd5b6119ca81604051806060016040528060268152602001611d7b602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b099092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a5d816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115cc90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611bb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b7b578082015181840152602081019050611b60565b50505050905090810190601f168015611ba85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611d336026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a723158208434c2d30ea10dfc8af4774235b4b3c52e2124303326643d4bce304276783d3364736f6c634300050c0032", + "sourceMap": "3088:2427:0:-;;;3383:7;3377:3;:13;3352:38;;3427:7;3421:3;:13;3396:38;;3471:7;3465:3;:13;3440:38;;3512:8;3506:3;:14;3484:36;;3548:5;3526:27;;;;;;;;;;;;;;;;;;;;1151:12;:10;;;:12;;:::i;:::-;1142:6;;:21;;;;;;;;;;;;;;;;;;1211:6;;;;;;;;;;;1178:40;;1207:1;1178:40;;;;;;;;;;;;3088:2427;;788:96:2;833:15;867:10;860:17;;788:96;:::o;3088:2427:0:-;;;;;;;", + "deployedSourceMap": "3088:2427:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3600:6;;;;;;;;;;;3599:7;3591:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4067:7;;4060:3;:14;;4052:23;;;;;;4085:11;4106:12;4128:13;4151:10;4180:2;4172:10;;4280;;4273:3;:17;4269:323;;4327:3;4315:9;:15;4306:24;;4269:323;;;4357:10;;4351:3;:16;:37;;;;;4378:10;;4371:3;:17;;4351:37;4347:245;;;4425:3;4413:9;:15;4404:24;;4347:245;;;4455:10;;4449:3;:16;:37;;;;;4476:10;;4469:3;:17;;4449:37;4445:147;;;4523:3;4511:9;:15;4502:24;;4445:147;;;4578:3;4566:9;:15;4557:24;;4445:147;4347:245;4269:323;4612:17;4623:5;4612:6;:10;;:17;;;;:::i;:::-;4602:27;;4732:6;4721:17;;4790:23;4796:7;:5;:7::i;:::-;4805;4790:5;:23::i;:::-;4823:27;4829:10;4841:8;4823:5;:27::i;:::-;3639:1;;;;3088:2427;3202:59;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3202:59:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3202:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2500:149:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2500:149:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2500:149:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;4909:189:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4909:189:0;;;:::i;:::-;;1559:89:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1559:89:4;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3107:300;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3107:300:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3107:300:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3267:35:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3267:35:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3802:207:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3802:207:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3802:207:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3652:76:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3652:76:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1706:108:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1706:108:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1706:108:4;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2094:137:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2094:137:0;;;:::i;:::-;;1301:85;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1301:85:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1660:92;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1660:92:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3158:38;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3158:38:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3158:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4496:258:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4496:258:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4496:258:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2017:155;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2017:155:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2017:155:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3734:72:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3734:72:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3734:72:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;3484:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3484:36:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5329:184;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5329:184:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5329:184:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2230:132:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2230:132:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2230:132:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3396:38:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3396:38:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3440;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3440:38:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2380:115;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2380:115:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2380:115:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;3352:38;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3352:38:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3073:130:3;3131:7;3157:39;3161:1;3164;3157:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;3150:46;;3073:130;;;;:::o;1301:85:0:-;1339:15;1373:6;;;;;;;;;;;1366:13;;1301:85;:::o;5962:302:4:-;6056:1;6037:21;;:7;:21;;;;6029:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6120:24;6137:6;6120:12;;:16;;:24;;;;:::i;:::-;6105:12;:39;;;;6175:30;6198:6;6175:9;:18;6185:7;6175:18;;;;;;;;;;;;;;;;:22;;:30;;;;:::i;:::-;6154:9;:18;6164:7;6154:18;;;;;;;;;;;;;;;:51;;;;6241:7;6220:37;;6237:1;6220:37;;;6250:6;6220:37;;;;;;;;;;;;;;;;;;5962:302;;:::o;3202:59:0:-;;;;;;;;;;;;;;;;;;;:::o;2500:149:4:-;2566:4;2582:39;2591:12;:10;:12::i;:::-;2605:7;2614:6;2582:8;:39::i;:::-;2638:4;2631:11;;2500:149;;;;:::o;4909:189:0:-;1513:9;:7;:9::i;:::-;1505:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4969:7;;4962:3;:14;;4954:23;;;;;;5052:7;:5;:7::i;:::-;:16;;:39;5077:4;5069:21;;;5052:39;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5052:39:0;4909:189::o;1559:89:4:-;1603:7;1629:12;;1622:19;;1559:89;:::o;3107:300::-;3196:4;3212:36;3222:6;3230:9;3241:6;3212:9;:36::i;:::-;3258:121;3267:6;3275:12;:10;:12::i;:::-;3289:89;3327:6;3289:89;;;;;;;;;;;;;;;;;:11;:19;3301:6;3289:19;;;;;;;;;;;;;;;:33;3309:12;:10;:12::i;:::-;3289:33;;;;;;;;;;;;;;;;:37;;:89;;;;;:::i;:::-;3258:8;:121::i;:::-;3396:4;3389:11;;3107:300;;;;;:::o;3267:35:0:-;3300:2;3267:35;:::o;3802:207:4:-;3882:4;3898:83;3907:12;:10;:12::i;:::-;3921:7;3930:50;3969:10;3930:11;:25;3942:12;:10;:12::i;:::-;3930:25;;;;;;;;;;;;;;;:34;3956:7;3930:34;;;;;;;;;;;;;;;;:38;;:50;;;;:::i;:::-;3898:8;:83::i;:::-;3998:4;3991:11;;3802:207;;;;:::o;3652:76:0:-;3693:4;3715:6;;;;;;;;;;;3708:13;;3652:76;:::o;1706:108:4:-;1763:7;1789:9;:18;1799:7;1789:18;;;;;;;;;;;;;;;;1782:25;;1706:108;;;:::o;2094:137:0:-;1513:9;:7;:9::i;:::-;1505:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2192:1;2155:40;;2176:6;;;;;;;;;;;2155:40;;;;;;;;;;;;2222:1;2205:6;;:19;;;;;;;;;;;;;;;;;;2094:137::o;1660:92::-;1700:4;1739:6;;;;;;;;;;;1723:22;;:12;:10;:12::i;:::-;:22;;;1716:29;;1660:92;:::o;3158:38::-;;;;;;;;;;;;;;;;;;;:::o;4496:258:4:-;4581:4;4597:129;4606:12;:10;:12::i;:::-;4620:7;4629:96;4668:15;4629:96;;;;;;;;;;;;;;;;;:11;:25;4641:12;:10;:12::i;:::-;4629:25;;;;;;;;;;;;;;;:34;4655:7;4629:34;;;;;;;;;;;;;;;;:38;;:96;;;;;:::i;:::-;4597:8;:129::i;:::-;4743:4;4736:11;;4496:258;;;;:::o;2017:155::-;2086:4;2102:42;2112:12;:10;:12::i;:::-;2126:9;2137:6;2102:9;:42::i;:::-;2161:4;2154:11;;2017:155;;;;:::o;3734:72:0:-;1513:9;:7;:9::i;:::-;1505:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3798:1;3789:6;;:10;;;;;;;;;;;;;;;;;;3734:72;:::o;3484:36::-;;;;:::o;5329:184::-;5429:12;1513:9;:7;:9::i;:::-;1505:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5467:12;5460:29;;;5490:7;:5;:7::i;:::-;5499:6;5460:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5460:46:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5460:46:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5460:46:0;;;;;;;;;;;;;;;;5453:53;;5329:184;;;;:::o;2230:132:4:-;2302:7;2328:11;:18;2340:5;2328:18;;;;;;;;;;;;;;;:27;2347:7;2328:27;;;;;;;;;;;;;;;;2321:34;;2230:132;;;;:::o;3396:38:0:-;;;;:::o;3440:::-;;;;:::o;2380:115::-;1513:9;:7;:9::i;:::-;1505:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2460:28;2479:8;2460:18;:28::i;:::-;2380:115;:::o;3352:38::-;;;;:::o;3718:338:3:-;3804:7;3901:1;3897;:5;3904:12;3889:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3889:28:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3927:9;3943:1;3939;:5;;;;;;3927:17;;4048:1;4041:8;;;3718:338;;;;;:::o;834:176::-;892:7;911:9;927:1;923;:5;911:17;;951:1;946;:6;;938:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;995:8;;;834:176;;;;:::o;788:96:2:-;833:15;867:10;860:17;;788:96;:::o;7351:332:4:-;7461:1;7444:19;;:5;:19;;;;7436:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7541:1;7522:21;;:7;:21;;;;7514:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7623:6;7593:11;:18;7605:5;7593:18;;;;;;;;;;;;;;;:27;7612:7;7593:27;;;;;;;;;;;;;;;:36;;;;7660:7;7644:32;;7653:5;7644:32;;;7669:6;7644:32;;;;;;;;;;;;;;;;;;7351:332;;;:::o;5228:464::-;5343:1;5325:20;;:6;:20;;;;5317:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5426:1;5405:23;;:9;:23;;;;5397:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5499;5521:6;5499:71;;;;;;;;;;;;;;;;;:9;:17;5509:6;5499:17;;;;;;;;;;;;;;;;:21;;:71;;;;;:::i;:::-;5479:9;:17;5489:6;5479:17;;;;;;;;;;;;;;;:91;;;;5603:32;5628:6;5603:9;:20;5613:9;5603:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;5580:9;:20;5590:9;5580:20;;;;;;;;;;;;;;;:55;;;;5667:9;5650:35;;5659:6;5650:35;;;5678:6;5650:35;;;;;;;;;;;;;;;;;;5228:464;;;:::o;1732:187:3:-;1818:7;1850:1;1845;:6;;1853:12;1837:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1837:29:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1876:9;1892:1;1888;:5;1876:17;;1911:1;1904:8;;;1732:187;;;;;:::o;2596:233:0:-;2697:1;2677:22;;:8;:22;;;;2669:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2786:8;2757:38;;2778:6;;;;;;;;;;;2757:38;;;;;;;;;;;;2814:8;2805:6;;:17;;;;;;;;;;;;;;;;;;2596:233;:::o", + "source": "pragma solidity 0.5.12;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.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 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 DECA 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 bool private _pause = false;\n\n modifier notPaused() {\n require(!_pause, \"crowdsale on pause\");\n _;\n }\n function getPause() view public returns (bool){\n return _pause;\n }\n\n function setPause(bool p) external onlyOwner {\n _pause = p;\n }\n // ------------------------------------------------------------------------\n // 100 DECA Tokens per 1 ETH\n // ------------------------------------------------------------------------\n function() notPaused external payable {\n require(now <= endDate);\n uint tokens;\n uint toOwner;\n uint toSender;\n uint divBy;\n\n divBy = 40;\n //2.5% extra printed to be 2% of the marketcap, please see README.md\n if (now <= preICOEnds) {\n tokens = msg.value * 300;\n } else if (now > preICOEnds && now <= bonus1Ends) {\n tokens = msg.value * 275;\n } else if (now > bonus1Ends && now <= bonus2Ends) {\n tokens = msg.value * 250;\n } else {\n tokens = msg.value * 225;\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/Dev/git/neetsec/dcc/contracts/DECA.sol", + "ast": { + "absolutePath": "/home/p1r0/Dev/git/neetsec/dcc/contracts/DECA.sol", + "exportedSymbols": { + "DECA": [ + 333 + ], + "Ownable": [ + 118 + ] + }, + "id": 334, + "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": 334, + "sourceUnit": 1010, + "src": "25:55:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 334, + "sourceUnit": 1079, + "src": "81:56:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 334, + "sourceUnit": 605, + "src": "138:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 5, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 417, + "src": "839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$417", + "typeString": "contract Context" + } + }, + "id": 6, + "nodeType": "InheritanceSpecifier", + "src": "839:7:0" + } + ], + "contractDependencies": [ + 417 + ], + "contractKind": "contract", + "documentation": "@dev The reason using this instead of openzeppelin, because owner are not 'payable'", + "fullyImplemented": true, + "id": 118, + "linearizedBaseContracts": [ + 118, + 417 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 118, + "src": "853:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 7, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "853:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "private" + }, + { + "id": 11, + "libraryName": { + "contractScope": null, + "id": 9, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "895:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "889:27:0", + "typeName": { + "id": 10, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "908:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "anonymous": false, + "documentation": null, + "id": 17, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13, + "indexed": true, + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "949:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "949:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15, + "indexed": true, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "980:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "980:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "948:57:0" + }, + "src": "922:84:0" + }, + { + "body": { + "id": 32, + "nodeType": "Block", + "src": "1132:93:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1142:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 21, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1151:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1142:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 24, + "nodeType": "ExpressionStatement", + "src": "1142:21:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1207: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": 26, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1199:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1199:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 29, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1211: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": 25, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1178:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 30, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1178:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 31, + "nodeType": "EmitStatement", + "src": "1173:45:0" + } + ] + }, + "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", + "id": 33, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "1120:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:0:0" + }, + "scope": 118, + "src": "1108:117:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 40, + "nodeType": "Block", + "src": "1356:30:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 38, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 37, + "id": 39, + "nodeType": "Return", + "src": "1366:13:0" + } + ] + }, + "documentation": "@dev Returns the address of the current owner.", + "id": 41, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "1315:2:0" + }, + "returnParameters": { + "id": 37, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 36, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 41, + "src": "1339:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 35, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1339:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1338:17:0" + }, + "scope": 118, + "src": "1301:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1495:82:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 44, + "name": "isOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1513:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1513:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1524: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": 43, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "1505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1505:54:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 48, + "nodeType": "ExpressionStatement", + "src": "1505:54:0" + }, + { + "id": 49, + "nodeType": "PlaceholderStatement", + "src": "1569:1:0" + } + ] + }, + "documentation": "@dev Throws if called by any account other than the owner.", + "id": 51, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 42, + "nodeType": "ParameterList", + "parameters": [], + "src": "1492:2:0" + }, + "src": "1474:103:0", + "visibility": "internal" + }, + { + "body": { + "id": 61, + "nodeType": "Block", + "src": "1706:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 59, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 56, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1723:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1723:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 58, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1739:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1723:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 55, + "id": 60, + "nodeType": "Return", + "src": "1716:29:0" + } + ] + }, + "documentation": "@dev Returns true if the caller is the current owner.", + "id": 62, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [], + "src": "1676:2:0" + }, + "returnParameters": { + "id": 55, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 54, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1700:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 53, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1700:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1699:6:0" + }, + "scope": 118, + "src": "1660:92:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 80, + "nodeType": "Block", + "src": "2140:91:0", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 68, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2176:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2192: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": 69, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2184:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184: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": 67, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "2155:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2155:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 73, + "nodeType": "EmitStatement", + "src": "2150:45:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 74, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2205:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 76, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2222: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": 75, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2214:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2214:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2205:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 79, + "nodeType": "ExpressionStatement", + "src": "2205: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": 81, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 65, + "modifierName": { + "argumentTypes": null, + "id": 64, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "2130:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2130:9:0" + } + ], + "name": "renounceOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [], + "src": "2120:2:0" + }, + "returnParameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [], + "src": "2140:0:0" + }, + "scope": 118, + "src": "2094:137:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 92, + "nodeType": "Block", + "src": "2450:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 89, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 83, + "src": "2479:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 88, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2460:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$returns$__$", + "typeString": "function (address payable)" + } + }, + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 91, + "nodeType": "ExpressionStatement", + "src": "2460:28:0" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", + "id": 93, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 86, + "modifierName": { + "argumentTypes": null, + "id": 85, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "2440:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2440:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 84, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 83, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 93, + "src": "2407:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 82, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2407:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2406:26:0" + }, + "returnParameters": { + "id": 87, + "nodeType": "ParameterList", + "parameters": [], + "src": "2450:0:0" + }, + "scope": 118, + "src": "2380:115:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 116, + "nodeType": "Block", + "src": "2659:170:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 99, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2677:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2697: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": 100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2689:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2689:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2677:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2701: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": 98, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "2669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2669:73:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 106, + "nodeType": "ExpressionStatement", + "src": "2669:73:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 108, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2778:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 109, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2786: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": 107, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "2757:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2757:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 111, + "nodeType": "EmitStatement", + "src": "2752:43:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 112, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2805:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 113, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2814:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 115, + "nodeType": "ExpressionStatement", + "src": "2805:17:0" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", + "id": 117, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 95, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "2624:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 94, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2624:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2623:26:0" + }, + "returnParameters": { + "id": 97, + "nodeType": "ParameterList", + "parameters": [], + "src": "2659:0:0" + }, + "scope": 118, + "src": "2596:233:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 334, + "src": "819:2012:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 119, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1009, + "src": "3105:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1009", + "typeString": "contract ERC20" + } + }, + "id": 120, + "nodeType": "InheritanceSpecifier", + "src": "3105:5:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 121, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "3112:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$118", + "typeString": "contract Ownable" + } + }, + "id": 122, + "nodeType": "InheritanceSpecifier", + "src": "3112:7:0" + } + ], + "contractDependencies": [ + 118, + 417, + 1009, + 1078 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 333, + "linearizedBaseContracts": [ + 333, + 118, + 1009, + 1078, + 417 + ], + "name": "DECA", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 125, + "libraryName": { + "contractScope": null, + "id": 123, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "3132:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "3126:27:0", + "typeName": { + "id": 124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3145:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 128, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3158:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 126, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3158:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "44454341", + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3190:6:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a49565813a43765a9dfdf315aaa77336d9844a752bb9a788d2dad0f019de1858", + "typeString": "literal_string \"DECA\"" + }, + "value": "DECA" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 131, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3202:59:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 129, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3202:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "444563656e7472616c697a656420434172626f6e20746f6b656e73", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3232:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a71fc6dd39cdb20c976c32b6365d2e473e0bcd38ac1af23f856facc675f989cb", + "typeString": "literal_string \"DEcentralized CArbon tokens\"" + }, + "value": "DEcentralized CArbon tokens" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 134, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3267:35:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 132, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3267:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3300:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 139, + "name": "preICOEnds", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3352:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 135, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 136, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3377:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3383:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "1" + }, + "src": "3377:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 144, + "name": "bonus1Ends", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3396:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 140, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3396:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 141, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3421:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3427:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_1814400_by_1", + "typeString": "int_const 1814400" + }, + "value": "3" + }, + "src": "3421:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 149, + "name": "bonus2Ends", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3440:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 145, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3440:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 146, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3465:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "36", + "id": 147, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3471:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_3628800_by_1", + "typeString": "int_const 3628800" + }, + "value": "6" + }, + "src": "3465:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 154, + "name": "endDate", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3484:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 150, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3484:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 151, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3506:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3131", + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3512:8:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_6652800_by_1", + "typeString": "int_const 6652800" + }, + "value": "11" + }, + "src": "3506:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 157, + "name": "_pause", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3526:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3526:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3548:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "private" + }, + { + "body": { + "id": 166, + "nodeType": "Block", + "src": "3581:66:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3599:7:0", + "subExpression": { + "argumentTypes": null, + "id": 160, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3600:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "63726f776473616c65206f6e207061757365", + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3608:20:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cc2a660c6a64b030651f27b71bc8d6deb86294e2010eb3292c6f116ef89c98fd", + "typeString": "literal_string \"crowdsale on pause\"" + }, + "value": "crowdsale on pause" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cc2a660c6a64b030651f27b71bc8d6deb86294e2010eb3292c6f116ef89c98fd", + "typeString": "literal_string \"crowdsale on pause\"" + } + ], + "id": 159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "3591:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3591:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "3591:38:0" + }, + { + "id": 165, + "nodeType": "PlaceholderStatement", + "src": "3639:1:0" + } + ] + }, + "documentation": null, + "id": 167, + "name": "notPaused", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 158, + "nodeType": "ParameterList", + "parameters": [], + "src": "3578:2:0" + }, + "src": "3560:87:0", + "visibility": "internal" + }, + { + "body": { + "id": 174, + "nodeType": "Block", + "src": "3698:30:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 172, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3715:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 171, + "id": 173, + "nodeType": "Return", + "src": "3708:13:0" + } + ] + }, + "documentation": null, + "id": 175, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [], + "src": "3669:2:0" + }, + "returnParameters": { + "id": 171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 170, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "3693:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 169, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3693:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3692:6:0" + }, + "scope": 333, + "src": "3652:76:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 186, + "nodeType": "Block", + "src": "3779:27:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 182, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3789:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 183, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "3798:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3789:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 185, + "nodeType": "ExpressionStatement", + "src": "3789:10:0" + } + ] + }, + "documentation": null, + "id": 187, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 180, + "modifierName": { + "argumentTypes": null, + "id": 179, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "3769:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3769:9:0" + } + ], + "name": "setPause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "name": "p", + "nodeType": "VariableDeclaration", + "scope": 187, + "src": "3752:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 176, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3752:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3751:8:0" + }, + "returnParameters": { + "id": 181, + "nodeType": "ParameterList", + "parameters": [], + "src": "3779:0:0" + }, + "scope": 333, + "src": "3734:72:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 289, + "nodeType": "Block", + "src": "4042:815:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 193, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4060:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 194, + "name": "endDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 154, + "src": "4067:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4060:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1096, + "src": "4052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4052:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 197, + "nodeType": "ExpressionStatement", + "src": "4052:23:0" + }, + { + "assignments": [ + 199 + ], + "declarations": [ + { + "constant": false, + "id": 199, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4085:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4085:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 200, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4085:11:0" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "name": "toOwner", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4106:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 201, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4106:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 203, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4106:12:0" + }, + { + "assignments": [ + 205 + ], + "declarations": [ + { + "constant": false, + "id": 205, + "name": "toSender", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4128:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 204, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4128:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 206, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4128:13:0" + }, + { + "assignments": [ + 208 + ], + "declarations": [ + { + "constant": false, + "id": 208, + "name": "divBy", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4151:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 207, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4151:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 209, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4151:10:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 210, + "name": "divBy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 208, + "src": "4172:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "3430", + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4180:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "src": "4172:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 213, + "nodeType": "ExpressionStatement", + "src": "4172:10:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 214, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4273:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 215, + "name": "preICOEnds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 139, + "src": "4280:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4273:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 225, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4351:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 226, + "name": "preICOEnds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 139, + "src": "4357:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4351:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 228, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4371:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 229, + "name": "bonus1Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "4378:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4371:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4351:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 240, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4449:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 241, + "name": "bonus1Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "4455:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4449:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 243, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4469:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 244, + "name": "bonus2Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 149, + "src": "4476:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4469:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4449:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 262, + "nodeType": "Block", + "src": "4543:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 255, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4557:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 256, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4566:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4566:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323235", + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4578:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_225_by_1", + "typeString": "int_const 225" + }, + "value": "225" + }, + "src": "4566:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4557:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 261, + "nodeType": "ExpressionStatement", + "src": "4557:24:0" + } + ] + }, + "id": 263, + "nodeType": "IfStatement", + "src": "4445:147:0", + "trueBody": { + "id": 254, + "nodeType": "Block", + "src": "4488:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 247, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 248, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4511:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4511:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323530", + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4523:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_250_by_1", + "typeString": "int_const 250" + }, + "value": "250" + }, + "src": "4511:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4502:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 253, + "nodeType": "ExpressionStatement", + "src": "4502:24:0" + } + ] + } + }, + "id": 264, + "nodeType": "IfStatement", + "src": "4347:245:0", + "trueBody": { + "id": 239, + "nodeType": "Block", + "src": "4390:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 232, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 233, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4413:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4413:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323735", + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4425:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_275_by_1", + "typeString": "int_const 275" + }, + "value": "275" + }, + "src": "4413:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4404:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 238, + "nodeType": "ExpressionStatement", + "src": "4404:24:0" + } + ] + } + }, + "id": 265, + "nodeType": "IfStatement", + "src": "4269:323:0", + "trueBody": { + "id": 224, + "nodeType": "Block", + "src": "4292:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 217, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4306:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 218, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4315:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4315:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "333030", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4327:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "300" + }, + "src": "4315:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4306:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 223, + "nodeType": "ExpressionStatement", + "src": "4306:24:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 266, + "name": "toOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "4602:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 269, + "name": "divBy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 208, + "src": "4623:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 267, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4612:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 537, + "src": "4612: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": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4612:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4602:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 272, + "nodeType": "ExpressionStatement", + "src": "4602:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 273, + "name": "toSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 205, + "src": "4721:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 274, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4732:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4721:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 276, + "nodeType": "ExpressionStatement", + "src": "4721:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 278, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "4796:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 280, + "name": "toOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "4805:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 277, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 893, + "src": "4790:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4790:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 282, + "nodeType": "ExpressionStatement", + "src": "4790:23:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 284, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4829:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4829:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "toSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 205, + "src": "4841:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 283, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 893, + "src": "4823:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4823:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "ExpressionStatement", + "src": "4823:27:0" + } + ] + }, + "documentation": null, + "id": 290, + "implemented": true, + "kind": "fallback", + "modifiers": [ + { + "arguments": null, + "id": 190, + "modifierName": { + "argumentTypes": null, + "id": 189, + "name": "notPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "4015:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4015:9:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 188, + "nodeType": "ParameterList", + "parameters": [], + "src": "4012:2:0" + }, + "returnParameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [], + "src": "4042:0:0" + }, + "scope": 333, + "src": "4004:853:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 310, + "nodeType": "Block", + "src": "4944:154:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 296, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4962:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 297, + "name": "endDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 154, + "src": "4969:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4962:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 295, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1096, + "src": "4954:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4954:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 300, + "nodeType": "ExpressionStatement", + "src": "4954:23:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 305, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "5077:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DECA_$333", + "typeString": "contract DECA" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DECA_$333", + "typeString": "contract DECA" + } + ], + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5069:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5069:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5069:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 301, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "5052:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5052:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5052:39:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "5052:39:0" + } + ] + }, + "documentation": null, + "id": 311, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 293, + "modifierName": { + "argumentTypes": null, + "id": 292, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "4934:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4934:9:0" + } + ], + "name": "getETH", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 291, + "nodeType": "ParameterList", + "parameters": [], + "src": "4924:2:0" + }, + "returnParameters": { + "id": 294, + "nodeType": "ParameterList", + "parameters": [], + "src": "4944:0:0" + }, + "scope": 333, + "src": "4909:189:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 331, + "nodeType": "Block", + "src": "5443:70:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 326, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "5490:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5490:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 328, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 315, + "src": "5499: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": 323, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 313, + "src": "5467:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 322, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1078, + "src": "5460:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1078_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5460:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1078", + "typeString": "contract IERC20" + } + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1032, + "src": "5460:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5460:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 321, + "id": 330, + "nodeType": "Return", + "src": "5453:53:0" + } + ] + }, + "documentation": null, + "id": 332, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 318, + "modifierName": { + "argumentTypes": null, + "id": 317, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "5410:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5410:9:0" + } + ], + "name": "transferAnyERC20Token", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 313, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5360:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 312, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5360:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 315, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5390:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5390:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5359:43:0" + }, + "returnParameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5429:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 319, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5429:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:14:0" + }, + "scope": 333, + "src": "5329:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 334, + "src": "3088:2427:0" + } + ], + "src": "0:5516:0" + }, + "legacyAST": { + "absolutePath": "/home/p1r0/Dev/git/neetsec/dcc/contracts/DECA.sol", + "exportedSymbols": { + "DECA": [ + 333 + ], + "Ownable": [ + 118 + ] + }, + "id": 334, + "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": 334, + "sourceUnit": 1010, + "src": "25:55:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 334, + "sourceUnit": 1079, + "src": "81:56:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 334, + "sourceUnit": 605, + "src": "138:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 5, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 417, + "src": "839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$417", + "typeString": "contract Context" + } + }, + "id": 6, + "nodeType": "InheritanceSpecifier", + "src": "839:7:0" + } + ], + "contractDependencies": [ + 417 + ], + "contractKind": "contract", + "documentation": "@dev The reason using this instead of openzeppelin, because owner are not 'payable'", + "fullyImplemented": true, + "id": 118, + "linearizedBaseContracts": [ + 118, + 417 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 118, + "src": "853:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 7, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "853:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "private" + }, + { + "id": 11, + "libraryName": { + "contractScope": null, + "id": 9, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "895:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "889:27:0", + "typeName": { + "id": 10, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "908:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "anonymous": false, + "documentation": null, + "id": 17, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13, + "indexed": true, + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "949:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "949:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15, + "indexed": true, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "980:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "980:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "948:57:0" + }, + "src": "922:84:0" + }, + { + "body": { + "id": 32, + "nodeType": "Block", + "src": "1132:93:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1142:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 21, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1151:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1142:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 24, + "nodeType": "ExpressionStatement", + "src": "1142:21:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1207: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": 26, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1199:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1199:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 29, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1211: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": 25, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1178:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 30, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1178:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 31, + "nodeType": "EmitStatement", + "src": "1173:45:0" + } + ] + }, + "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", + "id": 33, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "1120:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:0:0" + }, + "scope": 118, + "src": "1108:117:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 40, + "nodeType": "Block", + "src": "1356:30:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 38, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 37, + "id": 39, + "nodeType": "Return", + "src": "1366:13:0" + } + ] + }, + "documentation": "@dev Returns the address of the current owner.", + "id": 41, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "1315:2:0" + }, + "returnParameters": { + "id": 37, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 36, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 41, + "src": "1339:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 35, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1339:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1338:17:0" + }, + "scope": 118, + "src": "1301:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1495:82:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 44, + "name": "isOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1513:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1513:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1524: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": 43, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "1505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1505:54:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 48, + "nodeType": "ExpressionStatement", + "src": "1505:54:0" + }, + { + "id": 49, + "nodeType": "PlaceholderStatement", + "src": "1569:1:0" + } + ] + }, + "documentation": "@dev Throws if called by any account other than the owner.", + "id": 51, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 42, + "nodeType": "ParameterList", + "parameters": [], + "src": "1492:2:0" + }, + "src": "1474:103:0", + "visibility": "internal" + }, + { + "body": { + "id": 61, + "nodeType": "Block", + "src": "1706:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 59, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 56, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1723:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1723:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 58, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1739:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1723:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 55, + "id": 60, + "nodeType": "Return", + "src": "1716:29:0" + } + ] + }, + "documentation": "@dev Returns true if the caller is the current owner.", + "id": 62, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [], + "src": "1676:2:0" + }, + "returnParameters": { + "id": 55, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 54, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1700:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 53, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1700:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1699:6:0" + }, + "scope": 118, + "src": "1660:92:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 80, + "nodeType": "Block", + "src": "2140:91:0", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 68, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2176:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2192: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": 69, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2184:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184: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": 67, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "2155:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2155:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 73, + "nodeType": "EmitStatement", + "src": "2150:45:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 74, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2205:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 76, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2222: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": 75, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2214:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2214:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2205:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 79, + "nodeType": "ExpressionStatement", + "src": "2205: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": 81, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 65, + "modifierName": { + "argumentTypes": null, + "id": 64, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "2130:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2130:9:0" + } + ], + "name": "renounceOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [], + "src": "2120:2:0" + }, + "returnParameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [], + "src": "2140:0:0" + }, + "scope": 118, + "src": "2094:137:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 92, + "nodeType": "Block", + "src": "2450:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 89, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 83, + "src": "2479:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 88, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2460:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$returns$__$", + "typeString": "function (address payable)" + } + }, + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 91, + "nodeType": "ExpressionStatement", + "src": "2460:28:0" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", + "id": 93, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 86, + "modifierName": { + "argumentTypes": null, + "id": 85, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "2440:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2440:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 84, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 83, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 93, + "src": "2407:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 82, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2407:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2406:26:0" + }, + "returnParameters": { + "id": 87, + "nodeType": "ParameterList", + "parameters": [], + "src": "2450:0:0" + }, + "scope": 118, + "src": "2380:115:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 116, + "nodeType": "Block", + "src": "2659:170:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 99, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2677:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2697: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": 100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2689:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2689:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2677:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2701: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": 98, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "2669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2669:73:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 106, + "nodeType": "ExpressionStatement", + "src": "2669:73:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 108, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2778:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 109, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2786: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": 107, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "2757:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2757:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 111, + "nodeType": "EmitStatement", + "src": "2752:43:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 112, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2805:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 113, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2814:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 115, + "nodeType": "ExpressionStatement", + "src": "2805:17:0" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", + "id": 117, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 95, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "2624:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 94, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2624:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2623:26:0" + }, + "returnParameters": { + "id": 97, + "nodeType": "ParameterList", + "parameters": [], + "src": "2659:0:0" + }, + "scope": 118, + "src": "2596:233:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 334, + "src": "819:2012:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 119, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1009, + "src": "3105:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1009", + "typeString": "contract ERC20" + } + }, + "id": 120, + "nodeType": "InheritanceSpecifier", + "src": "3105:5:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 121, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "3112:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$118", + "typeString": "contract Ownable" + } + }, + "id": 122, + "nodeType": "InheritanceSpecifier", + "src": "3112:7:0" + } + ], + "contractDependencies": [ + 118, + 417, + 1009, + 1078 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 333, + "linearizedBaseContracts": [ + 333, + 118, + 1009, + 1078, + 417 + ], + "name": "DECA", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 125, + "libraryName": { + "contractScope": null, + "id": 123, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "3132:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "3126:27:0", + "typeName": { + "id": 124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3145:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 128, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3158:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 126, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3158:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "44454341", + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3190:6:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a49565813a43765a9dfdf315aaa77336d9844a752bb9a788d2dad0f019de1858", + "typeString": "literal_string \"DECA\"" + }, + "value": "DECA" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 131, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3202:59:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 129, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3202:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "444563656e7472616c697a656420434172626f6e20746f6b656e73", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3232:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a71fc6dd39cdb20c976c32b6365d2e473e0bcd38ac1af23f856facc675f989cb", + "typeString": "literal_string \"DEcentralized CArbon tokens\"" + }, + "value": "DEcentralized CArbon tokens" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 134, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3267:35:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 132, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3267:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3300:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 139, + "name": "preICOEnds", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3352:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 135, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 136, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3377:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3383:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "1" + }, + "src": "3377:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 144, + "name": "bonus1Ends", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3396:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 140, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3396:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 141, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3421:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3427:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_1814400_by_1", + "typeString": "int_const 1814400" + }, + "value": "3" + }, + "src": "3421:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 149, + "name": "bonus2Ends", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3440:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 145, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3440:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 146, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3465:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "36", + "id": 147, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3471:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_3628800_by_1", + "typeString": "int_const 3628800" + }, + "value": "6" + }, + "src": "3465:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 154, + "name": "endDate", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3484:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 150, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3484:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 151, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3506:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3131", + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3512:8:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_6652800_by_1", + "typeString": "int_const 6652800" + }, + "value": "11" + }, + "src": "3506:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 157, + "name": "_pause", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3526:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3526:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3548:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "private" + }, + { + "body": { + "id": 166, + "nodeType": "Block", + "src": "3581:66:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3599:7:0", + "subExpression": { + "argumentTypes": null, + "id": 160, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3600:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "63726f776473616c65206f6e207061757365", + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3608:20:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cc2a660c6a64b030651f27b71bc8d6deb86294e2010eb3292c6f116ef89c98fd", + "typeString": "literal_string \"crowdsale on pause\"" + }, + "value": "crowdsale on pause" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cc2a660c6a64b030651f27b71bc8d6deb86294e2010eb3292c6f116ef89c98fd", + "typeString": "literal_string \"crowdsale on pause\"" + } + ], + "id": 159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "3591:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3591:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "3591:38:0" + }, + { + "id": 165, + "nodeType": "PlaceholderStatement", + "src": "3639:1:0" + } + ] + }, + "documentation": null, + "id": 167, + "name": "notPaused", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 158, + "nodeType": "ParameterList", + "parameters": [], + "src": "3578:2:0" + }, + "src": "3560:87:0", + "visibility": "internal" + }, + { + "body": { + "id": 174, + "nodeType": "Block", + "src": "3698:30:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 172, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3715:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 171, + "id": 173, + "nodeType": "Return", + "src": "3708:13:0" + } + ] + }, + "documentation": null, + "id": 175, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [], + "src": "3669:2:0" + }, + "returnParameters": { + "id": 171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 170, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "3693:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 169, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3693:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3692:6:0" + }, + "scope": 333, + "src": "3652:76:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 186, + "nodeType": "Block", + "src": "3779:27:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 182, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3789:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 183, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "3798:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3789:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 185, + "nodeType": "ExpressionStatement", + "src": "3789:10:0" + } + ] + }, + "documentation": null, + "id": 187, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 180, + "modifierName": { + "argumentTypes": null, + "id": 179, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "3769:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3769:9:0" + } + ], + "name": "setPause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "name": "p", + "nodeType": "VariableDeclaration", + "scope": 187, + "src": "3752:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 176, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3752:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3751:8:0" + }, + "returnParameters": { + "id": 181, + "nodeType": "ParameterList", + "parameters": [], + "src": "3779:0:0" + }, + "scope": 333, + "src": "3734:72:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 289, + "nodeType": "Block", + "src": "4042:815:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 193, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4060:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 194, + "name": "endDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 154, + "src": "4067:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4060:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1096, + "src": "4052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4052:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 197, + "nodeType": "ExpressionStatement", + "src": "4052:23:0" + }, + { + "assignments": [ + 199 + ], + "declarations": [ + { + "constant": false, + "id": 199, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4085:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4085:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 200, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4085:11:0" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "name": "toOwner", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4106:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 201, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4106:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 203, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4106:12:0" + }, + { + "assignments": [ + 205 + ], + "declarations": [ + { + "constant": false, + "id": 205, + "name": "toSender", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4128:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 204, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4128:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 206, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4128:13:0" + }, + { + "assignments": [ + 208 + ], + "declarations": [ + { + "constant": false, + "id": 208, + "name": "divBy", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4151:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 207, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4151:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 209, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4151:10:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 210, + "name": "divBy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 208, + "src": "4172:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "3430", + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4180:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "src": "4172:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 213, + "nodeType": "ExpressionStatement", + "src": "4172:10:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 214, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4273:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 215, + "name": "preICOEnds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 139, + "src": "4280:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4273:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 225, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4351:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 226, + "name": "preICOEnds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 139, + "src": "4357:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4351:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 228, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4371:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 229, + "name": "bonus1Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "4378:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4371:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4351:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 240, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4449:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 241, + "name": "bonus1Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "4455:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4449:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 243, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4469:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 244, + "name": "bonus2Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 149, + "src": "4476:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4469:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4449:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 262, + "nodeType": "Block", + "src": "4543:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 255, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4557:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 256, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4566:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4566:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323235", + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4578:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_225_by_1", + "typeString": "int_const 225" + }, + "value": "225" + }, + "src": "4566:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4557:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 261, + "nodeType": "ExpressionStatement", + "src": "4557:24:0" + } + ] + }, + "id": 263, + "nodeType": "IfStatement", + "src": "4445:147:0", + "trueBody": { + "id": 254, + "nodeType": "Block", + "src": "4488:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 247, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 248, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4511:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4511:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323530", + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4523:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_250_by_1", + "typeString": "int_const 250" + }, + "value": "250" + }, + "src": "4511:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4502:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 253, + "nodeType": "ExpressionStatement", + "src": "4502:24:0" + } + ] + } + }, + "id": 264, + "nodeType": "IfStatement", + "src": "4347:245:0", + "trueBody": { + "id": 239, + "nodeType": "Block", + "src": "4390:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 232, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 233, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4413:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4413:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323735", + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4425:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_275_by_1", + "typeString": "int_const 275" + }, + "value": "275" + }, + "src": "4413:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4404:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 238, + "nodeType": "ExpressionStatement", + "src": "4404:24:0" + } + ] + } + }, + "id": 265, + "nodeType": "IfStatement", + "src": "4269:323:0", + "trueBody": { + "id": 224, + "nodeType": "Block", + "src": "4292:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 217, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4306:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 218, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4315:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4315:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "333030", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4327:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "300" + }, + "src": "4315:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4306:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 223, + "nodeType": "ExpressionStatement", + "src": "4306:24:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 266, + "name": "toOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "4602:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 269, + "name": "divBy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 208, + "src": "4623:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 267, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4612:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 537, + "src": "4612: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": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4612:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4602:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 272, + "nodeType": "ExpressionStatement", + "src": "4602:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 273, + "name": "toSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 205, + "src": "4721:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 274, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4732:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4721:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 276, + "nodeType": "ExpressionStatement", + "src": "4721:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 278, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "4796:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 280, + "name": "toOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "4805:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 277, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 893, + "src": "4790:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4790:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 282, + "nodeType": "ExpressionStatement", + "src": "4790:23:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 284, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4829:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4829:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "toSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 205, + "src": "4841:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 283, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 893, + "src": "4823:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4823:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "ExpressionStatement", + "src": "4823:27:0" + } + ] + }, + "documentation": null, + "id": 290, + "implemented": true, + "kind": "fallback", + "modifiers": [ + { + "arguments": null, + "id": 190, + "modifierName": { + "argumentTypes": null, + "id": 189, + "name": "notPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "4015:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4015:9:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 188, + "nodeType": "ParameterList", + "parameters": [], + "src": "4012:2:0" + }, + "returnParameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [], + "src": "4042:0:0" + }, + "scope": 333, + "src": "4004:853:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 310, + "nodeType": "Block", + "src": "4944:154:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 296, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4962:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 297, + "name": "endDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 154, + "src": "4969:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4962:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 295, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1096, + "src": "4954:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4954:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 300, + "nodeType": "ExpressionStatement", + "src": "4954:23:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 305, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "5077:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DECA_$333", + "typeString": "contract DECA" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DECA_$333", + "typeString": "contract DECA" + } + ], + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5069:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5069:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5069:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 301, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "5052:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5052:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5052:39:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "5052:39:0" + } + ] + }, + "documentation": null, + "id": 311, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 293, + "modifierName": { + "argumentTypes": null, + "id": 292, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "4934:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4934:9:0" + } + ], + "name": "getETH", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 291, + "nodeType": "ParameterList", + "parameters": [], + "src": "4924:2:0" + }, + "returnParameters": { + "id": 294, + "nodeType": "ParameterList", + "parameters": [], + "src": "4944:0:0" + }, + "scope": 333, + "src": "4909:189:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 331, + "nodeType": "Block", + "src": "5443:70:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 326, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "5490:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5490:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 328, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 315, + "src": "5499: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": 323, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 313, + "src": "5467:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 322, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1078, + "src": "5460:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1078_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5460:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1078", + "typeString": "contract IERC20" + } + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1032, + "src": "5460:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5460:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 321, + "id": 330, + "nodeType": "Return", + "src": "5453:53:0" + } + ] + }, + "documentation": null, + "id": 332, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 318, + "modifierName": { + "argumentTypes": null, + "id": 317, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "5410:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5410:9:0" + } + ], + "name": "transferAnyERC20Token", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 313, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5360:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 312, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5360:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 315, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5390:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5390:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5359:43:0" + }, + "returnParameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5429:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 319, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5429:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:14:0" + }, + "scope": 333, + "src": "5329:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 334, + "src": "3088:2427:0" + } + ], + "src": "0:5516:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.12+commit.7709ece9.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.19", + "updatedAt": "2020-02-18T05:15:08.090Z", + "networkType": "ethereum", + "devdoc": { + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address." + }, + "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." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/ERC20.json b/build/contracts/ERC20.json new file mode 100644 index 0000000..2cfab80 --- /dev/null +++ b/build/contracts/ERC20.json @@ -0,0 +1,11382 @@ +{ + "contractName": "ERC20", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC20} interface. * This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20Mintable}. * TIP: For a detailed writeup see our guide https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. * We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. * Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":\"ERC20\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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": "0x6080604052610e3a806100136000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a08231146101fd578063a457c2d714610255578063a9059cbb146102bb578063dd62ed3e1461032157610088565b8063095ea7b31461008d57806318160ddd146100f357806323b872dd146101115780633950935114610197575b600080fd5b6100d9600480360360408110156100a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610399565b604051808215151515815260200191505060405180910390f35b6100fb6103b7565b6040518082815260200191505060405180910390f35b61017d6004803603606081101561012757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506103c1565b604051808215151515815260200191505060405180910390f35b6101e3600480360360408110156101ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061049a565b604051808215151515815260200191505060405180910390f35b61023f6004803603602081101561021357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061054d565b6040518082815260200191505060405180910390f35b6102a16004803603604081101561026b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610595565b604051808215151515815260200191505060405180910390f35b610307600480360360408110156102d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610662565b604051808215151515815260200191505060405180910390f35b6103836004803603604081101561033757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610680565b6040518082815260200191505060405180910390f35b60006103ad6103a6610707565b848461070f565b6001905092915050565b6000600254905090565b60006103ce848484610906565b61048f846103da610707565b61048a85604051806060016040528060288152602001610d7060289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610440610707565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bbc9092919063ffffffff16565b61070f565b600190509392505050565b60006105436104a7610707565b8461053e85600160006104b8610707565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c7c90919063ffffffff16565b61070f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006106586105a2610707565b8461065385604051806060016040528060258152602001610de160259139600160006105cc610707565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bbc9092919063ffffffff16565b61070f565b6001905092915050565b600061067661066f610707565b8484610906565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610795576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180610dbd6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561081b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610d286022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561098c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610d986025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610d056023913960400191505060405180910390fd5b610a7d81604051806060016040528060268152602001610d4a602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bbc9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b10816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c7c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610c69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c2e578082015181840152602081019050610c13565b50505050905090810190601f168015610c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015610cfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582080e7b564001ca4e84e6684978154f37a6f3d0a99361ab3ca39beba9733d52f5564736f6c634300050c0032", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a08231146101fd578063a457c2d714610255578063a9059cbb146102bb578063dd62ed3e1461032157610088565b8063095ea7b31461008d57806318160ddd146100f357806323b872dd146101115780633950935114610197575b600080fd5b6100d9600480360360408110156100a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610399565b604051808215151515815260200191505060405180910390f35b6100fb6103b7565b6040518082815260200191505060405180910390f35b61017d6004803603606081101561012757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506103c1565b604051808215151515815260200191505060405180910390f35b6101e3600480360360408110156101ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061049a565b604051808215151515815260200191505060405180910390f35b61023f6004803603602081101561021357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061054d565b6040518082815260200191505060405180910390f35b6102a16004803603604081101561026b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610595565b604051808215151515815260200191505060405180910390f35b610307600480360360408110156102d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610662565b604051808215151515815260200191505060405180910390f35b6103836004803603604081101561033757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610680565b6040518082815260200191505060405180910390f35b60006103ad6103a6610707565b848461070f565b6001905092915050565b6000600254905090565b60006103ce848484610906565b61048f846103da610707565b61048a85604051806060016040528060288152602001610d7060289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610440610707565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bbc9092919063ffffffff16565b61070f565b600190509392505050565b60006105436104a7610707565b8461053e85600160006104b8610707565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c7c90919063ffffffff16565b61070f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006106586105a2610707565b8461065385604051806060016040528060258152602001610de160259139600160006105cc610707565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bbc9092919063ffffffff16565b61070f565b6001905092915050565b600061067661066f610707565b8484610906565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610795576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180610dbd6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561081b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610d286022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561098c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610d986025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610d056023913960400191505060405180910390fd5b610a7d81604051806060016040528060268152602001610d4a602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bbc9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b10816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c7c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610c69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c2e578082015181840152602081019050610c13565b50505050905090810190601f168015610c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015610cfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582080e7b564001ca4e84e6684978154f37a6f3d0a99361ab3ca39beba9733d52f5564736f6c634300050c0032", + "sourceMap": "1268:6824:4:-;;;;;;;;;", + "deployedSourceMap": "1268:6824:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1268:6824:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2500:149;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2500:149:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1559:89;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3107:300;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3107:300:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3802:207;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3802:207:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1706:108;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1706:108:4;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4496:258;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4496:258:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2017:155;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2017:155:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2230:132;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2230:132:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2500:149;2566:4;2582:39;2591:12;:10;:12::i;:::-;2605:7;2614:6;2582:8;:39::i;:::-;2638:4;2631:11;;2500:149;;;;:::o;1559:89::-;1603:7;1629:12;;1622:19;;1559:89;:::o;3107:300::-;3196:4;3212:36;3222:6;3230:9;3241:6;3212:9;:36::i;:::-;3258:121;3267:6;3275:12;:10;:12::i;:::-;3289:89;3327:6;3289:89;;;;;;;;;;;;;;;;;:11;:19;3301:6;3289:19;;;;;;;;;;;;;;;:33;3309:12;:10;:12::i;:::-;3289:33;;;;;;;;;;;;;;;;:37;;:89;;;;;:::i;:::-;3258:8;:121::i;:::-;3396:4;3389:11;;3107:300;;;;;:::o;3802:207::-;3882:4;3898:83;3907:12;:10;:12::i;:::-;3921:7;3930:50;3969:10;3930:11;:25;3942:12;:10;:12::i;:::-;3930:25;;;;;;;;;;;;;;;:34;3956:7;3930:34;;;;;;;;;;;;;;;;:38;;:50;;;;:::i;:::-;3898:8;:83::i;:::-;3998:4;3991:11;;3802:207;;;;:::o;1706:108::-;1763:7;1789:9;:18;1799:7;1789:18;;;;;;;;;;;;;;;;1782:25;;1706:108;;;:::o;4496:258::-;4581:4;4597:129;4606:12;:10;:12::i;:::-;4620:7;4629:96;4668:15;4629:96;;;;;;;;;;;;;;;;;:11;:25;4641:12;:10;:12::i;:::-;4629:25;;;;;;;;;;;;;;;:34;4655:7;4629:34;;;;;;;;;;;;;;;;:38;;:96;;;;;:::i;:::-;4597:8;:129::i;:::-;4743:4;4736:11;;4496:258;;;;:::o;2017:155::-;2086:4;2102:42;2112:12;:10;:12::i;:::-;2126:9;2137:6;2102:9;:42::i;:::-;2161:4;2154:11;;2017:155;;;;:::o;2230:132::-;2302:7;2328:11;:18;2340:5;2328:18;;;;;;;;;;;;;;;:27;2347:7;2328:27;;;;;;;;;;;;;;;;2321:34;;2230:132;;;;:::o;788:96:2:-;833:15;867:10;860:17;;788:96;:::o;7351:332:4:-;7461:1;7444:19;;:5;:19;;;;7436:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7541:1;7522:21;;:7;:21;;;;7514:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7623:6;7593:11;:18;7605:5;7593:18;;;;;;;;;;;;;;;:27;7612:7;7593:27;;;;;;;;;;;;;;;:36;;;;7660:7;7644:32;;7653:5;7644:32;;;7669:6;7644:32;;;;;;;;;;;;;;;;;;7351:332;;;:::o;5228:464::-;5343:1;5325:20;;:6;:20;;;;5317:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5426:1;5405:23;;:9;:23;;;;5397:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5499;5521:6;5499:71;;;;;;;;;;;;;;;;;:9;:17;5509:6;5499:17;;;;;;;;;;;;;;;;:21;;:71;;;;;:::i;:::-;5479:9;:17;5489:6;5479:17;;;;;;;;;;;;;;;:91;;;;5603:32;5628:6;5603:9;:20;5613:9;5603:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;5580:9;:20;5590:9;5580:20;;;;;;;;;;;;;;;:55;;;;5667:9;5650:35;;5659:6;5650:35;;;5678:6;5650:35;;;;;;;;;;;;;;;;;;5228:464;;;:::o;1732:187:3:-;1818:7;1850:1;1845;:6;;1853:12;1837:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1837:29:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1876:9;1892:1;1888;:5;1876:17;;1911:1;1904:8;;;1732:187;;;;;:::o;834:176::-;892:7;911:9;927:1;923;:5;911:17;;951:1;946;:6;;938:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;995:8;;;834:176;;;;:::o", + "source": "pragma solidity ^0.5.0;\n\nimport \"../../GSN/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20Mintable}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for `sender`'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`.`amount` is then deducted\n * from the caller's allowance.\n *\n * See {_burn} and {_approve}.\n */\n function _burnFrom(address account, uint256 amount) internal {\n _burn(account, amount);\n _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, \"ERC20: burn amount exceeds allowance\"));\n }\n}\n", + "sourcePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "exportedSymbols": { + "ERC20": [ + 1009 + ] + }, + "id": 1010, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 606, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", + "file": "../../GSN/Context.sol", + "id": 607, + "nodeType": "ImportDirective", + "scope": 1010, + "sourceUnit": 418, + "src": "25:31:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 608, + "nodeType": "ImportDirective", + "scope": 1010, + "sourceUnit": 1079, + "src": "57:22:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 609, + "nodeType": "ImportDirective", + "scope": 1010, + "sourceUnit": 605, + "src": "80:33:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 610, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 417, + "src": "1286:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$417", + "typeString": "contract Context" + } + }, + "id": 611, + "nodeType": "InheritanceSpecifier", + "src": "1286:7:4" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 612, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1078, + "src": "1295:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1078", + "typeString": "contract IERC20" + } + }, + "id": 613, + "nodeType": "InheritanceSpecifier", + "src": "1295:6:4" + } + ], + "contractDependencies": [ + 417, + 1078 + ], + "contractKind": "contract", + "documentation": "@dev Implementation of the {IERC20} interface.\n * This implementation is agnostic to the way tokens are created. This means\nthat a supply mechanism has to be added in a derived contract using {_mint}.\nFor a generic mechanism see {ERC20Mintable}.\n * TIP: For a detailed writeup see our guide\nhttps://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\nto implement supply mechanisms].\n * We have followed general OpenZeppelin guidelines: functions revert instead\nof returning `false` on failure. This behavior is nonetheless conventional\nand does not conflict with the expectations of ERC20 applications.\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\nThis allows applications to reconstruct the allowance for all accounts just\nby listening to said events. Other implementations of the EIP may not emit\nthese events, as it isn't required by the specification.\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\nfunctions have been added to mitigate the well-known issues around setting\nallowances. See {IERC20-approve}.", + "fullyImplemented": true, + "id": 1009, + "linearizedBaseContracts": [ + 1009, + 1078, + 417 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 616, + "libraryName": { + "contractScope": null, + "id": 614, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "1314:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1308:27:4", + "typeName": { + "id": 615, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1327:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 620, + "name": "_balances", + "nodeType": "VariableDeclaration", + "scope": 1009, + "src": "1341:46:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 619, + "keyType": { + "id": 617, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1350:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1341:28:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 618, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1361:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 626, + "name": "_allowances", + "nodeType": "VariableDeclaration", + "scope": 1009, + "src": "1394:69:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 625, + "keyType": { + "id": 621, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1403:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1394:49:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 624, + "keyType": { + "id": 622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1423:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1414:28:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 623, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1434:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 628, + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1009, + "src": "1470:28:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 627, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1470:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 635, + "nodeType": "Block", + "src": "1612:36:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 633, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "1629:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 632, + "id": 634, + "nodeType": "Return", + "src": "1622:19:4" + } + ] + }, + "documentation": "@dev See {IERC20-totalSupply}.", + "id": 636, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 629, + "nodeType": "ParameterList", + "parameters": [], + "src": "1579:2:4" + }, + "returnParameters": { + "id": 632, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 631, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 636, + "src": "1603:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 630, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1603:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1602:9:4" + }, + "scope": 1009, + "src": "1559:89:4", + "stateMutability": "view", + "superFunction": 1016, + "visibility": "public" + }, + { + "body": { + "id": 647, + "nodeType": "Block", + "src": "1772:42:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 643, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "1789:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 645, + "indexExpression": { + "argumentTypes": null, + "id": 644, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 638, + "src": "1799:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1789:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 642, + "id": 646, + "nodeType": "Return", + "src": "1782:25:4" + } + ] + }, + "documentation": "@dev See {IERC20-balanceOf}.", + "id": 648, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 639, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 638, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 648, + "src": "1725:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 637, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1725:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1724:17:4" + }, + "returnParameters": { + "id": 642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 641, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 648, + "src": "1763:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 640, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1763:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1762:9:4" + }, + "scope": 1009, + "src": "1706:108:4", + "stateMutability": "view", + "superFunction": 1023, + "visibility": "public" + }, + { + "body": { + "id": 666, + "nodeType": "Block", + "src": "2092:80:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 658, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "2112:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2112:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 660, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "2126:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 661, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 652, + "src": "2137:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 657, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 850, + "src": "2102:9:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2102:42:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 663, + "nodeType": "ExpressionStatement", + "src": "2102:42:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2161:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 656, + "id": 665, + "nodeType": "Return", + "src": "2154:11:4" + } + ] + }, + "documentation": "@dev See {IERC20-transfer}.\n * Requirements:\n * - `recipient` cannot be the zero address.\n- the caller must have a balance of at least `amount`.", + "id": 667, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 650, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 667, + "src": "2035:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 649, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2035:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 652, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 667, + "src": "2054:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 651, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2054:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2034:35:4" + }, + "returnParameters": { + "id": 656, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 655, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 667, + "src": "2086:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 654, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2086:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2085:6:4" + }, + "scope": 1009, + "src": "2017:155:4", + "stateMutability": "nonpayable", + "superFunction": 1032, + "visibility": "public" + }, + { + "body": { + "id": 682, + "nodeType": "Block", + "src": "2311:51:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 676, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "2328:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 678, + "indexExpression": { + "argumentTypes": null, + "id": 677, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "2340:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2328:18:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 680, + "indexExpression": { + "argumentTypes": null, + "id": 679, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 671, + "src": "2347:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2328:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 675, + "id": 681, + "nodeType": "Return", + "src": "2321:34:4" + } + ] + }, + "documentation": "@dev See {IERC20-allowance}.", + "id": 683, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 672, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 669, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 683, + "src": "2249:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 668, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2249:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 671, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 683, + "src": "2264:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 670, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2264:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2248:32:4" + }, + "returnParameters": { + "id": 675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 674, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 683, + "src": "2302:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 673, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2302:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2301:9:4" + }, + "scope": 1009, + "src": "2230:132:4", + "stateMutability": "view", + "superFunction": 1041, + "visibility": "public" + }, + { + "body": { + "id": 701, + "nodeType": "Block", + "src": "2572:77:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 693, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "2591:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2591:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 695, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 685, + "src": "2605:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 696, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "2614:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 692, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "2582:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2582:39:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "2582:39:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2638:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 691, + "id": 700, + "nodeType": "Return", + "src": "2631:11:4" + } + ] + }, + "documentation": "@dev See {IERC20-approve}.\n * Requirements:\n * - `spender` cannot be the zero address.", + "id": 702, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 688, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 685, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 702, + "src": "2517:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 684, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2517:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 687, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 702, + "src": "2534:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2534:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2516:33:4" + }, + "returnParameters": { + "id": 691, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 690, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 702, + "src": "2566:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 689, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2566:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2565:6:4" + }, + "scope": 1009, + "src": "2500:149:4", + "stateMutability": "nonpayable", + "superFunction": 1050, + "visibility": "public" + }, + { + "body": { + "id": 737, + "nodeType": "Block", + "src": "3202:205:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 714, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "3222:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 706, + "src": "3230:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 716, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "3241:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 713, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 850, + "src": "3212:9:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3212:36:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 718, + "nodeType": "ExpressionStatement", + "src": "3212:36:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 720, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "3267:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 721, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "3275:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3275:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 730, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "3327:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3335:42:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" + }, + "value": "ERC20: transfer amount exceeds allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 723, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "3289:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 725, + "indexExpression": { + "argumentTypes": null, + "id": 724, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "3301:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3289:19:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 728, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 726, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "3309:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3309:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3289:33:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "3289:37:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3289:89:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 719, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "3258:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3258:121:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 734, + "nodeType": "ExpressionStatement", + "src": "3258:121:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3396:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 712, + "id": 736, + "nodeType": "Return", + "src": "3389:11:4" + } + ] + }, + "documentation": "@dev See {IERC20-transferFrom}.\n * Emits an {Approval} event indicating the updated allowance. This is not\nrequired by the EIP. See the note at the beginning of {ERC20};\n * Requirements:\n- `sender` and `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.\n- the caller must have allowance for `sender`'s tokens of at least\n`amount`.", + "id": 738, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 704, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 738, + "src": "3129:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 703, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3129:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 706, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 738, + "src": "3145:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 705, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3145:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 708, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 738, + "src": "3164:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 707, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3164:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3128:51:4" + }, + "returnParameters": { + "id": 712, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 711, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 738, + "src": "3196:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 710, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3196:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3195:6:4" + }, + "scope": 1009, + "src": "3107:300:4", + "stateMutability": "nonpayable", + "superFunction": 1061, + "visibility": "public" + }, + { + "body": { + "id": 764, + "nodeType": "Block", + "src": "3888:121:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 748, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "3907:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3907:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 750, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 740, + "src": "3921:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 758, + "name": "addedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 742, + "src": "3969:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 751, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "3930:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 754, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 752, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "3942:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3942:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3930:25:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 756, + "indexExpression": { + "argumentTypes": null, + "id": 755, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 740, + "src": "3956:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3930:34:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "3930:38:4", + "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": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 747, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "3898:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3898:83:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 761, + "nodeType": "ExpressionStatement", + "src": "3898:83:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3998:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 746, + "id": 763, + "nodeType": "Return", + "src": "3991:11:4" + } + ] + }, + "documentation": "@dev Atomically increases the allowance granted to `spender` by the caller.\n * This is an alternative to {approve} that can be used as a mitigation for\nproblems described in {IERC20-approve}.\n * Emits an {Approval} event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.", + "id": 765, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "increaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 743, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 740, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 765, + "src": "3829:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 739, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3829:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 742, + "name": "addedValue", + "nodeType": "VariableDeclaration", + "scope": 765, + "src": "3846:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3846:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3828:37:4" + }, + "returnParameters": { + "id": 746, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 745, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 765, + "src": "3882:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 744, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3882:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3881:6:4" + }, + "scope": 1009, + "src": "3802:207:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 792, + "nodeType": "Block", + "src": "4587:167:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 775, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "4606:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4606:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 777, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 767, + "src": "4620:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 785, + "name": "subtractedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 769, + "src": "4668:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4685:39:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "typeString": "literal_string \"ERC20: decreased allowance below zero\"" + }, + "value": "ERC20: decreased allowance below zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "typeString": "literal_string \"ERC20: decreased allowance below zero\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 778, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "4629:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 781, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 779, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "4641:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4641:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4629:25:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 783, + "indexExpression": { + "argumentTypes": null, + "id": 782, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 767, + "src": "4655:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4629:34:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "4629:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4629:96:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 774, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "4597:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4597:129:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 789, + "nodeType": "ExpressionStatement", + "src": "4597:129:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4743:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 773, + "id": 791, + "nodeType": "Return", + "src": "4736:11:4" + } + ] + }, + "documentation": "@dev Atomically decreases the allowance granted to `spender` by the caller.\n * This is an alternative to {approve} that can be used as a mitigation for\nproblems described in {IERC20-approve}.\n * Emits an {Approval} event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.\n- `spender` must have allowance for the caller of at least\n`subtractedValue`.", + "id": 793, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 767, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 793, + "src": "4523:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 766, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4523:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 769, + "name": "subtractedValue", + "nodeType": "VariableDeclaration", + "scope": 793, + "src": "4540:23:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 768, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4540:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4522:42:4" + }, + "returnParameters": { + "id": 773, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 772, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 793, + "src": "4581:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 771, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4581:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4580:6:4" + }, + "scope": 1009, + "src": "4496:258:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 849, + "nodeType": "Block", + "src": "5307:385:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 803, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 795, + "src": "5325:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5343:1:4", + "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": 804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5335:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 806, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5335:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5325:20:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373", + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5347:39:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "typeString": "literal_string \"ERC20: transfer from the zero address\"" + }, + "value": "ERC20: transfer from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "typeString": "literal_string \"ERC20: transfer from the zero address\"" + } + ], + "id": 802, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "5317:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5317:70:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 810, + "nodeType": "ExpressionStatement", + "src": "5317:70:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 812, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 797, + "src": "5405:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5426:1:4", + "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": 813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5418:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5418:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5405:23:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373", + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5430:37:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "typeString": "literal_string \"ERC20: transfer to the zero address\"" + }, + "value": "ERC20: transfer to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "typeString": "literal_string \"ERC20: transfer to the zero address\"" + } + ], + "id": 811, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "5397:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5397:71:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 819, + "nodeType": "ExpressionStatement", + "src": "5397:71:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 820, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "5479:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 822, + "indexExpression": { + "argumentTypes": null, + "id": 821, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 795, + "src": "5489:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5479:17:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 827, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "5521:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5529:40:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" + }, + "value": "ERC20: transfer amount exceeds balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 823, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "5499:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 825, + "indexExpression": { + "argumentTypes": null, + "id": 824, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 795, + "src": "5509:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5499:17:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "5499:21:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5499:71:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5479:91:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 831, + "nodeType": "ExpressionStatement", + "src": "5479:91:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 832, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "5580:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 834, + "indexExpression": { + "argumentTypes": null, + "id": 833, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 797, + "src": "5590:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5580:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 839, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "5628:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 835, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "5603:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 837, + "indexExpression": { + "argumentTypes": null, + "id": 836, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 797, + "src": "5613:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5603:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "5603:24:4", + "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": 840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5603:32:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5580:55:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 842, + "nodeType": "ExpressionStatement", + "src": "5580:55:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 844, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 795, + "src": "5659:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 845, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 797, + "src": "5667:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 846, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "5678:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 843, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1069, + "src": "5650:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5650:35:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 848, + "nodeType": "EmitStatement", + "src": "5645:40:4" + } + ] + }, + "documentation": "@dev Moves tokens `amount` from `sender` to `recipient`.\n * This is internal function is equivalent to {transfer}, and can be used to\ne.g. implement automatic token fees, slashing mechanisms, etc.\n * Emits a {Transfer} event.\n * Requirements:\n * - `sender` cannot be the zero address.\n- `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.", + "id": 850, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 800, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 795, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 850, + "src": "5247:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 794, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5247:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 797, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 850, + "src": "5263:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 796, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5263:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 799, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 850, + "src": "5282:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 798, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5282:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5246:51:4" + }, + "returnParameters": { + "id": 801, + "nodeType": "ParameterList", + "parameters": [], + "src": "5307:0:4" + }, + "scope": 1009, + "src": "5228:464:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 892, + "nodeType": "Block", + "src": "6019:245:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 858, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "6037:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6056:1:4", + "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": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6048:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6048:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6037:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6060:33:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "typeString": "literal_string \"ERC20: mint to the zero address\"" + }, + "value": "ERC20: mint to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "typeString": "literal_string \"ERC20: mint to the zero address\"" + } + ], + "id": 857, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "6029:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6029:65:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 865, + "nodeType": "ExpressionStatement", + "src": "6029:65:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 866, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "6105:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 869, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "6137:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 867, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "6120:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "6120:16:4", + "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": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6120:24:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6105:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 872, + "nodeType": "ExpressionStatement", + "src": "6105:39:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 873, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "6154:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 875, + "indexExpression": { + "argumentTypes": null, + "id": 874, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "6164:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6154:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 880, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "6198:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 876, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "6175:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "id": 877, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "6185:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6175:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "6175:22:4", + "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": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6175:30:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6154:51:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 883, + "nodeType": "ExpressionStatement", + "src": "6154:51:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6237:1:4", + "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": 885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6229:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6229:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 888, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "6241:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 889, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "6250:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 884, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1069, + "src": "6220:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6220:37:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 891, + "nodeType": "EmitStatement", + "src": "6215:42:4" + } + ] + }, + "documentation": "@dev Creates `amount` tokens and assigns them to `account`, increasing\nthe total supply.\n * Emits a {Transfer} event with `from` set to the zero address.\n * Requirements\n * - `to` cannot be the zero address.", + "id": 893, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 855, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 852, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 893, + "src": "5977:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 851, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5977:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 854, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 893, + "src": "5994:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 853, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5994:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5976:33:4" + }, + "returnParameters": { + "id": 856, + "nodeType": "ParameterList", + "parameters": [], + "src": "6019:0:4" + }, + "scope": 1009, + "src": "5962:302:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 936, + "nodeType": "Block", + "src": "6641:285:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 901, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 895, + "src": "6659:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6678:1:4", + "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": 902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6670:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6670:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6659:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373", + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6682:35:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "typeString": "literal_string \"ERC20: burn from the zero address\"" + }, + "value": "ERC20: burn from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "typeString": "literal_string \"ERC20: burn from the zero address\"" + } + ], + "id": 900, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "6651:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6651:67:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 908, + "nodeType": "ExpressionStatement", + "src": "6651:67:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 909, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "6729:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 911, + "indexExpression": { + "argumentTypes": null, + "id": 910, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 895, + "src": "6739:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6729:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 916, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "6773:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365", + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6781:36:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" + }, + "value": "ERC20: burn amount exceeds balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 912, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "6750:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 914, + "indexExpression": { + "argumentTypes": null, + "id": 913, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 895, + "src": "6760:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6750:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "6750:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6750:68:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6729:89:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 920, + "nodeType": "ExpressionStatement", + "src": "6729:89:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 921, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "6828:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 924, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "6860:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 922, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "6843:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 460, + "src": "6843:16:4", + "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": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6843:24:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6828:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 927, + "nodeType": "ExpressionStatement", + "src": "6828:39:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 929, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 895, + "src": "6891:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6908:1:4", + "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": 930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6900:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6900:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 933, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "6912:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 928, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1069, + "src": "6882:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6882:37:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 935, + "nodeType": "EmitStatement", + "src": "6877:42:4" + } + ] + }, + "documentation": "@dev Destroys `amount` tokens from `account`, reducing the\ntotal supply.\n * Emits a {Transfer} event with `to` set to the zero address.\n * Requirements\n * - `account` cannot be the zero address.\n- `account` must have at least `amount` tokens.", + "id": 937, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 895, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 937, + "src": "6599:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 894, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6599:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 897, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 937, + "src": "6616:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6616:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6598:33:4" + }, + "returnParameters": { + "id": 899, + "nodeType": "ParameterList", + "parameters": [], + "src": "6641:0:4" + }, + "scope": 1009, + "src": "6584:342:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 978, + "nodeType": "Block", + "src": "7426:257:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 947, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 939, + "src": "7444:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7461:1:4", + "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": 948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7453:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7453:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7444:19:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373", + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7465:38:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "typeString": "literal_string \"ERC20: approve from the zero address\"" + }, + "value": "ERC20: approve from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "typeString": "literal_string \"ERC20: approve from the zero address\"" + } + ], + "id": 946, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "7436:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7436:68:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 954, + "nodeType": "ExpressionStatement", + "src": "7436:68:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 956, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "7522:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7541:1:4", + "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": 957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7533:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7533:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7522:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373", + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7545:36:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "typeString": "literal_string \"ERC20: approve to the zero address\"" + }, + "value": "ERC20: approve to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "typeString": "literal_string \"ERC20: approve to the zero address\"" + } + ], + "id": 955, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "7514:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7514:68:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 963, + "nodeType": "ExpressionStatement", + "src": "7514:68:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 964, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "7593:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 967, + "indexExpression": { + "argumentTypes": null, + "id": 965, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 939, + "src": "7605:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7593:18:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 968, + "indexExpression": { + "argumentTypes": null, + "id": 966, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "7612:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7593:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 969, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "7623:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7593:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 971, + "nodeType": "ExpressionStatement", + "src": "7593:36:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 973, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 939, + "src": "7653:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 974, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "7660:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 975, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "7669:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 972, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "7644:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7644:32:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 977, + "nodeType": "EmitStatement", + "src": "7639:37:4" + } + ] + }, + "documentation": "@dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n * This is internal function is equivalent to `approve`, and can be used to\ne.g. set automatic allowances for certain subsystems, etc.\n * Emits an {Approval} event.\n * Requirements:\n * - `owner` cannot be the zero address.\n- `spender` cannot be the zero address.", + "id": 979, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 939, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 979, + "src": "7369:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7369:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 941, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 979, + "src": "7384:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 940, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7384:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 943, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 979, + "src": "7401:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 942, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7401:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7368:48:4" + }, + "returnParameters": { + "id": 945, + "nodeType": "ParameterList", + "parameters": [], + "src": "7426:0:4" + }, + "scope": 1009, + "src": "7351:332:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1007, + "nodeType": "Block", + "src": "7922:168:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 981, + "src": "7938:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 988, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 983, + "src": "7947:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 986, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 937, + "src": "7932:5:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7932:22:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "7932:22:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 981, + "src": "7973:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 993, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "7982:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7982:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1002, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 983, + "src": "8035:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e6365", + "id": 1003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8043:38:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a287c363786607a1457a2d9d12fa61c0073358e02d76b4035fc2c2d86a19c0db", + "typeString": "literal_string \"ERC20: burn amount exceeds allowance\"" + }, + "value": "ERC20: burn amount exceeds allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_a287c363786607a1457a2d9d12fa61c0073358e02d76b4035fc2c2d86a19c0db", + "typeString": "literal_string \"ERC20: burn amount exceeds allowance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 995, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "7996:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 997, + "indexExpression": { + "argumentTypes": null, + "id": 996, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 981, + "src": "8008:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7996:20:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1000, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 998, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "8017:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8017:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7996:34:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "7996:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 1004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7996:86:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 991, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "7964:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7964:119:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1006, + "nodeType": "ExpressionStatement", + "src": "7964:119:4" + } + ] + }, + "documentation": "@dev Destroys `amount` tokens from `account`.`amount` is then deducted\nfrom the caller's allowance.\n * See {_burn} and {_approve}.", + "id": 1008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burnFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 984, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 981, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1008, + "src": "7880:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 980, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7880:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 983, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1008, + "src": "7897:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 982, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7897:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7879:33:4" + }, + "returnParameters": { + "id": 985, + "nodeType": "ParameterList", + "parameters": [], + "src": "7922:0:4" + }, + "scope": 1009, + "src": "7861:229:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1010, + "src": "1268:6824:4" + } + ], + "src": "0:8093:4" + }, + "legacyAST": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "exportedSymbols": { + "ERC20": [ + 1009 + ] + }, + "id": 1010, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 606, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", + "file": "../../GSN/Context.sol", + "id": 607, + "nodeType": "ImportDirective", + "scope": 1010, + "sourceUnit": 418, + "src": "25:31:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 608, + "nodeType": "ImportDirective", + "scope": 1010, + "sourceUnit": 1079, + "src": "57:22:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 609, + "nodeType": "ImportDirective", + "scope": 1010, + "sourceUnit": 605, + "src": "80:33:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 610, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 417, + "src": "1286:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$417", + "typeString": "contract Context" + } + }, + "id": 611, + "nodeType": "InheritanceSpecifier", + "src": "1286:7:4" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 612, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1078, + "src": "1295:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1078", + "typeString": "contract IERC20" + } + }, + "id": 613, + "nodeType": "InheritanceSpecifier", + "src": "1295:6:4" + } + ], + "contractDependencies": [ + 417, + 1078 + ], + "contractKind": "contract", + "documentation": "@dev Implementation of the {IERC20} interface.\n * This implementation is agnostic to the way tokens are created. This means\nthat a supply mechanism has to be added in a derived contract using {_mint}.\nFor a generic mechanism see {ERC20Mintable}.\n * TIP: For a detailed writeup see our guide\nhttps://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\nto implement supply mechanisms].\n * We have followed general OpenZeppelin guidelines: functions revert instead\nof returning `false` on failure. This behavior is nonetheless conventional\nand does not conflict with the expectations of ERC20 applications.\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\nThis allows applications to reconstruct the allowance for all accounts just\nby listening to said events. Other implementations of the EIP may not emit\nthese events, as it isn't required by the specification.\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\nfunctions have been added to mitigate the well-known issues around setting\nallowances. See {IERC20-approve}.", + "fullyImplemented": true, + "id": 1009, + "linearizedBaseContracts": [ + 1009, + 1078, + 417 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 616, + "libraryName": { + "contractScope": null, + "id": 614, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "1314:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1308:27:4", + "typeName": { + "id": 615, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1327:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 620, + "name": "_balances", + "nodeType": "VariableDeclaration", + "scope": 1009, + "src": "1341:46:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 619, + "keyType": { + "id": 617, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1350:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1341:28:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 618, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1361:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 626, + "name": "_allowances", + "nodeType": "VariableDeclaration", + "scope": 1009, + "src": "1394:69:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 625, + "keyType": { + "id": 621, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1403:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1394:49:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 624, + "keyType": { + "id": 622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1423:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1414:28:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 623, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1434:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 628, + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1009, + "src": "1470:28:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 627, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1470:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 635, + "nodeType": "Block", + "src": "1612:36:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 633, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "1629:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 632, + "id": 634, + "nodeType": "Return", + "src": "1622:19:4" + } + ] + }, + "documentation": "@dev See {IERC20-totalSupply}.", + "id": 636, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 629, + "nodeType": "ParameterList", + "parameters": [], + "src": "1579:2:4" + }, + "returnParameters": { + "id": 632, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 631, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 636, + "src": "1603:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 630, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1603:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1602:9:4" + }, + "scope": 1009, + "src": "1559:89:4", + "stateMutability": "view", + "superFunction": 1016, + "visibility": "public" + }, + { + "body": { + "id": 647, + "nodeType": "Block", + "src": "1772:42:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 643, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "1789:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 645, + "indexExpression": { + "argumentTypes": null, + "id": 644, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 638, + "src": "1799:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1789:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 642, + "id": 646, + "nodeType": "Return", + "src": "1782:25:4" + } + ] + }, + "documentation": "@dev See {IERC20-balanceOf}.", + "id": 648, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 639, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 638, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 648, + "src": "1725:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 637, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1725:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1724:17:4" + }, + "returnParameters": { + "id": 642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 641, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 648, + "src": "1763:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 640, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1763:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1762:9:4" + }, + "scope": 1009, + "src": "1706:108:4", + "stateMutability": "view", + "superFunction": 1023, + "visibility": "public" + }, + { + "body": { + "id": 666, + "nodeType": "Block", + "src": "2092:80:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 658, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "2112:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2112:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 660, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "2126:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 661, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 652, + "src": "2137:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 657, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 850, + "src": "2102:9:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2102:42:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 663, + "nodeType": "ExpressionStatement", + "src": "2102:42:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2161:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 656, + "id": 665, + "nodeType": "Return", + "src": "2154:11:4" + } + ] + }, + "documentation": "@dev See {IERC20-transfer}.\n * Requirements:\n * - `recipient` cannot be the zero address.\n- the caller must have a balance of at least `amount`.", + "id": 667, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 650, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 667, + "src": "2035:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 649, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2035:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 652, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 667, + "src": "2054:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 651, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2054:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2034:35:4" + }, + "returnParameters": { + "id": 656, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 655, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 667, + "src": "2086:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 654, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2086:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2085:6:4" + }, + "scope": 1009, + "src": "2017:155:4", + "stateMutability": "nonpayable", + "superFunction": 1032, + "visibility": "public" + }, + { + "body": { + "id": 682, + "nodeType": "Block", + "src": "2311:51:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 676, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "2328:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 678, + "indexExpression": { + "argumentTypes": null, + "id": 677, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "2340:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2328:18:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 680, + "indexExpression": { + "argumentTypes": null, + "id": 679, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 671, + "src": "2347:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2328:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 675, + "id": 681, + "nodeType": "Return", + "src": "2321:34:4" + } + ] + }, + "documentation": "@dev See {IERC20-allowance}.", + "id": 683, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 672, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 669, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 683, + "src": "2249:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 668, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2249:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 671, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 683, + "src": "2264:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 670, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2264:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2248:32:4" + }, + "returnParameters": { + "id": 675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 674, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 683, + "src": "2302:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 673, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2302:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2301:9:4" + }, + "scope": 1009, + "src": "2230:132:4", + "stateMutability": "view", + "superFunction": 1041, + "visibility": "public" + }, + { + "body": { + "id": 701, + "nodeType": "Block", + "src": "2572:77:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 693, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "2591:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2591:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 695, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 685, + "src": "2605:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 696, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "2614:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 692, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "2582:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2582:39:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "2582:39:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2638:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 691, + "id": 700, + "nodeType": "Return", + "src": "2631:11:4" + } + ] + }, + "documentation": "@dev See {IERC20-approve}.\n * Requirements:\n * - `spender` cannot be the zero address.", + "id": 702, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 688, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 685, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 702, + "src": "2517:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 684, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2517:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 687, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 702, + "src": "2534:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2534:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2516:33:4" + }, + "returnParameters": { + "id": 691, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 690, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 702, + "src": "2566:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 689, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2566:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2565:6:4" + }, + "scope": 1009, + "src": "2500:149:4", + "stateMutability": "nonpayable", + "superFunction": 1050, + "visibility": "public" + }, + { + "body": { + "id": 737, + "nodeType": "Block", + "src": "3202:205:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 714, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "3222:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 706, + "src": "3230:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 716, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "3241:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 713, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 850, + "src": "3212:9:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3212:36:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 718, + "nodeType": "ExpressionStatement", + "src": "3212:36:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 720, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "3267:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 721, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "3275:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3275:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 730, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "3327:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3335:42:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" + }, + "value": "ERC20: transfer amount exceeds allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 723, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "3289:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 725, + "indexExpression": { + "argumentTypes": null, + "id": 724, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 704, + "src": "3301:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3289:19:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 728, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 726, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "3309:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3309:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3289:33:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "3289:37:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3289:89:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 719, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "3258:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3258:121:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 734, + "nodeType": "ExpressionStatement", + "src": "3258:121:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3396:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 712, + "id": 736, + "nodeType": "Return", + "src": "3389:11:4" + } + ] + }, + "documentation": "@dev See {IERC20-transferFrom}.\n * Emits an {Approval} event indicating the updated allowance. This is not\nrequired by the EIP. See the note at the beginning of {ERC20};\n * Requirements:\n- `sender` and `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.\n- the caller must have allowance for `sender`'s tokens of at least\n`amount`.", + "id": 738, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 704, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 738, + "src": "3129:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 703, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3129:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 706, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 738, + "src": "3145:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 705, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3145:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 708, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 738, + "src": "3164:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 707, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3164:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3128:51:4" + }, + "returnParameters": { + "id": 712, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 711, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 738, + "src": "3196:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 710, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3196:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3195:6:4" + }, + "scope": 1009, + "src": "3107:300:4", + "stateMutability": "nonpayable", + "superFunction": 1061, + "visibility": "public" + }, + { + "body": { + "id": 764, + "nodeType": "Block", + "src": "3888:121:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 748, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "3907:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3907:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 750, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 740, + "src": "3921:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 758, + "name": "addedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 742, + "src": "3969:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 751, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "3930:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 754, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 752, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "3942:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3942:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3930:25:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 756, + "indexExpression": { + "argumentTypes": null, + "id": 755, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 740, + "src": "3956:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3930:34:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "3930:38:4", + "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": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 747, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "3898:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3898:83:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 761, + "nodeType": "ExpressionStatement", + "src": "3898:83:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3998:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 746, + "id": 763, + "nodeType": "Return", + "src": "3991:11:4" + } + ] + }, + "documentation": "@dev Atomically increases the allowance granted to `spender` by the caller.\n * This is an alternative to {approve} that can be used as a mitigation for\nproblems described in {IERC20-approve}.\n * Emits an {Approval} event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.", + "id": 765, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "increaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 743, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 740, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 765, + "src": "3829:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 739, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3829:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 742, + "name": "addedValue", + "nodeType": "VariableDeclaration", + "scope": 765, + "src": "3846:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3846:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3828:37:4" + }, + "returnParameters": { + "id": 746, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 745, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 765, + "src": "3882:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 744, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3882:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3881:6:4" + }, + "scope": 1009, + "src": "3802:207:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 792, + "nodeType": "Block", + "src": "4587:167:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 775, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "4606:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4606:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 777, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 767, + "src": "4620:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 785, + "name": "subtractedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 769, + "src": "4668:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4685:39:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "typeString": "literal_string \"ERC20: decreased allowance below zero\"" + }, + "value": "ERC20: decreased allowance below zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "typeString": "literal_string \"ERC20: decreased allowance below zero\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 778, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "4629:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 781, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 779, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "4641:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4641:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4629:25:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 783, + "indexExpression": { + "argumentTypes": null, + "id": 782, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 767, + "src": "4655:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4629:34:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "4629:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4629:96:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 774, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "4597:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4597:129:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 789, + "nodeType": "ExpressionStatement", + "src": "4597:129:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4743:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 773, + "id": 791, + "nodeType": "Return", + "src": "4736:11:4" + } + ] + }, + "documentation": "@dev Atomically decreases the allowance granted to `spender` by the caller.\n * This is an alternative to {approve} that can be used as a mitigation for\nproblems described in {IERC20-approve}.\n * Emits an {Approval} event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.\n- `spender` must have allowance for the caller of at least\n`subtractedValue`.", + "id": 793, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 767, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 793, + "src": "4523:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 766, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4523:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 769, + "name": "subtractedValue", + "nodeType": "VariableDeclaration", + "scope": 793, + "src": "4540:23:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 768, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4540:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4522:42:4" + }, + "returnParameters": { + "id": 773, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 772, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 793, + "src": "4581:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 771, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4581:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4580:6:4" + }, + "scope": 1009, + "src": "4496:258:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 849, + "nodeType": "Block", + "src": "5307:385:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 803, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 795, + "src": "5325:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5343:1:4", + "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": 804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5335:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 806, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5335:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5325:20:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373", + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5347:39:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "typeString": "literal_string \"ERC20: transfer from the zero address\"" + }, + "value": "ERC20: transfer from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "typeString": "literal_string \"ERC20: transfer from the zero address\"" + } + ], + "id": 802, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "5317:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5317:70:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 810, + "nodeType": "ExpressionStatement", + "src": "5317:70:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 812, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 797, + "src": "5405:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5426:1:4", + "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": 813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5418:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5418:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5405:23:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373", + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5430:37:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "typeString": "literal_string \"ERC20: transfer to the zero address\"" + }, + "value": "ERC20: transfer to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "typeString": "literal_string \"ERC20: transfer to the zero address\"" + } + ], + "id": 811, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "5397:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5397:71:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 819, + "nodeType": "ExpressionStatement", + "src": "5397:71:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 820, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "5479:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 822, + "indexExpression": { + "argumentTypes": null, + "id": 821, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 795, + "src": "5489:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5479:17:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 827, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "5521:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5529:40:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" + }, + "value": "ERC20: transfer amount exceeds balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 823, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "5499:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 825, + "indexExpression": { + "argumentTypes": null, + "id": 824, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 795, + "src": "5509:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5499:17:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "5499:21:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5499:71:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5479:91:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 831, + "nodeType": "ExpressionStatement", + "src": "5479:91:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 832, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "5580:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 834, + "indexExpression": { + "argumentTypes": null, + "id": 833, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 797, + "src": "5590:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5580:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 839, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "5628:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 835, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "5603:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 837, + "indexExpression": { + "argumentTypes": null, + "id": 836, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 797, + "src": "5613:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5603:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "5603:24:4", + "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": 840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5603:32:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5580:55:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 842, + "nodeType": "ExpressionStatement", + "src": "5580:55:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 844, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 795, + "src": "5659:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 845, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 797, + "src": "5667:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 846, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "5678:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 843, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1069, + "src": "5650:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5650:35:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 848, + "nodeType": "EmitStatement", + "src": "5645:40:4" + } + ] + }, + "documentation": "@dev Moves tokens `amount` from `sender` to `recipient`.\n * This is internal function is equivalent to {transfer}, and can be used to\ne.g. implement automatic token fees, slashing mechanisms, etc.\n * Emits a {Transfer} event.\n * Requirements:\n * - `sender` cannot be the zero address.\n- `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.", + "id": 850, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 800, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 795, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 850, + "src": "5247:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 794, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5247:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 797, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 850, + "src": "5263:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 796, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5263:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 799, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 850, + "src": "5282:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 798, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5282:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5246:51:4" + }, + "returnParameters": { + "id": 801, + "nodeType": "ParameterList", + "parameters": [], + "src": "5307:0:4" + }, + "scope": 1009, + "src": "5228:464:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 892, + "nodeType": "Block", + "src": "6019:245:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 858, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "6037:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6056:1:4", + "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": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6048:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6048:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6037:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6060:33:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "typeString": "literal_string \"ERC20: mint to the zero address\"" + }, + "value": "ERC20: mint to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "typeString": "literal_string \"ERC20: mint to the zero address\"" + } + ], + "id": 857, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "6029:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6029:65:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 865, + "nodeType": "ExpressionStatement", + "src": "6029:65:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 866, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "6105:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 869, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "6137:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 867, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "6120:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "6120:16:4", + "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": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6120:24:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6105:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 872, + "nodeType": "ExpressionStatement", + "src": "6105:39:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 873, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "6154:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 875, + "indexExpression": { + "argumentTypes": null, + "id": 874, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "6164:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6154:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 880, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "6198:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 876, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "6175:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "id": 877, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "6185:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6175:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "6175:22:4", + "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": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6175:30:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6154:51:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 883, + "nodeType": "ExpressionStatement", + "src": "6154:51:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6237:1:4", + "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": 885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6229:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6229:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 888, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "6241:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 889, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "6250:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 884, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1069, + "src": "6220:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6220:37:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 891, + "nodeType": "EmitStatement", + "src": "6215:42:4" + } + ] + }, + "documentation": "@dev Creates `amount` tokens and assigns them to `account`, increasing\nthe total supply.\n * Emits a {Transfer} event with `from` set to the zero address.\n * Requirements\n * - `to` cannot be the zero address.", + "id": 893, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 855, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 852, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 893, + "src": "5977:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 851, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5977:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 854, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 893, + "src": "5994:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 853, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5994:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5976:33:4" + }, + "returnParameters": { + "id": 856, + "nodeType": "ParameterList", + "parameters": [], + "src": "6019:0:4" + }, + "scope": 1009, + "src": "5962:302:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 936, + "nodeType": "Block", + "src": "6641:285:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 901, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 895, + "src": "6659:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6678:1:4", + "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": 902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6670:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6670:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6659:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373", + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6682:35:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "typeString": "literal_string \"ERC20: burn from the zero address\"" + }, + "value": "ERC20: burn from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "typeString": "literal_string \"ERC20: burn from the zero address\"" + } + ], + "id": 900, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "6651:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6651:67:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 908, + "nodeType": "ExpressionStatement", + "src": "6651:67:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 909, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "6729:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 911, + "indexExpression": { + "argumentTypes": null, + "id": 910, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 895, + "src": "6739:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6729:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 916, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "6773:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365", + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6781:36:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" + }, + "value": "ERC20: burn amount exceeds balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 912, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 620, + "src": "6750:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 914, + "indexExpression": { + "argumentTypes": null, + "id": 913, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 895, + "src": "6760:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6750:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "6750:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6750:68:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6729:89:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 920, + "nodeType": "ExpressionStatement", + "src": "6729:89:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 921, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "6828:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 924, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "6860:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 922, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "6843:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 460, + "src": "6843:16:4", + "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": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6843:24:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6828:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 927, + "nodeType": "ExpressionStatement", + "src": "6828:39:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 929, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 895, + "src": "6891:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6908:1:4", + "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": 930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6900:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6900:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 933, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "6912:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 928, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1069, + "src": "6882:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6882:37:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 935, + "nodeType": "EmitStatement", + "src": "6877:42:4" + } + ] + }, + "documentation": "@dev Destroys `amount` tokens from `account`, reducing the\ntotal supply.\n * Emits a {Transfer} event with `to` set to the zero address.\n * Requirements\n * - `account` cannot be the zero address.\n- `account` must have at least `amount` tokens.", + "id": 937, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 895, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 937, + "src": "6599:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 894, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6599:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 897, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 937, + "src": "6616:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6616:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6598:33:4" + }, + "returnParameters": { + "id": 899, + "nodeType": "ParameterList", + "parameters": [], + "src": "6641:0:4" + }, + "scope": 1009, + "src": "6584:342:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 978, + "nodeType": "Block", + "src": "7426:257:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 947, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 939, + "src": "7444:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7461:1:4", + "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": 948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7453:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7453:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7444:19:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373", + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7465:38:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "typeString": "literal_string \"ERC20: approve from the zero address\"" + }, + "value": "ERC20: approve from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "typeString": "literal_string \"ERC20: approve from the zero address\"" + } + ], + "id": 946, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "7436:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7436:68:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 954, + "nodeType": "ExpressionStatement", + "src": "7436:68:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 956, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "7522:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7541:1:4", + "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": 957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7533:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7533:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7522:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373", + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7545:36:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "typeString": "literal_string \"ERC20: approve to the zero address\"" + }, + "value": "ERC20: approve to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "typeString": "literal_string \"ERC20: approve to the zero address\"" + } + ], + "id": 955, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "7514:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7514:68:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 963, + "nodeType": "ExpressionStatement", + "src": "7514:68:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 964, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "7593:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 967, + "indexExpression": { + "argumentTypes": null, + "id": 965, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 939, + "src": "7605:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7593:18:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 968, + "indexExpression": { + "argumentTypes": null, + "id": 966, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "7612:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7593:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 969, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "7623:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7593:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 971, + "nodeType": "ExpressionStatement", + "src": "7593:36:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 973, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 939, + "src": "7653:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 974, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "7660:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 975, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "7669:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 972, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "7644:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7644:32:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 977, + "nodeType": "EmitStatement", + "src": "7639:37:4" + } + ] + }, + "documentation": "@dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n * This is internal function is equivalent to `approve`, and can be used to\ne.g. set automatic allowances for certain subsystems, etc.\n * Emits an {Approval} event.\n * Requirements:\n * - `owner` cannot be the zero address.\n- `spender` cannot be the zero address.", + "id": 979, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 939, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 979, + "src": "7369:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7369:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 941, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 979, + "src": "7384:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 940, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7384:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 943, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 979, + "src": "7401:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 942, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7401:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7368:48:4" + }, + "returnParameters": { + "id": 945, + "nodeType": "ParameterList", + "parameters": [], + "src": "7426:0:4" + }, + "scope": 1009, + "src": "7351:332:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1007, + "nodeType": "Block", + "src": "7922:168:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 981, + "src": "7938:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 988, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 983, + "src": "7947:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 986, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 937, + "src": "7932:5:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7932:22:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "7932:22:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 981, + "src": "7973:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 993, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "7982:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7982:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1002, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 983, + "src": "8035:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e6365", + "id": 1003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8043:38:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a287c363786607a1457a2d9d12fa61c0073358e02d76b4035fc2c2d86a19c0db", + "typeString": "literal_string \"ERC20: burn amount exceeds allowance\"" + }, + "value": "ERC20: burn amount exceeds allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_a287c363786607a1457a2d9d12fa61c0073358e02d76b4035fc2c2d86a19c0db", + "typeString": "literal_string \"ERC20: burn amount exceeds allowance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 995, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "7996:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 997, + "indexExpression": { + "argumentTypes": null, + "id": 996, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 981, + "src": "8008:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7996:20:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1000, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 998, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "8017:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8017:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7996:34:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 487, + "src": "7996:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 1004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7996:86:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 991, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "7964:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7964:119:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1006, + "nodeType": "ExpressionStatement", + "src": "7964:119:4" + } + ] + }, + "documentation": "@dev Destroys `amount` tokens from `account`.`amount` is then deducted\nfrom the caller's allowance.\n * See {_burn} and {_approve}.", + "id": 1008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burnFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 984, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 981, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1008, + "src": "7880:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 980, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7880:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 983, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1008, + "src": "7897:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 982, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7897:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7879:33:4" + }, + "returnParameters": { + "id": 985, + "nodeType": "ParameterList", + "parameters": [], + "src": "7922:0:4" + }, + "scope": 1009, + "src": "7861:229:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1010, + "src": "1268:6824:4" + } + ], + "src": "0:8093:4" + }, + "compiler": { + "name": "solc", + "version": "0.5.12+commit.7709ece9.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.19", + "updatedAt": "2020-02-18T05:14:13.974Z", + "devdoc": { + "details": "Implementation of the {IERC20} interface. * This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20Mintable}. * TIP: For a detailed writeup see our guide https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. * We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. * Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`." + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/IERC20.json b/build/contracts/IERC20.json new file mode 100644 index 0000000..01cbdf8 --- /dev/null +++ b/build/contracts/IERC20.json @@ -0,0 +1,1906 @@ +{ + "contractName": "IERC20", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP. Does not include the optional functions; to access them see {ERC20Detailed}.\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. * This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. * Returns a boolean value indicating whether the operation succeeded. * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n", + "sourcePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 1078 + ] + }, + "id": 1079, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1011, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", + "fullyImplemented": false, + "id": 1078, + "linearizedBaseContracts": [ + 1078 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": "@dev Returns the amount of tokens in existence.", + "id": 1016, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1012, + "nodeType": "ParameterList", + "parameters": [], + "src": "290:2:5" + }, + "returnParameters": { + "id": 1015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "316:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "316:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "315:9:5" + }, + "scope": 1078, + "src": "270:55:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Returns the amount of tokens owned by `account`.", + "id": 1023, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1018, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1023, + "src": "427:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1017, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "427:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "426:17:5" + }, + "returnParameters": { + "id": 1022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1021, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1023, + "src": "467:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1020, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "467:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "466:9:5" + }, + "scope": 1078, + "src": "408:68:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", + "id": 1032, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1025, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 1032, + "src": "714:17:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1024, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "714:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1027, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1032, + "src": "733:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "733:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "713:35:5" + }, + "returnParameters": { + "id": 1031, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1030, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1032, + "src": "767:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1029, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "767:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "766:6:5" + }, + "scope": 1078, + "src": "696:77:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", + "id": 1041, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1034, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1041, + "src": "1067:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1033, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1067:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1036, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1041, + "src": "1082:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1035, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1082:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1066:32:5" + }, + "returnParameters": { + "id": 1040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1039, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1041, + "src": "1122:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1038, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1122:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1121:9:5" + }, + "scope": 1078, + "src": "1048:83:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", + "id": 1050, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1046, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1043, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1050, + "src": "1801:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1042, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1801:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1045, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1050, + "src": "1818:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1044, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1818:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1800:33:5" + }, + "returnParameters": { + "id": 1049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1048, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1050, + "src": "1852:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1047, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1852:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1851:6:5" + }, + "scope": 1078, + "src": "1784:74:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", + "id": 1061, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1057, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1052, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2187:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2187:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1054, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2203:17:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1053, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2203:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1056, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2222:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1055, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2222:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2186:51:5" + }, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2256:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1058, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2256:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2255:6:5" + }, + "scope": 1078, + "src": "2165:97:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", + "id": 1069, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1063, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "2446:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2446:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1065, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "2468:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2468:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1067, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "2488:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1066, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2488:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2445:57:5" + }, + "src": "2431:72:5" + }, + { + "anonymous": false, + "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", + "id": 1077, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1071, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "2677:21:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1070, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2677:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1073, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "2700:23:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2700:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1075, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "2725:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1074, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2725:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2676:63:5" + }, + "src": "2662:78:5" + } + ], + "scope": 1079, + "src": "176:2566:5" + } + ], + "src": "0:2743:5" + }, + "legacyAST": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 1078 + ] + }, + "id": 1079, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1011, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", + "fullyImplemented": false, + "id": 1078, + "linearizedBaseContracts": [ + 1078 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": "@dev Returns the amount of tokens in existence.", + "id": 1016, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1012, + "nodeType": "ParameterList", + "parameters": [], + "src": "290:2:5" + }, + "returnParameters": { + "id": 1015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "316:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "316:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "315:9:5" + }, + "scope": 1078, + "src": "270:55:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Returns the amount of tokens owned by `account`.", + "id": 1023, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1018, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1023, + "src": "427:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1017, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "427:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "426:17:5" + }, + "returnParameters": { + "id": 1022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1021, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1023, + "src": "467:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1020, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "467:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "466:9:5" + }, + "scope": 1078, + "src": "408:68:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", + "id": 1032, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1025, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 1032, + "src": "714:17:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1024, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "714:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1027, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1032, + "src": "733:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "733:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "713:35:5" + }, + "returnParameters": { + "id": 1031, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1030, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1032, + "src": "767:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1029, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "767:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "766:6:5" + }, + "scope": 1078, + "src": "696:77:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", + "id": 1041, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1034, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1041, + "src": "1067:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1033, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1067:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1036, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1041, + "src": "1082:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1035, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1082:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1066:32:5" + }, + "returnParameters": { + "id": 1040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1039, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1041, + "src": "1122:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1038, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1122:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1121:9:5" + }, + "scope": 1078, + "src": "1048:83:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", + "id": 1050, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1046, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1043, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1050, + "src": "1801:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1042, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1801:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1045, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1050, + "src": "1818:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1044, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1818:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1800:33:5" + }, + "returnParameters": { + "id": 1049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1048, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1050, + "src": "1852:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1047, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1852:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1851:6:5" + }, + "scope": 1078, + "src": "1784:74:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", + "id": 1061, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1057, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1052, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2187:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2187:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1054, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2203:17:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1053, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2203:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1056, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2222:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1055, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2222:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2186:51:5" + }, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2256:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1058, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2256:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2255:6:5" + }, + "scope": 1078, + "src": "2165:97:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", + "id": 1069, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1063, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "2446:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2446:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1065, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "2468:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2468:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1067, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "2488:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1066, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2488:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2445:57:5" + }, + "src": "2431:72:5" + }, + { + "anonymous": false, + "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", + "id": 1077, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1071, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "2677:21:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1070, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2677:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1073, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "2700:23:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2700:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1075, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "2725:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1074, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2725:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2676:63:5" + }, + "src": "2662:78:5" + } + ], + "scope": 1079, + "src": "176:2566:5" + } + ], + "src": "0:2743:5" + }, + "compiler": { + "name": "solc", + "version": "0.5.12+commit.7709ece9.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.19", + "updatedAt": "2020-02-18T05:14:13.977Z", + "devdoc": { + "details": "Interface of the ERC20 standard as defined in the EIP. Does not include the optional functions; to access them see {ERC20Detailed}.", + "methods": { + "allowance(address,address)": { + "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. * This value changes when {approve} or {transferFrom} are called." + }, + "approve(address,uint256)": { + "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. * Returns a boolean value indicating whether the operation succeeded. * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * Emits an {Approval} event." + }, + "balanceOf(address)": { + "details": "Returns the amount of tokens owned by `account`." + }, + "totalSupply()": { + "details": "Returns the amount of tokens in existence." + }, + "transfer(address,uint256)": { + "details": "Moves `amount` tokens from the caller's account to `recipient`. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event." + }, + "transferFrom(address,address,uint256)": { + "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event." + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json new file mode 100644 index 0000000..79b6117 --- /dev/null +++ b/build/contracts/Migrations.json @@ -0,0 +1,1395 @@ +{ + "contractName": "Migrations", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "constant": true, + "inputs": [], + "name": "last_completed_migration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "completed", + "type": "uint256" + } + ], + "name": "setCompleted", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "new_address", + "type": "address" + } + ], + "name": "upgrade", + "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\"},{\"constant\":true,\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/p1r0/Dev/git/neetsec/dcc/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/p1r0/Dev/git/neetsec/dcc/contracts/Migrations.sol\":{\"keccak256\":\"0xda12f39da5e08f86d00052b4055e615fe1dc6be843c476ddd2a4f35d2804e7b4\",\"urls\":[\"bzz-raw://68d6f473d2cd747d21b11fc9a4d1e358ebcffa5eafcd8f590e46b78d031b1f5b\",\"dweb:/ipfs/QmZoFy1VBDc34mCjSNVQEcZnrQMzBvsh9RUKpkPX4LTnwb\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102b7806100606000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100955780638da5cb5b146100b3578063fdacd576146100fd575b600080fd5b6100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061012b565b005b61009d6101f7565b6040518082815260200191505060405180910390f35b6100bb6101fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101296004803603602081101561011357600080fd5b8101908080359060200190929190505050610222565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156101f45760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156101da57600080fd5b505af11580156101ee573d6000803e3d6000fd5b50505050505b50565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561027f57806001819055505b5056fea265627a7a7231582054889afd3253b1dd1ab56bedb2436748e32210b783a2769f9ccc5b86e0f0934b64736f6c634300050c0032", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100955780638da5cb5b146100b3578063fdacd576146100fd575b600080fd5b6100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061012b565b005b61009d6101f7565b6040518082815260200191505060405180910390f35b6100bb6101fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101296004803603602081101561011357600080fd5b8101908080359060200190929190505050610222565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156101f45760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156101da57600080fd5b505af11580156101ee573d6000803e3d6000fd5b50505050505b50565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561027f57806001819055505b5056fea265627a7a7231582054889afd3253b1dd1ab56bedb2436748e32210b783a2769f9ccc5b86e0f0934b64736f6c634300050c0032", + "sourceMap": "51:480:1:-;;;140:50;8:9:-1;5:2;;;30:1;27;20:12;5:2;140:50:1;175:10;167:5;;:18;;;;;;;;;;;;;;;;;;51:480;;;;;;", + "deployedSourceMap": "51:480:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;51:480:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;364:165;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;364:165:1;;;;;;;;;;;;;;;;;;;:::i;:::-;;99:36;;;:::i;:::-;;;;;;;;;;;;;;;;;;;75:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;257:103;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;257:103:1;;;;;;;;;;;;;;;;;:::i;:::-;;364:165;240:5;;;;;;;;;;;226:19;;:10;:19;;;222:26;;;426:19;459:11;426:45;;477:8;:21;;;499:24;;477:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;477:47:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;477:47:1;;;;247:1;222:26;364:165;:::o;99:36::-;;;;:::o;75:20::-;;;;;;;;;;;;;:::o;257:103::-;240:5;;;;;;;;;;;226:19;;:10;:19;;;222:26;;;346:9;319:24;:36;;;;222:26;257:103;:::o", + "source": "pragma solidity 0.5.12;\n//pragma solidity 0.5.16;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", + "sourcePath": "/home/p1r0/Dev/git/neetsec/dcc/contracts/Migrations.sol", + "ast": { + "absolutePath": "/home/p1r0/Dev/git/neetsec/dcc/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 390 + ] + }, + "id": 391, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 335, + "literals": [ + "solidity", + "0.5", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 390, + "linearizedBaseContracts": [ + 390 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 337, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 390, + "src": "75:20:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "75:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 339, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 390, + "src": "99:36:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 338, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "99:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 347, + "nodeType": "Block", + "src": "161:29:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 342, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 337, + "src": "167:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 343, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "175:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "175:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "167:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 346, + "nodeType": "ExpressionStatement", + "src": "167:18:1" + } + ] + }, + "documentation": null, + "id": 348, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 340, + "nodeType": "ParameterList", + "parameters": [], + "src": "151:2:1" + }, + "returnParameters": { + "id": 341, + "nodeType": "ParameterList", + "parameters": [], + "src": "161:0:1" + }, + "scope": 390, + "src": "140:50:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 356, + "nodeType": "Block", + "src": "216:37:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 350, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "226:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "226:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 352, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 337, + "src": "240:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "226:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 355, + "nodeType": "IfStatement", + "src": "222:26:1", + "trueBody": { + "id": 354, + "nodeType": "PlaceholderStatement", + "src": "247:1:1" + } + } + ] + }, + "documentation": null, + "id": 357, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 349, + "nodeType": "ParameterList", + "parameters": [], + "src": "213:2:1" + }, + "src": "194:59:1", + "visibility": "internal" + }, + { + "body": { + "id": 368, + "nodeType": "Block", + "src": "313:47:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 364, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 339, + "src": "319:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 365, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "346:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "319:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 367, + "nodeType": "ExpressionStatement", + "src": "319:36:1" + } + ] + }, + "documentation": null, + "id": 369, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 362, + "modifierName": { + "argumentTypes": null, + "id": 361, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 357, + "src": "302:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "302:10:1" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 359, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 369, + "src": "279:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 358, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "279:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "278:16:1" + }, + "returnParameters": { + "id": 363, + "nodeType": "ParameterList", + "parameters": [], + "src": "313:0:1" + }, + "scope": 390, + "src": "257:103:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 388, + "nodeType": "Block", + "src": "420:109:1", + "statements": [ + { + "assignments": [ + 377 + ], + "declarations": [ + { + "constant": false, + "id": 377, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 388, + "src": "426:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$390", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 376, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 390, + "src": "426:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$390", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 381, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 379, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 371, + "src": "459:11:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 378, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "448:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$390_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "448:23:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$390", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "426:45:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 385, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 339, + "src": "499:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 382, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 377, + "src": "477:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$390", + "typeString": "contract Migrations" + } + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 369, + "src": "477:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "477:47:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 387, + "nodeType": "ExpressionStatement", + "src": "477:47:1" + } + ] + }, + "documentation": null, + "id": 389, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 374, + "modifierName": { + "argumentTypes": null, + "id": 373, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 357, + "src": "409:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "409:10:1" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 372, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 371, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 389, + "src": "381:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "381:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "380:21:1" + }, + "returnParameters": { + "id": 375, + "nodeType": "ParameterList", + "parameters": [], + "src": "420:0:1" + }, + "scope": 390, + "src": "364:165:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 391, + "src": "51:480:1" + } + ], + "src": "0:532:1" + }, + "legacyAST": { + "absolutePath": "/home/p1r0/Dev/git/neetsec/dcc/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 390 + ] + }, + "id": 391, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 335, + "literals": [ + "solidity", + "0.5", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 390, + "linearizedBaseContracts": [ + 390 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 337, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 390, + "src": "75:20:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "75:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 339, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 390, + "src": "99:36:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 338, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "99:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 347, + "nodeType": "Block", + "src": "161:29:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 342, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 337, + "src": "167:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 343, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "175:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "175:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "167:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 346, + "nodeType": "ExpressionStatement", + "src": "167:18:1" + } + ] + }, + "documentation": null, + "id": 348, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 340, + "nodeType": "ParameterList", + "parameters": [], + "src": "151:2:1" + }, + "returnParameters": { + "id": 341, + "nodeType": "ParameterList", + "parameters": [], + "src": "161:0:1" + }, + "scope": 390, + "src": "140:50:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 356, + "nodeType": "Block", + "src": "216:37:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 350, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "226:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "226:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 352, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 337, + "src": "240:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "226:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 355, + "nodeType": "IfStatement", + "src": "222:26:1", + "trueBody": { + "id": 354, + "nodeType": "PlaceholderStatement", + "src": "247:1:1" + } + } + ] + }, + "documentation": null, + "id": 357, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 349, + "nodeType": "ParameterList", + "parameters": [], + "src": "213:2:1" + }, + "src": "194:59:1", + "visibility": "internal" + }, + { + "body": { + "id": 368, + "nodeType": "Block", + "src": "313:47:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 364, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 339, + "src": "319:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 365, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "346:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "319:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 367, + "nodeType": "ExpressionStatement", + "src": "319:36:1" + } + ] + }, + "documentation": null, + "id": 369, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 362, + "modifierName": { + "argumentTypes": null, + "id": 361, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 357, + "src": "302:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "302:10:1" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 359, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 369, + "src": "279:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 358, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "279:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "278:16:1" + }, + "returnParameters": { + "id": 363, + "nodeType": "ParameterList", + "parameters": [], + "src": "313:0:1" + }, + "scope": 390, + "src": "257:103:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 388, + "nodeType": "Block", + "src": "420:109:1", + "statements": [ + { + "assignments": [ + 377 + ], + "declarations": [ + { + "constant": false, + "id": 377, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 388, + "src": "426:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$390", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 376, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 390, + "src": "426:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$390", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 381, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 379, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 371, + "src": "459:11:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 378, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "448:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$390_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "448:23:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$390", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "426:45:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 385, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 339, + "src": "499:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 382, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 377, + "src": "477:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$390", + "typeString": "contract Migrations" + } + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 369, + "src": "477:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "477:47:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 387, + "nodeType": "ExpressionStatement", + "src": "477:47:1" + } + ] + }, + "documentation": null, + "id": 389, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 374, + "modifierName": { + "argumentTypes": null, + "id": 373, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 357, + "src": "409:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "409:10:1" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 372, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 371, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 389, + "src": "381:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "381:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "380:21:1" + }, + "returnParameters": { + "id": 375, + "nodeType": "ParameterList", + "parameters": [], + "src": "420:0:1" + }, + "scope": 390, + "src": "364:165:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 391, + "src": "51:480:1" + } + ], + "src": "0:532:1" + }, + "compiler": { + "name": "solc", + "version": "0.5.12+commit.7709ece9.Emscripten.clang" + }, + "networks": { + "1582002845050": { + "events": {}, + "links": {}, + "address": "0xa29064AFb33CEB33ae4f1008719C181d8092DCfF", + "transactionHash": "0x652480b1c0e69860ea8ca6a796762a98177a70f99fa27ea7ddba104bca674ab2" + }, + "1582002888088": { + "events": {}, + "links": {}, + "address": "0x0f5Ea0A652E851678Ebf77B69484bFcD31F9459B", + "transactionHash": "0xfde65f7f6a01e4f9b42aea1c2f4eaf6ba342d44bbc1baf0d3c15c488ee13bff0" + } + }, + "schemaVersion": "3.0.19", + "updatedAt": "2020-02-18T05:15:08.094Z", + "networkType": "ethereum", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/Ownable.json b/build/contracts/Ownable.json new file mode 100644 index 0000000..e320885 --- /dev/null +++ b/build/contracts/Ownable.json @@ -0,0 +1,8709 @@ +{ + "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/Dev/git/neetsec/dcc/contracts/DECA.sol\":\"Ownable\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/p1r0/Dev/git/neetsec/dcc/contracts/DECA.sol\":{\"keccak256\":\"0x49b90fcbd2f4b8522a8b24d6be34dde3655572f608c159bc45ee28a51e19282b\",\"urls\":[\"bzz-raw://e745ab72fc640a805878dacfa54226034d8c6b8c8cbe05b11a3c24347c86a404\",\"dweb:/ipfs/QmYbZi78rZHiV5kGUEQJB7C8AALSyBeGpiPhKu4HRPuojz\"]},\"@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/token/ERC20/IERC20.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 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 DECA 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 bool private _pause = false;\n\n modifier notPaused() {\n require(!_pause, \"crowdsale on pause\");\n _;\n }\n function getPause() view public returns (bool){\n return _pause;\n }\n\n function setPause(bool p) external onlyOwner {\n _pause = p;\n }\n // ------------------------------------------------------------------------\n // 100 DECA Tokens per 1 ETH\n // ------------------------------------------------------------------------\n function() notPaused external payable {\n require(now <= endDate);\n uint tokens;\n uint toOwner;\n uint toSender;\n uint divBy;\n\n divBy = 40;\n //2.5% extra printed to be 2% of the marketcap, please see README.md\n if (now <= preICOEnds) {\n tokens = msg.value * 300;\n } else if (now > preICOEnds && now <= bonus1Ends) {\n tokens = msg.value * 275;\n } else if (now > bonus1Ends && now <= bonus2Ends) {\n tokens = msg.value * 250;\n } else {\n tokens = msg.value * 225;\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/Dev/git/neetsec/dcc/contracts/DECA.sol", + "ast": { + "absolutePath": "/home/p1r0/Dev/git/neetsec/dcc/contracts/DECA.sol", + "exportedSymbols": { + "DECA": [ + 333 + ], + "Ownable": [ + 118 + ] + }, + "id": 334, + "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": 334, + "sourceUnit": 1010, + "src": "25:55:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 334, + "sourceUnit": 1079, + "src": "81:56:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 334, + "sourceUnit": 605, + "src": "138:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 5, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 417, + "src": "839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$417", + "typeString": "contract Context" + } + }, + "id": 6, + "nodeType": "InheritanceSpecifier", + "src": "839:7:0" + } + ], + "contractDependencies": [ + 417 + ], + "contractKind": "contract", + "documentation": "@dev The reason using this instead of openzeppelin, because owner are not 'payable'", + "fullyImplemented": true, + "id": 118, + "linearizedBaseContracts": [ + 118, + 417 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 118, + "src": "853:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 7, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "853:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "private" + }, + { + "id": 11, + "libraryName": { + "contractScope": null, + "id": 9, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "895:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "889:27:0", + "typeName": { + "id": 10, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "908:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "anonymous": false, + "documentation": null, + "id": 17, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13, + "indexed": true, + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "949:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "949:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15, + "indexed": true, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "980:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "980:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "948:57:0" + }, + "src": "922:84:0" + }, + { + "body": { + "id": 32, + "nodeType": "Block", + "src": "1132:93:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1142:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 21, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1151:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1142:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 24, + "nodeType": "ExpressionStatement", + "src": "1142:21:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1207: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": 26, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1199:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1199:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 29, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1211: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": 25, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1178:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 30, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1178:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 31, + "nodeType": "EmitStatement", + "src": "1173:45:0" + } + ] + }, + "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", + "id": 33, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "1120:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:0:0" + }, + "scope": 118, + "src": "1108:117:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 40, + "nodeType": "Block", + "src": "1356:30:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 38, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 37, + "id": 39, + "nodeType": "Return", + "src": "1366:13:0" + } + ] + }, + "documentation": "@dev Returns the address of the current owner.", + "id": 41, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "1315:2:0" + }, + "returnParameters": { + "id": 37, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 36, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 41, + "src": "1339:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 35, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1339:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1338:17:0" + }, + "scope": 118, + "src": "1301:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1495:82:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 44, + "name": "isOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1513:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1513:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1524: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": 43, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "1505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1505:54:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 48, + "nodeType": "ExpressionStatement", + "src": "1505:54:0" + }, + { + "id": 49, + "nodeType": "PlaceholderStatement", + "src": "1569:1:0" + } + ] + }, + "documentation": "@dev Throws if called by any account other than the owner.", + "id": 51, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 42, + "nodeType": "ParameterList", + "parameters": [], + "src": "1492:2:0" + }, + "src": "1474:103:0", + "visibility": "internal" + }, + { + "body": { + "id": 61, + "nodeType": "Block", + "src": "1706:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 59, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 56, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1723:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1723:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 58, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1739:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1723:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 55, + "id": 60, + "nodeType": "Return", + "src": "1716:29:0" + } + ] + }, + "documentation": "@dev Returns true if the caller is the current owner.", + "id": 62, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [], + "src": "1676:2:0" + }, + "returnParameters": { + "id": 55, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 54, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1700:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 53, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1700:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1699:6:0" + }, + "scope": 118, + "src": "1660:92:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 80, + "nodeType": "Block", + "src": "2140:91:0", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 68, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2176:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2192: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": 69, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2184:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184: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": 67, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "2155:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2155:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 73, + "nodeType": "EmitStatement", + "src": "2150:45:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 74, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2205:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 76, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2222: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": 75, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2214:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2214:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2205:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 79, + "nodeType": "ExpressionStatement", + "src": "2205: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": 81, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 65, + "modifierName": { + "argumentTypes": null, + "id": 64, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "2130:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2130:9:0" + } + ], + "name": "renounceOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [], + "src": "2120:2:0" + }, + "returnParameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [], + "src": "2140:0:0" + }, + "scope": 118, + "src": "2094:137:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 92, + "nodeType": "Block", + "src": "2450:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 89, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 83, + "src": "2479:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 88, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2460:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$returns$__$", + "typeString": "function (address payable)" + } + }, + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 91, + "nodeType": "ExpressionStatement", + "src": "2460:28:0" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", + "id": 93, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 86, + "modifierName": { + "argumentTypes": null, + "id": 85, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "2440:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2440:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 84, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 83, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 93, + "src": "2407:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 82, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2407:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2406:26:0" + }, + "returnParameters": { + "id": 87, + "nodeType": "ParameterList", + "parameters": [], + "src": "2450:0:0" + }, + "scope": 118, + "src": "2380:115:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 116, + "nodeType": "Block", + "src": "2659:170:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 99, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2677:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2697: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": 100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2689:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2689:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2677:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2701: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": 98, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "2669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2669:73:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 106, + "nodeType": "ExpressionStatement", + "src": "2669:73:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 108, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2778:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 109, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2786: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": 107, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "2757:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2757:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 111, + "nodeType": "EmitStatement", + "src": "2752:43:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 112, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2805:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 113, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2814:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 115, + "nodeType": "ExpressionStatement", + "src": "2805:17:0" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", + "id": 117, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 95, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "2624:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 94, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2624:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2623:26:0" + }, + "returnParameters": { + "id": 97, + "nodeType": "ParameterList", + "parameters": [], + "src": "2659:0:0" + }, + "scope": 118, + "src": "2596:233:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 334, + "src": "819:2012:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 119, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1009, + "src": "3105:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1009", + "typeString": "contract ERC20" + } + }, + "id": 120, + "nodeType": "InheritanceSpecifier", + "src": "3105:5:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 121, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "3112:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$118", + "typeString": "contract Ownable" + } + }, + "id": 122, + "nodeType": "InheritanceSpecifier", + "src": "3112:7:0" + } + ], + "contractDependencies": [ + 118, + 417, + 1009, + 1078 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 333, + "linearizedBaseContracts": [ + 333, + 118, + 1009, + 1078, + 417 + ], + "name": "DECA", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 125, + "libraryName": { + "contractScope": null, + "id": 123, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "3132:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "3126:27:0", + "typeName": { + "id": 124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3145:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 128, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3158:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 126, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3158:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "44454341", + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3190:6:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a49565813a43765a9dfdf315aaa77336d9844a752bb9a788d2dad0f019de1858", + "typeString": "literal_string \"DECA\"" + }, + "value": "DECA" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 131, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3202:59:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 129, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3202:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "444563656e7472616c697a656420434172626f6e20746f6b656e73", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3232:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a71fc6dd39cdb20c976c32b6365d2e473e0bcd38ac1af23f856facc675f989cb", + "typeString": "literal_string \"DEcentralized CArbon tokens\"" + }, + "value": "DEcentralized CArbon tokens" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 134, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3267:35:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 132, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3267:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3300:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 139, + "name": "preICOEnds", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3352:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 135, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 136, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3377:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3383:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "1" + }, + "src": "3377:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 144, + "name": "bonus1Ends", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3396:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 140, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3396:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 141, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3421:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3427:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_1814400_by_1", + "typeString": "int_const 1814400" + }, + "value": "3" + }, + "src": "3421:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 149, + "name": "bonus2Ends", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3440:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 145, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3440:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 146, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3465:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "36", + "id": 147, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3471:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_3628800_by_1", + "typeString": "int_const 3628800" + }, + "value": "6" + }, + "src": "3465:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 154, + "name": "endDate", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3484:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 150, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3484:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 151, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3506:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3131", + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3512:8:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_6652800_by_1", + "typeString": "int_const 6652800" + }, + "value": "11" + }, + "src": "3506:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 157, + "name": "_pause", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3526:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3526:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3548:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "private" + }, + { + "body": { + "id": 166, + "nodeType": "Block", + "src": "3581:66:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3599:7:0", + "subExpression": { + "argumentTypes": null, + "id": 160, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3600:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "63726f776473616c65206f6e207061757365", + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3608:20:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cc2a660c6a64b030651f27b71bc8d6deb86294e2010eb3292c6f116ef89c98fd", + "typeString": "literal_string \"crowdsale on pause\"" + }, + "value": "crowdsale on pause" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cc2a660c6a64b030651f27b71bc8d6deb86294e2010eb3292c6f116ef89c98fd", + "typeString": "literal_string \"crowdsale on pause\"" + } + ], + "id": 159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "3591:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3591:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "3591:38:0" + }, + { + "id": 165, + "nodeType": "PlaceholderStatement", + "src": "3639:1:0" + } + ] + }, + "documentation": null, + "id": 167, + "name": "notPaused", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 158, + "nodeType": "ParameterList", + "parameters": [], + "src": "3578:2:0" + }, + "src": "3560:87:0", + "visibility": "internal" + }, + { + "body": { + "id": 174, + "nodeType": "Block", + "src": "3698:30:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 172, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3715:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 171, + "id": 173, + "nodeType": "Return", + "src": "3708:13:0" + } + ] + }, + "documentation": null, + "id": 175, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [], + "src": "3669:2:0" + }, + "returnParameters": { + "id": 171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 170, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "3693:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 169, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3693:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3692:6:0" + }, + "scope": 333, + "src": "3652:76:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 186, + "nodeType": "Block", + "src": "3779:27:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 182, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3789:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 183, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "3798:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3789:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 185, + "nodeType": "ExpressionStatement", + "src": "3789:10:0" + } + ] + }, + "documentation": null, + "id": 187, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 180, + "modifierName": { + "argumentTypes": null, + "id": 179, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "3769:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3769:9:0" + } + ], + "name": "setPause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "name": "p", + "nodeType": "VariableDeclaration", + "scope": 187, + "src": "3752:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 176, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3752:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3751:8:0" + }, + "returnParameters": { + "id": 181, + "nodeType": "ParameterList", + "parameters": [], + "src": "3779:0:0" + }, + "scope": 333, + "src": "3734:72:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 289, + "nodeType": "Block", + "src": "4042:815:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 193, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4060:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 194, + "name": "endDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 154, + "src": "4067:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4060:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1096, + "src": "4052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4052:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 197, + "nodeType": "ExpressionStatement", + "src": "4052:23:0" + }, + { + "assignments": [ + 199 + ], + "declarations": [ + { + "constant": false, + "id": 199, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4085:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4085:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 200, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4085:11:0" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "name": "toOwner", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4106:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 201, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4106:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 203, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4106:12:0" + }, + { + "assignments": [ + 205 + ], + "declarations": [ + { + "constant": false, + "id": 205, + "name": "toSender", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4128:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 204, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4128:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 206, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4128:13:0" + }, + { + "assignments": [ + 208 + ], + "declarations": [ + { + "constant": false, + "id": 208, + "name": "divBy", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4151:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 207, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4151:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 209, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4151:10:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 210, + "name": "divBy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 208, + "src": "4172:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "3430", + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4180:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "src": "4172:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 213, + "nodeType": "ExpressionStatement", + "src": "4172:10:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 214, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4273:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 215, + "name": "preICOEnds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 139, + "src": "4280:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4273:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 225, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4351:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 226, + "name": "preICOEnds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 139, + "src": "4357:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4351:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 228, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4371:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 229, + "name": "bonus1Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "4378:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4371:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4351:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 240, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4449:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 241, + "name": "bonus1Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "4455:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4449:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 243, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4469:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 244, + "name": "bonus2Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 149, + "src": "4476:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4469:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4449:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 262, + "nodeType": "Block", + "src": "4543:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 255, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4557:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 256, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4566:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4566:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323235", + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4578:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_225_by_1", + "typeString": "int_const 225" + }, + "value": "225" + }, + "src": "4566:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4557:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 261, + "nodeType": "ExpressionStatement", + "src": "4557:24:0" + } + ] + }, + "id": 263, + "nodeType": "IfStatement", + "src": "4445:147:0", + "trueBody": { + "id": 254, + "nodeType": "Block", + "src": "4488:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 247, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 248, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4511:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4511:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323530", + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4523:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_250_by_1", + "typeString": "int_const 250" + }, + "value": "250" + }, + "src": "4511:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4502:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 253, + "nodeType": "ExpressionStatement", + "src": "4502:24:0" + } + ] + } + }, + "id": 264, + "nodeType": "IfStatement", + "src": "4347:245:0", + "trueBody": { + "id": 239, + "nodeType": "Block", + "src": "4390:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 232, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 233, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4413:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4413:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323735", + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4425:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_275_by_1", + "typeString": "int_const 275" + }, + "value": "275" + }, + "src": "4413:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4404:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 238, + "nodeType": "ExpressionStatement", + "src": "4404:24:0" + } + ] + } + }, + "id": 265, + "nodeType": "IfStatement", + "src": "4269:323:0", + "trueBody": { + "id": 224, + "nodeType": "Block", + "src": "4292:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 217, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4306:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 218, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4315:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4315:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "333030", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4327:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "300" + }, + "src": "4315:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4306:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 223, + "nodeType": "ExpressionStatement", + "src": "4306:24:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 266, + "name": "toOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "4602:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 269, + "name": "divBy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 208, + "src": "4623:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 267, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4612:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 537, + "src": "4612: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": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4612:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4602:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 272, + "nodeType": "ExpressionStatement", + "src": "4602:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 273, + "name": "toSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 205, + "src": "4721:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 274, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4732:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4721:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 276, + "nodeType": "ExpressionStatement", + "src": "4721:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 278, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "4796:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 280, + "name": "toOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "4805:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 277, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 893, + "src": "4790:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4790:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 282, + "nodeType": "ExpressionStatement", + "src": "4790:23:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 284, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4829:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4829:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "toSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 205, + "src": "4841:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 283, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 893, + "src": "4823:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4823:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "ExpressionStatement", + "src": "4823:27:0" + } + ] + }, + "documentation": null, + "id": 290, + "implemented": true, + "kind": "fallback", + "modifiers": [ + { + "arguments": null, + "id": 190, + "modifierName": { + "argumentTypes": null, + "id": 189, + "name": "notPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "4015:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4015:9:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 188, + "nodeType": "ParameterList", + "parameters": [], + "src": "4012:2:0" + }, + "returnParameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [], + "src": "4042:0:0" + }, + "scope": 333, + "src": "4004:853:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 310, + "nodeType": "Block", + "src": "4944:154:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 296, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4962:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 297, + "name": "endDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 154, + "src": "4969:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4962:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 295, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1096, + "src": "4954:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4954:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 300, + "nodeType": "ExpressionStatement", + "src": "4954:23:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 305, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "5077:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DECA_$333", + "typeString": "contract DECA" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DECA_$333", + "typeString": "contract DECA" + } + ], + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5069:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5069:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5069:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 301, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "5052:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5052:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5052:39:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "5052:39:0" + } + ] + }, + "documentation": null, + "id": 311, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 293, + "modifierName": { + "argumentTypes": null, + "id": 292, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "4934:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4934:9:0" + } + ], + "name": "getETH", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 291, + "nodeType": "ParameterList", + "parameters": [], + "src": "4924:2:0" + }, + "returnParameters": { + "id": 294, + "nodeType": "ParameterList", + "parameters": [], + "src": "4944:0:0" + }, + "scope": 333, + "src": "4909:189:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 331, + "nodeType": "Block", + "src": "5443:70:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 326, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "5490:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5490:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 328, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 315, + "src": "5499: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": 323, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 313, + "src": "5467:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 322, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1078, + "src": "5460:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1078_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5460:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1078", + "typeString": "contract IERC20" + } + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1032, + "src": "5460:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5460:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 321, + "id": 330, + "nodeType": "Return", + "src": "5453:53:0" + } + ] + }, + "documentation": null, + "id": 332, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 318, + "modifierName": { + "argumentTypes": null, + "id": 317, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "5410:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5410:9:0" + } + ], + "name": "transferAnyERC20Token", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 313, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5360:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 312, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5360:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 315, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5390:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5390:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5359:43:0" + }, + "returnParameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5429:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 319, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5429:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:14:0" + }, + "scope": 333, + "src": "5329:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 334, + "src": "3088:2427:0" + } + ], + "src": "0:5516:0" + }, + "legacyAST": { + "absolutePath": "/home/p1r0/Dev/git/neetsec/dcc/contracts/DECA.sol", + "exportedSymbols": { + "DECA": [ + 333 + ], + "Ownable": [ + 118 + ] + }, + "id": 334, + "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": 334, + "sourceUnit": 1010, + "src": "25:55:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 334, + "sourceUnit": 1079, + "src": "81:56:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 334, + "sourceUnit": 605, + "src": "138:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 5, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 417, + "src": "839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$417", + "typeString": "contract Context" + } + }, + "id": 6, + "nodeType": "InheritanceSpecifier", + "src": "839:7:0" + } + ], + "contractDependencies": [ + 417 + ], + "contractKind": "contract", + "documentation": "@dev The reason using this instead of openzeppelin, because owner are not 'payable'", + "fullyImplemented": true, + "id": 118, + "linearizedBaseContracts": [ + 118, + 417 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 118, + "src": "853:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 7, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "853:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "private" + }, + { + "id": 11, + "libraryName": { + "contractScope": null, + "id": 9, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "895:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "889:27:0", + "typeName": { + "id": 10, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "908:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "anonymous": false, + "documentation": null, + "id": 17, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13, + "indexed": true, + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "949:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "949:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15, + "indexed": true, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "980:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "980:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "948:57:0" + }, + "src": "922:84:0" + }, + { + "body": { + "id": 32, + "nodeType": "Block", + "src": "1132:93:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1142:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 21, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1151:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1142:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 24, + "nodeType": "ExpressionStatement", + "src": "1142:21:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1207: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": 26, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1199:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1199:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 29, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1211: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": 25, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1178:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 30, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1178:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 31, + "nodeType": "EmitStatement", + "src": "1173:45:0" + } + ] + }, + "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", + "id": 33, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "1120:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "1132:0:0" + }, + "scope": 118, + "src": "1108:117:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 40, + "nodeType": "Block", + "src": "1356:30:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 38, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 37, + "id": 39, + "nodeType": "Return", + "src": "1366:13:0" + } + ] + }, + "documentation": "@dev Returns the address of the current owner.", + "id": 41, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "1315:2:0" + }, + "returnParameters": { + "id": 37, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 36, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 41, + "src": "1339:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 35, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1339:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1338:17:0" + }, + "scope": 118, + "src": "1301:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "1495:82:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 44, + "name": "isOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "1513:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1513:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1524: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": 43, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "1505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1505:54:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 48, + "nodeType": "ExpressionStatement", + "src": "1505:54:0" + }, + { + "id": 49, + "nodeType": "PlaceholderStatement", + "src": "1569:1:0" + } + ] + }, + "documentation": "@dev Throws if called by any account other than the owner.", + "id": 51, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 42, + "nodeType": "ParameterList", + "parameters": [], + "src": "1492:2:0" + }, + "src": "1474:103:0", + "visibility": "internal" + }, + { + "body": { + "id": 61, + "nodeType": "Block", + "src": "1706:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 59, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 56, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1723:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1723:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 58, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1739:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1723:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 55, + "id": 60, + "nodeType": "Return", + "src": "1716:29:0" + } + ] + }, + "documentation": "@dev Returns true if the caller is the current owner.", + "id": 62, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [], + "src": "1676:2:0" + }, + "returnParameters": { + "id": 55, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 54, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "1700:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 53, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1700:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1699:6:0" + }, + "scope": 118, + "src": "1660:92:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 80, + "nodeType": "Block", + "src": "2140:91:0", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 68, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2176:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2192: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": 69, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2184:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184: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": 67, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "2155:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2155:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 73, + "nodeType": "EmitStatement", + "src": "2150:45:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 74, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2205:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 76, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2222: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": 75, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2214:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2214:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2205:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 79, + "nodeType": "ExpressionStatement", + "src": "2205: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": 81, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 65, + "modifierName": { + "argumentTypes": null, + "id": 64, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "2130:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2130:9:0" + } + ], + "name": "renounceOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [], + "src": "2120:2:0" + }, + "returnParameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [], + "src": "2140:0:0" + }, + "scope": 118, + "src": "2094:137:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 92, + "nodeType": "Block", + "src": "2450:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 89, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 83, + "src": "2479:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 88, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "2460:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$returns$__$", + "typeString": "function (address payable)" + } + }, + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 91, + "nodeType": "ExpressionStatement", + "src": "2460:28:0" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", + "id": 93, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 86, + "modifierName": { + "argumentTypes": null, + "id": 85, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "2440:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2440:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 84, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 83, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 93, + "src": "2407:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 82, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2407:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2406:26:0" + }, + "returnParameters": { + "id": 87, + "nodeType": "ParameterList", + "parameters": [], + "src": "2450:0:0" + }, + "scope": 118, + "src": "2380:115:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 116, + "nodeType": "Block", + "src": "2659:170:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 99, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2677:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2697: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": 100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2689:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2689:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2677:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2701: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": 98, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "2669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2669:73:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 106, + "nodeType": "ExpressionStatement", + "src": "2669:73:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 108, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2778:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 109, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2786: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": 107, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "2757:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2757:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 111, + "nodeType": "EmitStatement", + "src": "2752:43:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 112, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "2805:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 113, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "2814:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2805:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 115, + "nodeType": "ExpressionStatement", + "src": "2805:17:0" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", + "id": 117, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 95, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "2624:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 94, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2624:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2623:26:0" + }, + "returnParameters": { + "id": 97, + "nodeType": "ParameterList", + "parameters": [], + "src": "2659:0:0" + }, + "scope": 118, + "src": "2596:233:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 334, + "src": "819:2012:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 119, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1009, + "src": "3105:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1009", + "typeString": "contract ERC20" + } + }, + "id": 120, + "nodeType": "InheritanceSpecifier", + "src": "3105:5:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 121, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 118, + "src": "3112:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$118", + "typeString": "contract Ownable" + } + }, + "id": 122, + "nodeType": "InheritanceSpecifier", + "src": "3112:7:0" + } + ], + "contractDependencies": [ + 118, + 417, + 1009, + 1078 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 333, + "linearizedBaseContracts": [ + 333, + 118, + 1009, + 1078, + 417 + ], + "name": "DECA", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 125, + "libraryName": { + "contractScope": null, + "id": 123, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 604, + "src": "3132:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$604", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "3126:27:0", + "typeName": { + "id": 124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3145:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 128, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3158:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 126, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3158:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "44454341", + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3190:6:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a49565813a43765a9dfdf315aaa77336d9844a752bb9a788d2dad0f019de1858", + "typeString": "literal_string \"DECA\"" + }, + "value": "DECA" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 131, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3202:59:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 129, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3202:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "444563656e7472616c697a656420434172626f6e20746f6b656e73", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3232:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a71fc6dd39cdb20c976c32b6365d2e473e0bcd38ac1af23f856facc675f989cb", + "typeString": "literal_string \"DEcentralized CArbon tokens\"" + }, + "value": "DEcentralized CArbon tokens" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 134, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3267:35:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 132, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3267:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3300:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 139, + "name": "preICOEnds", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3352:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 135, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3352:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 136, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3377:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3383:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "1" + }, + "src": "3377:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 144, + "name": "bonus1Ends", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3396:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 140, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3396:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 141, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3421:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3427:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_1814400_by_1", + "typeString": "int_const 1814400" + }, + "value": "3" + }, + "src": "3421:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 149, + "name": "bonus2Ends", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3440:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 145, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3440:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 146, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3465:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "36", + "id": 147, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3471:7:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_3628800_by_1", + "typeString": "int_const 3628800" + }, + "value": "6" + }, + "src": "3465:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 154, + "name": "endDate", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3484:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 150, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3484:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 151, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "3506:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3131", + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3512:8:0", + "subdenomination": "weeks", + "typeDescriptions": { + "typeIdentifier": "t_rational_6652800_by_1", + "typeString": "int_const 6652800" + }, + "value": "11" + }, + "src": "3506:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 157, + "name": "_pause", + "nodeType": "VariableDeclaration", + "scope": 333, + "src": "3526:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3526:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3548:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "private" + }, + { + "body": { + "id": 166, + "nodeType": "Block", + "src": "3581:66:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3599:7:0", + "subExpression": { + "argumentTypes": null, + "id": 160, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3600:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "63726f776473616c65206f6e207061757365", + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3608:20:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cc2a660c6a64b030651f27b71bc8d6deb86294e2010eb3292c6f116ef89c98fd", + "typeString": "literal_string \"crowdsale on pause\"" + }, + "value": "crowdsale on pause" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cc2a660c6a64b030651f27b71bc8d6deb86294e2010eb3292c6f116ef89c98fd", + "typeString": "literal_string \"crowdsale on pause\"" + } + ], + "id": 159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "3591:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3591:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "3591:38:0" + }, + { + "id": 165, + "nodeType": "PlaceholderStatement", + "src": "3639:1:0" + } + ] + }, + "documentation": null, + "id": 167, + "name": "notPaused", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 158, + "nodeType": "ParameterList", + "parameters": [], + "src": "3578:2:0" + }, + "src": "3560:87:0", + "visibility": "internal" + }, + { + "body": { + "id": 174, + "nodeType": "Block", + "src": "3698:30:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 172, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3715:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 171, + "id": 173, + "nodeType": "Return", + "src": "3708:13:0" + } + ] + }, + "documentation": null, + "id": 175, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [], + "src": "3669:2:0" + }, + "returnParameters": { + "id": 171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 170, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "3693:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 169, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3693:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3692:6:0" + }, + "scope": 333, + "src": "3652:76:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 186, + "nodeType": "Block", + "src": "3779:27:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 182, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "3789:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 183, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "3798:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3789:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 185, + "nodeType": "ExpressionStatement", + "src": "3789:10:0" + } + ] + }, + "documentation": null, + "id": 187, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 180, + "modifierName": { + "argumentTypes": null, + "id": 179, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "3769:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3769:9:0" + } + ], + "name": "setPause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "name": "p", + "nodeType": "VariableDeclaration", + "scope": 187, + "src": "3752:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 176, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3752:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3751:8:0" + }, + "returnParameters": { + "id": 181, + "nodeType": "ParameterList", + "parameters": [], + "src": "3779:0:0" + }, + "scope": 333, + "src": "3734:72:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 289, + "nodeType": "Block", + "src": "4042:815:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 193, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4060:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 194, + "name": "endDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 154, + "src": "4067:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4060:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 192, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1096, + "src": "4052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4052:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 197, + "nodeType": "ExpressionStatement", + "src": "4052:23:0" + }, + { + "assignments": [ + 199 + ], + "declarations": [ + { + "constant": false, + "id": 199, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4085:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4085:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 200, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4085:11:0" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "name": "toOwner", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4106:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 201, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4106:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 203, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4106:12:0" + }, + { + "assignments": [ + 205 + ], + "declarations": [ + { + "constant": false, + "id": 205, + "name": "toSender", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4128:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 204, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4128:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 206, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4128:13:0" + }, + { + "assignments": [ + 208 + ], + "declarations": [ + { + "constant": false, + "id": 208, + "name": "divBy", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "4151:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 207, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4151:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 209, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4151:10:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 210, + "name": "divBy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 208, + "src": "4172:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "3430", + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4180:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "src": "4172:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 213, + "nodeType": "ExpressionStatement", + "src": "4172:10:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 214, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4273:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 215, + "name": "preICOEnds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 139, + "src": "4280:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4273:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 225, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4351:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 226, + "name": "preICOEnds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 139, + "src": "4357:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4351:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 228, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4371:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 229, + "name": "bonus1Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "4378:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4371:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4351:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 240, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4449:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 241, + "name": "bonus1Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "4455:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4449:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 243, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4469:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 244, + "name": "bonus2Ends", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 149, + "src": "4476:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4469:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4449:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 262, + "nodeType": "Block", + "src": "4543:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 255, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4557:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 256, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4566:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4566:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323235", + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4578:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_225_by_1", + "typeString": "int_const 225" + }, + "value": "225" + }, + "src": "4566:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4557:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 261, + "nodeType": "ExpressionStatement", + "src": "4557:24:0" + } + ] + }, + "id": 263, + "nodeType": "IfStatement", + "src": "4445:147:0", + "trueBody": { + "id": 254, + "nodeType": "Block", + "src": "4488:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 247, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 248, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4511:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4511:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323530", + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4523:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_250_by_1", + "typeString": "int_const 250" + }, + "value": "250" + }, + "src": "4511:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4502:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 253, + "nodeType": "ExpressionStatement", + "src": "4502:24:0" + } + ] + } + }, + "id": 264, + "nodeType": "IfStatement", + "src": "4347:245:0", + "trueBody": { + "id": 239, + "nodeType": "Block", + "src": "4390:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 232, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 233, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4413:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4413:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323735", + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4425:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_275_by_1", + "typeString": "int_const 275" + }, + "value": "275" + }, + "src": "4413:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4404:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 238, + "nodeType": "ExpressionStatement", + "src": "4404:24:0" + } + ] + } + }, + "id": 265, + "nodeType": "IfStatement", + "src": "4269:323:0", + "trueBody": { + "id": 224, + "nodeType": "Block", + "src": "4292:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 217, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4306:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 218, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4315:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4315:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "333030", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4327:3:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "300" + }, + "src": "4315:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4306:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 223, + "nodeType": "ExpressionStatement", + "src": "4306:24:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 266, + "name": "toOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "4602:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 269, + "name": "divBy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 208, + "src": "4623:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 267, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4612:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 537, + "src": "4612: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": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4612:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4602:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 272, + "nodeType": "ExpressionStatement", + "src": "4602:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 273, + "name": "toSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 205, + "src": "4721:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 274, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "4732:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4721:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 276, + "nodeType": "ExpressionStatement", + "src": "4721:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 278, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "4796:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 280, + "name": "toOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "4805:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 277, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 893, + "src": "4790:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4790:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 282, + "nodeType": "ExpressionStatement", + "src": "4790:23:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 284, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "4829:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4829:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "toSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 205, + "src": "4841:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 283, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 893, + "src": "4823:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4823:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "ExpressionStatement", + "src": "4823:27:0" + } + ] + }, + "documentation": null, + "id": 290, + "implemented": true, + "kind": "fallback", + "modifiers": [ + { + "arguments": null, + "id": 190, + "modifierName": { + "argumentTypes": null, + "id": 189, + "name": "notPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "4015:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4015:9:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 188, + "nodeType": "ParameterList", + "parameters": [], + "src": "4012:2:0" + }, + "returnParameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [], + "src": "4042:0:0" + }, + "scope": 333, + "src": "4004:853:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 310, + "nodeType": "Block", + "src": "4944:154:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 296, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1095, + "src": "4962:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 297, + "name": "endDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 154, + "src": "4969:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4962:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 295, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1096, + "src": "4954:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4954:23:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 300, + "nodeType": "ExpressionStatement", + "src": "4954:23:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 305, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "5077:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DECA_$333", + "typeString": "contract DECA" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DECA_$333", + "typeString": "contract DECA" + } + ], + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5069:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5069:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5069:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 301, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "5052:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5052:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5052:39:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "5052:39:0" + } + ] + }, + "documentation": null, + "id": 311, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 293, + "modifierName": { + "argumentTypes": null, + "id": 292, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "4934:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4934:9:0" + } + ], + "name": "getETH", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 291, + "nodeType": "ParameterList", + "parameters": [], + "src": "4924:2:0" + }, + "returnParameters": { + "id": 294, + "nodeType": "ParameterList", + "parameters": [], + "src": "4944:0:0" + }, + "scope": 333, + "src": "4909:189:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 331, + "nodeType": "Block", + "src": "5443:70:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 326, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "5490:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5490:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 328, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 315, + "src": "5499: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": 323, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 313, + "src": "5467:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 322, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1078, + "src": "5460:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1078_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5460:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1078", + "typeString": "contract IERC20" + } + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1032, + "src": "5460:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5460:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 321, + "id": 330, + "nodeType": "Return", + "src": "5453:53:0" + } + ] + }, + "documentation": null, + "id": 332, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 318, + "modifierName": { + "argumentTypes": null, + "id": 317, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "5410:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5410:9:0" + } + ], + "name": "transferAnyERC20Token", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 313, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5360:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 312, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5360:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 315, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5390:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5390:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5359:43:0" + }, + "returnParameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 332, + "src": "5429:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 319, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5429:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:14:0" + }, + "scope": 333, + "src": "5329:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 334, + "src": "3088:2427:0" + } + ], + "src": "0:5516:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.12+commit.7709ece9.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.19", + "updatedAt": "2020-02-18T05:14:13.969Z", + "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": {} + } +} \ No newline at end of file diff --git a/build/contracts/SafeMath.json b/build/contracts/SafeMath.json new file mode 100644 index 0000000..3c52dc9 --- /dev/null +++ b/build/contracts/SafeMath.json @@ -0,0 +1,4893 @@ +{ + "contractName": "SafeMath", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. * Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. * Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]}},\"version\":1}", + "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158208b1f219994d23d2b793719c323653bfad2b6440f811d891106e6c696ab7430cc64736f6c634300050c0032", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158208b1f219994d23d2b793719c323653bfad2b6440f811d891106e6c696ab7430cc64736f6c634300050c0032", + "sourceMap": "589:4708:3:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", + "deployedSourceMap": "589:4708:3:-;;;;;;;;", + "source": "pragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n", + "sourcePath": "@openzeppelin/contracts/math/SafeMath.sol", + "ast": { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 604 + ] + }, + "id": 605, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 419, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", + "fullyImplemented": true, + "id": 604, + "linearizedBaseContracts": [ + 604 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 443, + "nodeType": "Block", + "src": "901:109:3", + "statements": [ + { + "assignments": [ + 429 + ], + "declarations": [ + { + "constant": false, + "id": 429, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 443, + "src": "911:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 428, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "911:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 433, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 430, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 421, + "src": "923:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 431, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 423, + "src": "927:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "923:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "911:17:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 435, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "946:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 436, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 421, + "src": "951:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "946:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "954:29:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", + "typeString": "literal_string \"SafeMath: addition overflow\"" + }, + "value": "SafeMath: addition overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", + "typeString": "literal_string \"SafeMath: addition overflow\"" + } + ], + "id": 434, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "938:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "938:46:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 440, + "nodeType": "ExpressionStatement", + "src": "938:46:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 441, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "1002:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 427, + "id": 442, + "nodeType": "Return", + "src": "995:8:3" + } + ] + }, + "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", + "id": 444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 424, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 421, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "847:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 420, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "847:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 423, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "858:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 422, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "858:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "846:22:3" + }, + "returnParameters": { + "id": 427, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 426, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "892:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 425, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "892:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "891:9:3" + }, + "scope": 604, + "src": "834:176:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 459, + "nodeType": "Block", + "src": "1341:67:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 454, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 446, + "src": "1362:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 455, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 448, + "src": "1365:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", + "id": 456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1368:32:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", + "typeString": "literal_string \"SafeMath: subtraction overflow\"" + }, + "value": "SafeMath: subtraction overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", + "typeString": "literal_string \"SafeMath: subtraction overflow\"" + } + ], + "id": 453, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 460, + 487 + ], + "referencedDeclaration": 487, + "src": "1358:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1358:43:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 452, + "id": 458, + "nodeType": "Return", + "src": "1351:50:3" + } + ] + }, + "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", + "id": 460, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 446, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 460, + "src": "1287:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 445, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1287:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 448, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 460, + "src": "1298:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 447, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1298:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1286:22:3" + }, + "returnParameters": { + "id": 452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 451, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 460, + "src": "1332:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1332:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1331:9:3" + }, + "scope": 604, + "src": "1274:134:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 486, + "nodeType": "Block", + "src": "1827:92:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 472, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "1845:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 473, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "1850:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1845:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 475, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "1853:12:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 471, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "1837:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1837:29:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 477, + "nodeType": "ExpressionStatement", + "src": "1837:29:3" + }, + { + "assignments": [ + 479 + ], + "declarations": [ + { + "constant": false, + "id": 479, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 486, + "src": "1876:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1876:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 483, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 480, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "1888:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 481, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "1892:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1888:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1876:17:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 484, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 479, + "src": "1911:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 470, + "id": 485, + "nodeType": "Return", + "src": "1904:8:3" + } + ] + }, + "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", + "id": 487, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 467, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 462, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1745:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 461, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1745:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 464, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1756:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 463, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1756:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 466, + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1767:26:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 465, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1767:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1744:50:3" + }, + "returnParameters": { + "id": 470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 469, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1818:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 468, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1818:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1817:9:3" + }, + "scope": 604, + "src": "1732:187:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 520, + "nodeType": "Block", + "src": "2226:392:3", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 496, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 489, + "src": "2458:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2463:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2458:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 502, + "nodeType": "IfStatement", + "src": "2454:45:3", + "trueBody": { + "id": 501, + "nodeType": "Block", + "src": "2466:33:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2487:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 495, + "id": 500, + "nodeType": "Return", + "src": "2480:8:3" + } + ] + } + }, + { + "assignments": [ + 504 + ], + "declarations": [ + { + "constant": false, + "id": 504, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 520, + "src": "2509:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 503, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2509:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 508, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 505, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 489, + "src": "2521:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 506, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 491, + "src": "2525:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2521:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2509:17:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 510, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 504, + "src": "2544:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 511, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 489, + "src": "2548:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2544:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 513, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 491, + "src": "2553:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2544:10:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", + "id": 515, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2556:35:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", + "typeString": "literal_string \"SafeMath: multiplication overflow\"" + }, + "value": "SafeMath: multiplication overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", + "typeString": "literal_string \"SafeMath: multiplication overflow\"" + } + ], + "id": 509, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "2536:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2536:56:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 517, + "nodeType": "ExpressionStatement", + "src": "2536:56:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 518, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 504, + "src": "2610:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 495, + "id": 519, + "nodeType": "Return", + "src": "2603:8:3" + } + ] + }, + "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", + "id": 521, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 492, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 489, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "2172:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 488, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2172:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 491, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "2183:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 490, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2183:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2171:22:3" + }, + "returnParameters": { + "id": 495, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 494, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "2217:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 493, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2217:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2216:9:3" + }, + "scope": 604, + "src": "2159:459:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 536, + "nodeType": "Block", + "src": "3140:63:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 531, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "3161:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 532, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "3164:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3167:28:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", + "typeString": "literal_string \"SafeMath: division by zero\"" + }, + "value": "SafeMath: division by zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", + "typeString": "literal_string \"SafeMath: division by zero\"" + } + ], + "id": 530, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 537, + 564 + ], + "referencedDeclaration": 564, + "src": "3157:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3157:39:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 529, + "id": 535, + "nodeType": "Return", + "src": "3150:46:3" + } + ] + }, + "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", + "id": 537, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 523, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 537, + "src": "3086:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 522, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3086:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 525, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 537, + "src": "3097:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3097:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3085:22:3" + }, + "returnParameters": { + "id": 529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 528, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 537, + "src": "3131:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 527, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3131:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3130:9:3" + }, + "scope": 604, + "src": "3073:130:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 563, + "nodeType": "Block", + "src": "3813:243:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 549, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "3897:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3901:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3897:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 552, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "3904:12:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 548, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "3889:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3889:28:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 554, + "nodeType": "ExpressionStatement", + "src": "3889:28:3" + }, + { + "assignments": [ + 556 + ], + "declarations": [ + { + "constant": false, + "id": 556, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 563, + "src": "3927:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 555, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3927:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 560, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 557, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 539, + "src": "3939:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 558, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "3943:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3939:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3927:17:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 561, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 556, + "src": "4048:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 547, + "id": 562, + "nodeType": "Return", + "src": "4041:8:3" + } + ] + }, + "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", + "id": 564, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 539, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 564, + "src": "3731:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 538, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3731:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 541, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 564, + "src": "3742:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3742:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 543, + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "scope": 564, + "src": "3753:26:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 542, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3753:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3730:50:3" + }, + "returnParameters": { + "id": 547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 546, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 564, + "src": "3804:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 545, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3804:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3803:9:3" + }, + "scope": 604, + "src": "3718:338:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 579, + "nodeType": "Block", + "src": "4567:61:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 574, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 566, + "src": "4588:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 575, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "4591:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4594:26:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", + "typeString": "literal_string \"SafeMath: modulo by zero\"" + }, + "value": "SafeMath: modulo by zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", + "typeString": "literal_string \"SafeMath: modulo by zero\"" + } + ], + "id": 573, + "name": "mod", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 580, + 603 + ], + "referencedDeclaration": 603, + "src": "4584:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4584:37:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 572, + "id": 578, + "nodeType": "Return", + "src": "4577:44:3" + } + ] + }, + "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", + "id": 580, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 566, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 580, + "src": "4513:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4513:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 568, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 580, + "src": "4524:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 567, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4524:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4512:22:3" + }, + "returnParameters": { + "id": 572, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 571, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 580, + "src": "4558:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 570, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4558:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4557:9:3" + }, + "scope": 604, + "src": "4500:128:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 602, + "nodeType": "Block", + "src": "5227:68:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 592, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 584, + "src": "5245:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5250:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5245:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 595, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 586, + "src": "5253:12:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 591, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "5237:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5237:29:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 597, + "nodeType": "ExpressionStatement", + "src": "5237:29:3" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 598, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 582, + "src": "5283:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 599, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 584, + "src": "5287:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5283:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 590, + "id": 601, + "nodeType": "Return", + "src": "5276:12:3" + } + ] + }, + "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", + "id": 603, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 587, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 582, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "5145:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5145:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 584, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "5156:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 583, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 586, + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "5167:26:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 585, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5167:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5144:50:3" + }, + "returnParameters": { + "id": 590, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 589, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "5218:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 588, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5218:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5217:9:3" + }, + "scope": 604, + "src": "5132:163:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 605, + "src": "589:4708:3" + } + ], + "src": "0:5298:3" + }, + "legacyAST": { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 604 + ] + }, + "id": 605, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 419, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", + "fullyImplemented": true, + "id": 604, + "linearizedBaseContracts": [ + 604 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 443, + "nodeType": "Block", + "src": "901:109:3", + "statements": [ + { + "assignments": [ + 429 + ], + "declarations": [ + { + "constant": false, + "id": 429, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 443, + "src": "911:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 428, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "911:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 433, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 430, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 421, + "src": "923:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 431, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 423, + "src": "927:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "923:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "911:17:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 435, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "946:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 436, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 421, + "src": "951:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "946:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "954:29:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", + "typeString": "literal_string \"SafeMath: addition overflow\"" + }, + "value": "SafeMath: addition overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", + "typeString": "literal_string \"SafeMath: addition overflow\"" + } + ], + "id": 434, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "938:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "938:46:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 440, + "nodeType": "ExpressionStatement", + "src": "938:46:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 441, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "1002:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 427, + "id": 442, + "nodeType": "Return", + "src": "995:8:3" + } + ] + }, + "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", + "id": 444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 424, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 421, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "847:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 420, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "847:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 423, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "858:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 422, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "858:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "846:22:3" + }, + "returnParameters": { + "id": 427, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 426, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "892:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 425, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "892:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "891:9:3" + }, + "scope": 604, + "src": "834:176:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 459, + "nodeType": "Block", + "src": "1341:67:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 454, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 446, + "src": "1362:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 455, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 448, + "src": "1365:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", + "id": 456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1368:32:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", + "typeString": "literal_string \"SafeMath: subtraction overflow\"" + }, + "value": "SafeMath: subtraction overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", + "typeString": "literal_string \"SafeMath: subtraction overflow\"" + } + ], + "id": 453, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 460, + 487 + ], + "referencedDeclaration": 487, + "src": "1358:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1358:43:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 452, + "id": 458, + "nodeType": "Return", + "src": "1351:50:3" + } + ] + }, + "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", + "id": 460, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 446, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 460, + "src": "1287:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 445, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1287:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 448, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 460, + "src": "1298:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 447, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1298:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1286:22:3" + }, + "returnParameters": { + "id": 452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 451, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 460, + "src": "1332:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1332:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1331:9:3" + }, + "scope": 604, + "src": "1274:134:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 486, + "nodeType": "Block", + "src": "1827:92:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 472, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "1845:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 473, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "1850:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1845:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 475, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "1853:12:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 471, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "1837:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1837:29:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 477, + "nodeType": "ExpressionStatement", + "src": "1837:29:3" + }, + { + "assignments": [ + 479 + ], + "declarations": [ + { + "constant": false, + "id": 479, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 486, + "src": "1876:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1876:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 483, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 480, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "1888:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 481, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "1892:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1888:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1876:17:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 484, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 479, + "src": "1911:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 470, + "id": 485, + "nodeType": "Return", + "src": "1904:8:3" + } + ] + }, + "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", + "id": 487, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 467, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 462, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1745:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 461, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1745:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 464, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1756:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 463, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1756:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 466, + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1767:26:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 465, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1767:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1744:50:3" + }, + "returnParameters": { + "id": 470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 469, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1818:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 468, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1818:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1817:9:3" + }, + "scope": 604, + "src": "1732:187:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 520, + "nodeType": "Block", + "src": "2226:392:3", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 496, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 489, + "src": "2458:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2463:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2458:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 502, + "nodeType": "IfStatement", + "src": "2454:45:3", + "trueBody": { + "id": 501, + "nodeType": "Block", + "src": "2466:33:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2487:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 495, + "id": 500, + "nodeType": "Return", + "src": "2480:8:3" + } + ] + } + }, + { + "assignments": [ + 504 + ], + "declarations": [ + { + "constant": false, + "id": 504, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 520, + "src": "2509:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 503, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2509:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 508, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 505, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 489, + "src": "2521:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 506, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 491, + "src": "2525:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2521:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2509:17:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 510, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 504, + "src": "2544:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 511, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 489, + "src": "2548:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2544:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 513, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 491, + "src": "2553:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2544:10:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", + "id": 515, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2556:35:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", + "typeString": "literal_string \"SafeMath: multiplication overflow\"" + }, + "value": "SafeMath: multiplication overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", + "typeString": "literal_string \"SafeMath: multiplication overflow\"" + } + ], + "id": 509, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "2536:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2536:56:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 517, + "nodeType": "ExpressionStatement", + "src": "2536:56:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 518, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 504, + "src": "2610:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 495, + "id": 519, + "nodeType": "Return", + "src": "2603:8:3" + } + ] + }, + "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", + "id": 521, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 492, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 489, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "2172:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 488, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2172:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 491, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "2183:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 490, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2183:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2171:22:3" + }, + "returnParameters": { + "id": 495, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 494, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "2217:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 493, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2217:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2216:9:3" + }, + "scope": 604, + "src": "2159:459:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 536, + "nodeType": "Block", + "src": "3140:63:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 531, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "3161:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 532, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "3164:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3167:28:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", + "typeString": "literal_string \"SafeMath: division by zero\"" + }, + "value": "SafeMath: division by zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", + "typeString": "literal_string \"SafeMath: division by zero\"" + } + ], + "id": 530, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 537, + 564 + ], + "referencedDeclaration": 564, + "src": "3157:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3157:39:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 529, + "id": 535, + "nodeType": "Return", + "src": "3150:46:3" + } + ] + }, + "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", + "id": 537, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 523, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 537, + "src": "3086:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 522, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3086:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 525, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 537, + "src": "3097:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3097:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3085:22:3" + }, + "returnParameters": { + "id": 529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 528, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 537, + "src": "3131:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 527, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3131:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3130:9:3" + }, + "scope": 604, + "src": "3073:130:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 563, + "nodeType": "Block", + "src": "3813:243:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 549, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "3897:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3901:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3897:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 552, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "3904:12:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 548, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "3889:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3889:28:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 554, + "nodeType": "ExpressionStatement", + "src": "3889:28:3" + }, + { + "assignments": [ + 556 + ], + "declarations": [ + { + "constant": false, + "id": 556, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 563, + "src": "3927:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 555, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3927:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 560, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 557, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 539, + "src": "3939:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 558, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "3943:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3939:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3927:17:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 561, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 556, + "src": "4048:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 547, + "id": 562, + "nodeType": "Return", + "src": "4041:8:3" + } + ] + }, + "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", + "id": 564, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 539, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 564, + "src": "3731:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 538, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3731:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 541, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 564, + "src": "3742:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3742:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 543, + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "scope": 564, + "src": "3753:26:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 542, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3753:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3730:50:3" + }, + "returnParameters": { + "id": 547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 546, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 564, + "src": "3804:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 545, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3804:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3803:9:3" + }, + "scope": 604, + "src": "3718:338:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 579, + "nodeType": "Block", + "src": "4567:61:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 574, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 566, + "src": "4588:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 575, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "4591:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4594:26:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", + "typeString": "literal_string \"SafeMath: modulo by zero\"" + }, + "value": "SafeMath: modulo by zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", + "typeString": "literal_string \"SafeMath: modulo by zero\"" + } + ], + "id": 573, + "name": "mod", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 580, + 603 + ], + "referencedDeclaration": 603, + "src": "4584:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4584:37:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 572, + "id": 578, + "nodeType": "Return", + "src": "4577:44:3" + } + ] + }, + "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", + "id": 580, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 566, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 580, + "src": "4513:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4513:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 568, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 580, + "src": "4524:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 567, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4524:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4512:22:3" + }, + "returnParameters": { + "id": 572, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 571, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 580, + "src": "4558:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 570, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4558:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4557:9:3" + }, + "scope": 604, + "src": "4500:128:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 602, + "nodeType": "Block", + "src": "5227:68:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 592, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 584, + "src": "5245:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5250:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5245:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 595, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 586, + "src": "5253:12:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 591, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "5237:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5237:29:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 597, + "nodeType": "ExpressionStatement", + "src": "5237:29:3" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 598, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 582, + "src": "5283:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 599, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 584, + "src": "5287:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5283:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 590, + "id": 601, + "nodeType": "Return", + "src": "5276:12:3" + } + ] + }, + "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", + "id": 603, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 587, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 582, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "5145:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5145:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 584, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "5156:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 583, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 586, + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "5167:26:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 585, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5167:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5144:50:3" + }, + "returnParameters": { + "id": 590, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 589, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "5218:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 588, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5218:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5217:9:3" + }, + "scope": 604, + "src": "5132:163:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 605, + "src": "589:4708:3" + } + ], + "src": "0:5298:3" + }, + "compiler": { + "name": "solc", + "version": "0.5.12+commit.7709ece9.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.19", + "updatedAt": "2020-02-18T05:14:13.973Z", + "devdoc": { + "details": "Wrappers over Solidity's arithmetic operations with added overflow checks. * Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. * Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.", + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/contracts/DECA.sol b/contracts/DECA.sol new file mode 100644 index 0000000..6076917 --- /dev/null +++ b/contracts/DECA.sol @@ -0,0 +1,169 @@ +pragma solidity 0.5.12; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/math/SafeMath.sol"; +// ---------------------------------------------------------------------------- +// 'DECA' DEcentralized CArbon tokens - ITDE (initial token distribution event) +// +// Deployed to : ------ +// Network : Ropsten +// Symbol : DECA +// Name : DEcentralized CArbon tokens +// Total supply: Gazillion +// Decimals : 18 +// +// Designed and wrote by D. Perez Negron A.K.A p1r0 +// Test and Migrations to truffle by vitaliykuzmich +// ---------------------------------------------------------------------------- +/** + * @dev The reason using this instead of openzeppelin, because owner are not 'payable' + */ +contract Ownable is Context { + address payable private _owner; + using SafeMath for uint256; + string public _CCDBAddress; + + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor () internal { + _owner = _msgSender(); + emit OwnershipTransferred(address(0), _owner); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view returns (address payable) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(isOwner(), "Ownable: caller is not the owner"); + _; + } + + /** + * @dev Returns true if the caller is the current owner. + */ + function isOwner() public view returns (bool) { + return _msgSender() == _owner; + } + + /** + * @dev 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. + */ + function renounceOwnership() public onlyOwner { + emit OwnershipTransferred(_owner, address(0)); + _owner = address(0); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address payable newOwner) public onlyOwner { + _transferOwnership(newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + */ + function _transferOwnership(address payable newOwner) internal { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + emit OwnershipTransferred(_owner, newOwner); + _owner = newOwner; + } + + /** + *Function that updates the official orbitDB address for carbon credits. + *Can Only be updated by the current owner + */ + function updateCCDBAddress(string memory newCCDBAddress) public onlyOwner { + _CCDBAddress = newCCDBAddress; + } +} + +// ---------------------------------------------------------------------------- +// ERC20 Token, with the addition of symbol, name and decimals and assisted +// token transfers +// ---------------------------------------------------------------------------- +contract DECA is ERC20, Ownable { + using SafeMath for uint256; + string constant public symbol = "DECA"; + string constant public name = "DEcentralized CArbon tokens"; + uint8 constant public decimals = 18; + //for testing change weeks for hours... + uint public preICOEnds = now + 1 weeks; + uint public bonus1Ends = now + 3 weeks; + uint public bonus2Ends = now + 6 weeks; + uint public endDate = now + 11 weeks; + bool private _pause = false; + + modifier notPaused() { + require(!_pause, "crowdsale on pause"); + _; + } + function getPause() view public returns (bool){ + return _pause; + } + + function setPause(bool p) external onlyOwner { + _pause = p; + } + // ------------------------------------------------------------------------ + // 100 DECA Tokens per 1 ETH + // ------------------------------------------------------------------------ + function() notPaused external payable { + require(now <= endDate); + uint tokens; + uint toOwner; + uint toSender; + uint divBy; + + divBy = 40; + //2.5% extra printed to be 2% of the marketcap, please see README.md + if (now <= preICOEnds) { + tokens = msg.value * 300; + } else if (now > preICOEnds && now <= bonus1Ends) { + tokens = msg.value * 275; + } else if (now > bonus1Ends && now <= bonus2Ends) { + tokens = msg.value * 250; + } else { + tokens = msg.value * 225; + } + + toOwner = tokens.div(divBy); + //created 2.5% extra to the contract owner to approach 2% total marketcap + toSender = tokens; + //tokens that goes to the sender + + _mint(owner(), toOwner); + _mint(msg.sender, toSender); + } + + //Close down the ICO and claim the Ether. + function getETH() public onlyOwner { + require(now >= endDate); + // transfer the ETH balance in the contract to the owner + owner().transfer(address(this).balance); + } + + // ------------------------------------------------------------------------ + // Owner can transfer out any accidentally sent ERC20 tokens + // ------------------------------------------------------------------------ + function transferAnyERC20Token(address payable tokenAddress, uint tokens) public onlyOwner returns (bool success) { + return IERC20(tokenAddress).transfer(owner(), tokens); + } +} diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol new file mode 100644 index 0000000..3897851 --- /dev/null +++ b/contracts/Migrations.sol @@ -0,0 +1,24 @@ +pragma solidity 0.5.12; +//pragma solidity 0.5.16; + +contract Migrations { + address public owner; + uint public last_completed_migration; + + constructor() public { + owner = msg.sender; + } + + modifier restricted() { + if (msg.sender == owner) _; + } + + function setCompleted(uint completed) public restricted { + last_completed_migration = completed; + } + + function upgrade(address new_address) public restricted { + Migrations upgraded = Migrations(new_address); + upgraded.setCompleted(last_completed_migration); + } +} diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js new file mode 100644 index 0000000..7391aa0 --- /dev/null +++ b/migrations/1_initial_migration.js @@ -0,0 +1,6 @@ +const Migrations = artifacts.require("Migrations"); + +module.exports = function (deployer) { + deployer.deploy(Migrations); +}; + diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js new file mode 100644 index 0000000..d590486 --- /dev/null +++ b/migrations/2_deploy_contracts.js @@ -0,0 +1,8 @@ +const DECA = artifacts.require("DECA"); +module.exports = function (deployer) { + module.exports = function (deployer) { + deployer.deploy(DECA, { + gas: 6712390 + }); + }; +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..e8f932e --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "carbon-token", + "version": "1.2.0", + "description": "", + "main": "truffle-config.js", + "directories": { + "test": "test" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@openzeppelin/contracts": "^2.4.0", + "truffle": "^5.1.3" + }, + "devDependencies": { + "web3": "^1.2.4" + } +} + diff --git a/run-rpc.sh b/run-rpc.sh new file mode 100755 index 0000000..a20a02f --- /dev/null +++ b/run-rpc.sh @@ -0,0 +1,81 @@ +#!/bin/bash + + # We define 10 accounts with balance 1M ether, needed for high-value tests. + accounts=( + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501200,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501201,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501202,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501203,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501204,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501205,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501206,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501207,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501208,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501209,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501210,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501211,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501212,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501213,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501214,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501215,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501216,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501217,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501218,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501219,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501220,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501221,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501222,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501223,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501224,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501225,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501226,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501227,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501228,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501229,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501230,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501231,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501232,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501233,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501234,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501235,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501236,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501237,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501238,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501239,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501230,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501240,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501241,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501242,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501243,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501244,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501245,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501246,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501247,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501248,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501249,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501250,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501251,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501252,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501253,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501254,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501255,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501256,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501257,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501258,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501259,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501350,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501351,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501352,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501353,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501354,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501355,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501356,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501357,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501358,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501359,999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999" + ) + +/usr/local/bin/ganache-cli "${accounts[@]}" --gasPrice 1 + + + diff --git a/test/DECA.js b/test/DECA.js new file mode 100644 index 0000000..ec37d50 --- /dev/null +++ b/test/DECA.js @@ -0,0 +1,265 @@ +const DECA = artifacts.require('./DECA.sol') + +// fix legacy web3 bugs +web3.toAsciiOriginal = web3.toAscii; +web3.toAscii = function (input) { + return web3.toAsciiOriginal(input).replace(/\u0000/g, '') +} + +let accCounter = 0; + +function increaseTime(duration) { + const id = Date.now() + + return new Promise((resolve, reject) => { + web3.currentProvider.send({ + jsonrpc: '2.0', + method: 'evm_increaseTime', + params: [duration], + id: id, + }, err1 => { + if (err1) return reject(err1) + + web3.currentProvider.send({ + jsonrpc: '2.0', + method: 'evm_mine', + id: id + 1, + }, (err2, res) => { + return err2 ? reject(err2) : resolve(res) + }) + }) + }) +} + +function latestTime() { + return web3.eth.getBlock('latest').timestamp; +} + +//bypass testrpc bug +async function getHighBalance() { + var accounts = await web3.eth.getAccounts(); + var acc = accounts[accCounter]; + console.dir(acc) + var b = await web3.eth.getBalance(acc); + + console.dir(b) + let high = { + "address": acc, + "balance": b + } + accCounter++; + + return high; +} + +const duration = { + seconds: function (val) { + return val + }, + minutes: function (val) { + return val * this.seconds(60) + }, + hours: function (val) { + return val * this.minutes(60) + }, + days: function (val) { + return val * this.hours(24) + }, + weeks: function (val) { + return val * this.days(7) + }, + years: function (val) { + return val * this.days(365) + } +}; + + +contract('DECA', function (accs) { + beforeEach(async function () { + this.creator = await getHighBalance(); + + this.deca = await DECA.new({ + from: this.creator.address, + gas: 6712390 + }) + + }), + describe('check pause', function () { + it('should get/set pause', async function () { + let p = await this.deca.getPause.call(); + assert.equal(false, p, "pause should be disabled") + await this.deca.setPause(true, {from: this.creator.address, gas: 6712390}) + p = await this.deca.getPause.call(); + assert.equal(true, p, "pause should be enabled") + }) + it('should fail on pay', async function () { + await this.deca.setPause(true, {from: this.creator.address, gas: 6712390}) + let wasErr = false; + try { + let rs = await web3.eth.sendTransaction({ + from: this.creator.address, + to: this.deca.address, + value: 225, + gas: 6712390 + }); + } catch (err) { + wasErr = true; + } + await this.deca.setPause(false, {from: this.creator.address, gas: 6712390}) + + wasErr = false; + try { + let rs = await web3.eth.sendTransaction({ + from: this.creator.address, + to: this.deca.address, + value: 225, + gas: 6712390 + }); + } catch (err) { + wasErr = true; + } + assert.equal(false, wasErr, "pause should work") + }) + it('check intruder pause', async function () { + var sender = await getHighBalance(); + await increaseTime(duration.days(1)) + await web3.eth.sendTransaction({ + from: sender.address, + to: this.deca.address, + value: 1, + gas: 6712390 + }); + let wasErr = false; + try { + await this.deca.setPause(true, {from: sender.address, gas: 6712390}) + } catch (err) { + wasErr = true; + } + assert.equal(true, wasErr, "only owner could pause") + let own = await this.deca.owner(); + assert.equal(this.creator.address, own, "owner does not match") + }) + + }) + + describe('check crowdsale dates', function () { + it('check preICOEnds', async function () { + var sender = await getHighBalance(); + await increaseTime(duration.days(1)) + await web3.eth.sendTransaction({ + from: sender.address, + to: this.deca.address, + value: 1, + gas: 6712390 + }); + let bonus2Ends = await this.deca.balanceOf.call(sender.address) + + assert.equal(bonus2Ends.toString(10), '300', "preICOEnds wrong token balance") + }) + it('check bonus1Ends', async function () { + var sender = await getHighBalance(); + await increaseTime(duration.days(7) + duration.hours(1)) + await web3.eth.sendTransaction({ + from: sender.address, + to: this.deca.address, + value: 1, + gas: 6712390 + }); + let bonus2Ends = await this.deca.balanceOf.call(sender.address) + + assert.equal(bonus2Ends.toString(10), '275', "bonus1Ends wrong token balance") + }) + it('check bonus2Ends', async function () { + var sender = await getHighBalance(); + await increaseTime(duration.weeks(3) + duration.hours(1)) + await web3.eth.sendTransaction({ + from: sender.address, + to: this.deca.address, + value: 1, + gas: 6712390 + }); + let bonus2Ends = await this.deca.balanceOf.call(sender.address) + + assert.equal(bonus2Ends.toString(10), '250', "bonus2Ends wrong token balance") + }) + it('check endDate', async function () { + await increaseTime(duration.weeks(11) + duration.hours(1)) + + let wasErr = false; + try { + let rs = await web3.eth.sendTransaction({ + from: this.creator.address, + to: this.deca.address, + value: 225, + gas: 6712390 + }); + } catch (err) { + wasErr = true; + } + + assert.equal(true, wasErr, "crowdsale should be stopped") + }) + + }) + describe('transferAnyERC20Token', async function () { + it('check transfer from external', async function () { + + var sender = await getHighBalance(); + await web3.eth.sendTransaction({ + from: sender.address, + to: this.deca.address, + value: 1, + gas: 6712390 + }); + let decaBalance = await this.deca.balanceOf.call(this.deca.address) + await this.deca.transfer(this.deca.address, 10, {from: sender.address, gas: 6712390}) + decaBalance = await this.deca.balanceOf.call(this.deca.address) + assert.equal(decaBalance.toString(10), '10', " contract should have balance") + + let wasErr = false; + try { + let ok = await this.deca.transferAnyERC20Token(this.deca.address, 10, { + from: this.creator.address, + gas: 6712390 + }) + assert.equal(true, ok, "transferAnyERC20Token should return positive result") + } catch (err) { + console.dir(err) + wasErr = true; + } + + assert.equal(true, wasErr, "transferAnyERC20Token should proces without error") + }) + }) +// SOMEHOW THIS FUNCTIONS TEST WORKED IN ROPSTEN +// describe('check payout', async function () { +// it.only('check getETH', async function () { +// let decaBalance = await web3.eth.getBalance(this.deca.address); +// assert.equal(decaBalance.toString(10), '0', " wrong contract balance") +// var sender = await getHighBalance(); +// await web3.eth.sendTransaction({ +// from: sender.address, +// to: this.deca.address, +// value: 1000, +// gas: 6712390 +// }); +// decaBalance = await web3.eth.getBalance(this.deca.address); +// assert.equal(decaBalance.toString(10), '1000', " wrong contract balance") +// let senderTokenBalance = await this.deca.balanceOf.call(sender.address) +// assert.equal(senderTokenBalance.toString(10), '200000', " wrong sender balance") +// await increaseTime(duration.weeks(12)); +// let wasErr = false; +// try { +// await this.deca.getETH({from: this.creator.address, gas: 6712390}) +// } catch (err) { +// console.dir(err) +// wasErr = true; +// } +// assert.equal(false, wasErr, "getETH not possible to test because of bug in truffle, check status of bug: https://github.com/trufflesuite/truffle/issues/2811") +// decaBalance = await web3.eth.getBalance(this.deca.address); +// assert.equal(decaBalance.toString(10), '0', " balance of the DECA expected to be empty") +// +// +// }) +// }) +}) diff --git a/truffle.js b/truffle.js new file mode 100644 index 0000000..0e0530d --- /dev/null +++ b/truffle.js @@ -0,0 +1,16 @@ +module.exports = { + networks: { + development: { + host: "localhost", + port: 8545, + network_id: "*", + gas: 6712390 + }, + ropsten: { + network_id: 3, + host: "localhost", + port: 8545, + gas: 2900000 + } + } +}; diff --git a/uml/diagram.png b/uml/diagram.png new file mode 100644 index 0000000..2849454 Binary files /dev/null and b/uml/diagram.png differ