cic-internal-integration/apps/cic-eth/tests/testdata/bancor/TokenHolder.json

1293 lines
60 KiB
JSON

{
"contractName": "TokenHolder",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_prevOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "OwnerUpdate",
"type": "event"
},
{
"inputs": [],
"name": "acceptOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "newOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC20Token",
"name": "_token",
"type": "address"
},
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "withdrawTokens",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"We consider every contract to be a 'token holder' since it's currently not possible for a contract to deny receiving tokens. The TokenHolder's contract sole purpose is to provide a safety mechanism that allows the owner to send tokens that were sent to the contract by mistake back to their sender. Note that we use the non standard ERC-20 interface which has no return value for transfer in order to support both non standard as well as standard token contracts. see https://github.com/ethereum/solidity/issues/4116\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the contract and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":\"TokenHolder\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905561050d806100326000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80635e35359e1461005c57806379ba5097146100945780638da5cb5b1461009c578063d4ee1d90146100c0578063f2fde38b146100c8575b600080fd5b6100926004803603606081101561007257600080fd5b506001600160a01b038135811691602081013590911690604001356100ee565b005b610092610127565b6100a46101de565b604080516001600160a01b039092168252519081900360200190f35b6100a46101ed565b610092600480360360208110156100de57600080fd5b50356001600160a01b03166101fc565b6100f661027a565b82610100816102cf565b8261010a816102cf565b8361011481610323565b61011f868686610377565b505050505050565b6001546001600160a01b0316331461017a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6001546001600160a01b031681565b61020461027a565b6000546001600160a01b0382811691161415610258576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146102cd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b038116610320576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415610320576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106103f45780518252601f1990920191602091820191016103d5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610456576040519150601f19603f3d011682016040523d82523d6000602084013e61045b565b606091505b5091509150818015610489575080511580610489575080806020019051602081101561048657600080fd5b50515b6104d0576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505050505056fea2646970667358221220f7416415e0c8fb660caa2dddf34ea5232522a81a698089d61182fbcd82d0782f64736f6c634300060c0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c80635e35359e1461005c57806379ba5097146100945780638da5cb5b1461009c578063d4ee1d90146100c0578063f2fde38b146100c8575b600080fd5b6100926004803603606081101561007257600080fd5b506001600160a01b038135811691602081013590911690604001356100ee565b005b610092610127565b6100a46101de565b604080516001600160a01b039092168252519081900360200190f35b6100a46101ed565b610092600480360360208110156100de57600080fd5b50356001600160a01b03166101fc565b6100f661027a565b82610100816102cf565b8261010a816102cf565b8361011481610323565b61011f868686610377565b505050505050565b6001546001600160a01b0316331461017a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6001546001600160a01b031681565b61020461027a565b6000546001600160a01b0382811691161415610258576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146102cd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b038116610320576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415610320576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106103f45780518252601f1990920191602091820191016103d5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610456576040519150601f19603f3d011682016040523d82523d6000602084013e61045b565b606091505b5091509150818015610489575080511580610489575080806020019051602081101561048657600080fd5b50515b6104d0576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505050505056fea2646970667358221220f7416415e0c8fb660caa2dddf34ea5232522a81a698089d61182fbcd82d0782f64736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "819:670:62:-:0;;;;;;;;;;;;-1:-1:-1;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;819:670:62;;;;;;",
"deployedSourceMap": "819:670:62:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1196:290;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1196:290:62;;;;;;;;;;;;;;;;;:::i;:::-;;1422:217:57;;;:::i;219:29::-;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:57;;;;;;;;;;;;;;255:23;;;:::i;1164:167::-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;1196:290:62:-;726:12:57;:10;:12::i;:::-;1370:6:62::1;594:23:64;608:8;594:13;:23::i;:::-;1401:3:62::2;594:23:64;608:8;594:13;:23::i;:::-;1423:3:62::3;948:18:64;957:8;948;:18::i;:::-;1444:34:62::4;1457:6;1465:3;1470:7;1444:12;:34::i;:::-;628:1:64::3;::::2;749::57::1;1196:290:62::0;;;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;219:29::-;;;-1:-1:-1;;;;;219:29:57;;:::o;255:23::-;;;-1:-1:-1;;;;;255:23:57;;:::o;1164:167::-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;1041:126::-;-1:-1:-1;;;;;1110:25:64;;1130:4;1110:25;;1102:57;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;;;1485:312:61;1631:59;;;-1:-1:-1;;;;;1631:59:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:61;-1:-1:-1;;;1631:59:61;;;1610:81;;;;1575:12;;1589:17;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:61;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:61;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;;;;1485:312;;;;;:::o",
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./Owned.sol\";\r\nimport \"./Utils.sol\";\r\nimport \"./TokenHandler.sol\";\r\nimport \"./interfaces/ITokenHolder.sol\";\r\nimport \"../token/interfaces/IERC20Token.sol\";\r\n\r\n/**\r\n * @dev We consider every contract to be a 'token holder' since it's currently not possible\r\n * for a contract to deny receiving tokens.\r\n *\r\n * The TokenHolder's contract sole purpose is to provide a safety mechanism that allows\r\n * the owner to send tokens that were sent to the contract by mistake back to their sender.\r\n *\r\n * Note that we use the non standard ERC-20 interface which has no return value for transfer\r\n * in order to support both non standard as well as standard token contracts.\r\n * see https://github.com/ethereum/solidity/issues/4116\r\n*/\r\ncontract TokenHolder is ITokenHolder, TokenHandler, Owned, Utils {\r\n /**\r\n * @dev withdraws tokens held by the contract and sends them to an account\r\n * can only be called by the owner\r\n *\r\n * @param _token ERC20 token contract address\r\n * @param _to account to receive the new amount\r\n * @param _amount amount to withdraw\r\n */\r\n function withdrawTokens(IERC20Token _token, address _to, uint256 _amount)\r\n public\r\n virtual\r\n override\r\n ownerOnly\r\n validAddress(address(_token))\r\n validAddress(_to)\r\n notThis(_to)\r\n {\r\n safeTransfer(_token, _to, _amount);\r\n }\r\n}\r\n",
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol",
"ast": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol",
"exportedSymbols": {
"TokenHolder": [
22575
]
},
"id": 22576,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 22528,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:62"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol",
"file": "./Owned.sol",
"id": 22529,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 21819,
"src": "77:21:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol",
"file": "./Utils.sol",
"id": 22530,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 22662,
"src": "100:21:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol",
"file": "./TokenHandler.sol",
"id": 22531,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 22527,
"src": "123:28:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol",
"file": "./interfaces/ITokenHolder.sol",
"id": 22532,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 22908,
"src": "153:39:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
"file": "../token/interfaces/IERC20Token.sol",
"id": 22533,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 21128,
"src": "194:45:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22535,
"name": "ITokenHolder",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22907,
"src": "843:12:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ITokenHolder_$22907",
"typeString": "contract ITokenHolder"
}
},
"id": 22536,
"nodeType": "InheritanceSpecifier",
"src": "843:12:62"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22537,
"name": "TokenHandler",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22526,
"src": "857:12:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TokenHandler_$22526",
"typeString": "contract TokenHandler"
}
},
"id": 22538,
"nodeType": "InheritanceSpecifier",
"src": "857:12:62"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22539,
"name": "Owned",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21818,
"src": "871:5:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Owned_$21818",
"typeString": "contract Owned"
}
},
"id": 22540,
"nodeType": "InheritanceSpecifier",
"src": "871:5:62"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22541,
"name": "Utils",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22661,
"src": "878:5:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Utils_$22661",
"typeString": "contract Utils"
}
},
"id": 22542,
"nodeType": "InheritanceSpecifier",
"src": "878:5:62"
}
],
"contractDependencies": [
21818,
22526,
22661,
22847,
22907
],
"contractKind": "contract",
"documentation": {
"id": 22534,
"nodeType": "StructuredDocumentation",
"src": "243:574:62",
"text": " @dev We consider every contract to be a 'token holder' since it's currently not possible\n for a contract to deny receiving tokens.\n The TokenHolder's contract sole purpose is to provide a safety mechanism that allows\n the owner to send tokens that were sent to the contract by mistake back to their sender.\n Note that we use the non standard ERC-20 interface which has no return value for transfer\n in order to support both non standard as well as standard token contracts.\n see https://github.com/ethereum/solidity/issues/4116"
},
"fullyImplemented": true,
"id": 22575,
"linearizedBaseContracts": [
22575,
22661,
21818,
22526,
22907,
22847
],
"name": "TokenHolder",
"nodeType": "ContractDefinition",
"nodes": [
{
"baseFunctions": [
22906
],
"body": {
"id": 22573,
"nodeType": "Block",
"src": "1433:53:62",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22568,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22545,
"src": "1457:6:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 22569,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22547,
"src": "1465:3:62",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 22570,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22549,
"src": "1470:7:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 22567,
"name": "safeTransfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22475,
"src": "1444:12:62",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (contract IERC20Token,address,uint256)"
}
},
"id": 22571,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1444:34:62",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22572,
"nodeType": "ExpressionStatement",
"src": "1444:34:62"
}
]
},
"documentation": {
"id": 22543,
"nodeType": "StructuredDocumentation",
"src": "891:299:62",
"text": " @dev withdraws tokens held by the contract and sends them to an account\n can only be called by the owner\n @param _token ERC20 token contract address\n @param _to account to receive the new amount\n @param _amount amount to withdraw"
},
"functionSelector": "5e35359e",
"id": 22574,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 22553,
"modifierName": {
"argumentTypes": null,
"id": 22552,
"name": "ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21754,
"src": "1330:9:62",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1330:9:62"
},
{
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22557,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22545,
"src": "1370:6:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
],
"id": 22556,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1362:7:62",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 22555,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1362:7:62",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 22558,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1362:15:62",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 22559,
"modifierName": {
"argumentTypes": null,
"id": 22554,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22618,
"src": "1349:12:62",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "1349:29:62"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 22561,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22547,
"src": "1401:3:62",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 22562,
"modifierName": {
"argumentTypes": null,
"id": 22560,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22618,
"src": "1388:12:62",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "1388:17:62"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 22564,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22547,
"src": "1423:3:62",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 22565,
"modifierName": {
"argumentTypes": null,
"id": 22563,
"name": "notThis",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22644,
"src": "1415:7:62",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "1415:12:62"
}
],
"name": "withdrawTokens",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 22551,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1312:8:62"
},
"parameters": {
"id": 22550,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22545,
"mutability": "mutable",
"name": "_token",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22574,
"src": "1220:18:62",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 22544,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "1220:11:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 22547,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22574,
"src": "1240:11:62",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22546,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1240:7:62",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 22549,
"mutability": "mutable",
"name": "_amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22574,
"src": "1253:15:62",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 22548,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1253:7:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1219:50:62"
},
"returnParameters": {
"id": 22566,
"nodeType": "ParameterList",
"parameters": [],
"src": "1433:0:62"
},
"scope": 22575,
"src": "1196:290:62",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 22576,
"src": "819:670:62"
}
],
"src": "52:1439:62"
},
"legacyAST": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol",
"exportedSymbols": {
"TokenHolder": [
22575
]
},
"id": 22576,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 22528,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:62"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol",
"file": "./Owned.sol",
"id": 22529,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 21819,
"src": "77:21:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol",
"file": "./Utils.sol",
"id": 22530,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 22662,
"src": "100:21:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol",
"file": "./TokenHandler.sol",
"id": 22531,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 22527,
"src": "123:28:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol",
"file": "./interfaces/ITokenHolder.sol",
"id": 22532,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 22908,
"src": "153:39:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
"file": "../token/interfaces/IERC20Token.sol",
"id": 22533,
"nodeType": "ImportDirective",
"scope": 22576,
"sourceUnit": 21128,
"src": "194:45:62",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22535,
"name": "ITokenHolder",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22907,
"src": "843:12:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ITokenHolder_$22907",
"typeString": "contract ITokenHolder"
}
},
"id": 22536,
"nodeType": "InheritanceSpecifier",
"src": "843:12:62"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22537,
"name": "TokenHandler",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22526,
"src": "857:12:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TokenHandler_$22526",
"typeString": "contract TokenHandler"
}
},
"id": 22538,
"nodeType": "InheritanceSpecifier",
"src": "857:12:62"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22539,
"name": "Owned",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21818,
"src": "871:5:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Owned_$21818",
"typeString": "contract Owned"
}
},
"id": 22540,
"nodeType": "InheritanceSpecifier",
"src": "871:5:62"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22541,
"name": "Utils",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22661,
"src": "878:5:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Utils_$22661",
"typeString": "contract Utils"
}
},
"id": 22542,
"nodeType": "InheritanceSpecifier",
"src": "878:5:62"
}
],
"contractDependencies": [
21818,
22526,
22661,
22847,
22907
],
"contractKind": "contract",
"documentation": {
"id": 22534,
"nodeType": "StructuredDocumentation",
"src": "243:574:62",
"text": " @dev We consider every contract to be a 'token holder' since it's currently not possible\n for a contract to deny receiving tokens.\n The TokenHolder's contract sole purpose is to provide a safety mechanism that allows\n the owner to send tokens that were sent to the contract by mistake back to their sender.\n Note that we use the non standard ERC-20 interface which has no return value for transfer\n in order to support both non standard as well as standard token contracts.\n see https://github.com/ethereum/solidity/issues/4116"
},
"fullyImplemented": true,
"id": 22575,
"linearizedBaseContracts": [
22575,
22661,
21818,
22526,
22907,
22847
],
"name": "TokenHolder",
"nodeType": "ContractDefinition",
"nodes": [
{
"baseFunctions": [
22906
],
"body": {
"id": 22573,
"nodeType": "Block",
"src": "1433:53:62",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22568,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22545,
"src": "1457:6:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 22569,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22547,
"src": "1465:3:62",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 22570,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22549,
"src": "1470:7:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 22567,
"name": "safeTransfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22475,
"src": "1444:12:62",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (contract IERC20Token,address,uint256)"
}
},
"id": 22571,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1444:34:62",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22572,
"nodeType": "ExpressionStatement",
"src": "1444:34:62"
}
]
},
"documentation": {
"id": 22543,
"nodeType": "StructuredDocumentation",
"src": "891:299:62",
"text": " @dev withdraws tokens held by the contract and sends them to an account\n can only be called by the owner\n @param _token ERC20 token contract address\n @param _to account to receive the new amount\n @param _amount amount to withdraw"
},
"functionSelector": "5e35359e",
"id": 22574,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 22553,
"modifierName": {
"argumentTypes": null,
"id": 22552,
"name": "ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21754,
"src": "1330:9:62",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1330:9:62"
},
{
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22557,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22545,
"src": "1370:6:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
],
"id": 22556,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1362:7:62",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 22555,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1362:7:62",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 22558,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1362:15:62",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 22559,
"modifierName": {
"argumentTypes": null,
"id": 22554,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22618,
"src": "1349:12:62",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "1349:29:62"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 22561,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22547,
"src": "1401:3:62",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 22562,
"modifierName": {
"argumentTypes": null,
"id": 22560,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22618,
"src": "1388:12:62",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "1388:17:62"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 22564,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22547,
"src": "1423:3:62",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 22565,
"modifierName": {
"argumentTypes": null,
"id": 22563,
"name": "notThis",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22644,
"src": "1415:7:62",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "1415:12:62"
}
],
"name": "withdrawTokens",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 22551,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1312:8:62"
},
"parameters": {
"id": 22550,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22545,
"mutability": "mutable",
"name": "_token",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22574,
"src": "1220:18:62",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 22544,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "1220:11:62",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 22547,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22574,
"src": "1240:11:62",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22546,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1240:7:62",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 22549,
"mutability": "mutable",
"name": "_amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22574,
"src": "1253:15:62",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 22548,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1253:7:62",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1219:50:62"
},
"returnParameters": {
"id": 22566,
"nodeType": "ParameterList",
"parameters": [],
"src": "1433:0:62"
},
"scope": 22575,
"src": "1196:290:62",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 22576,
"src": "819:670:62"
}
],
"src": "52:1439:62"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.3",
"updatedAt": "2020-10-20T08:24:47.847Z",
"devdoc": {
"details": "We consider every contract to be a 'token holder' since it's currently not possible for a contract to deny receiving tokens. The TokenHolder's contract sole purpose is to provide a safety mechanism that allows the owner to send tokens that were sent to the contract by mistake back to their sender. Note that we use the non standard ERC-20 interface which has no return value for transfer in order to support both non standard as well as standard token contracts. see https://github.com/ethereum/solidity/issues/4116",
"kind": "dev",
"methods": {
"acceptOwnership()": {
"details": "used by a new owner to accept an ownership transfer"
},
"transferOwnership(address)": {
"details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner",
"params": {
"_newOwner": "new contract owner"
}
},
"withdrawTokens(address,address,uint256)": {
"details": "withdraws tokens held by the contract and sends them to an account can only be called by the owner",
"params": {
"_amount": "amount to withdraw",
"_to": "account to receive the new amount",
"_token": "ERC20 token contract address"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}