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

3640 lines
152 KiB
JSON

{
"contractName": "Whitelist",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "AddressAddition",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "AddressRemoval",
"type": "event"
},
{
"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": "address",
"name": "_address",
"type": "address"
}
],
"name": "isWhitelisted",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "addAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "_addresses",
"type": "address[]"
}
],
"name": "addAddresses",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "removeAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "_addresses",
"type": "address[]"
}
],
"name": "removeAddresses",
"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\":\"_address\",\"type\":\"address\"}],\"name\":\"AddressAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"AddressRemoval\",\"type\":\"event\"},{\"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\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"addAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"}],\"name\":\"addAddresses\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isWhitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"_address\",\"type\":\"address\"}],\"name\":\"removeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"}],\"name\":\"removeAddresses\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The contract manages a list of whitelisted addresses\",\"events\":{\"AddressAddition(address)\":{\"details\":\"triggered when an address is added to the whitelist\",\"params\":{\"_address\":\"address that's added from the whitelist\"}},\"AddressRemoval(address)\":{\"details\":\"triggered when an address is removed from the whitelist\",\"params\":{\"_address\":\"address that's removed from the whitelist\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"addAddress(address)\":{\"details\":\"adds a given address to the whitelist\",\"params\":{\"_address\":\"address to add\"}},\"addAddresses(address[])\":{\"details\":\"adds a list of addresses to the whitelist\",\"params\":{\"_addresses\":\"addresses to add\"}},\"isWhitelisted(address)\":{\"details\":\"returns true if a given address is whitelisted, false if not\",\"params\":{\"_address\":\"address to check\"},\"returns\":{\"_0\":\"true if the address is whitelisted, false if not\"}},\"removeAddress(address)\":{\"details\":\"removes a given address from the whitelist\",\"params\":{\"_address\":\"address to remove\"}},\"removeAddresses(address[])\":{\"details\":\"removes a list of addresses from the whitelist\",\"params\":{\"_addresses\":\"addresses to remove\"}},\"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\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Whitelist.sol\":\"Whitelist\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/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/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/Whitelist.sol\":{\"keccak256\":\"0xba07ed618d7d1da7540eaff62c062b9b5b926eb55868d618cb5e2b6f983247a7\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e7bff23c1d0c7965466d2dca4d3deadae7aea58cc4ac0ddcb9f5cd818d1b74ba\",\"dweb:/ipfs/QmQ4gX1jhoRs4ZmBf4Sn3BqL9LZjewpTPhSPMGjZzuqouy\"]},\"/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/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905561066d806100326000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806379ba50971161006657806379ba5097146101c35780638da5cb5b146101cb578063a84eb999146101ef578063d4ee1d9014610292578063f2fde38b1461029a57610093565b80633628731c1461009857806338eada1c1461013d5780633af32abf146101635780634ba79dfe1461019d575b600080fd5b61013b600480360360208110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460208302840111640100000000831117156100fd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506102c0945050505050565b005b61013b6004803603602081101561015357600080fd5b50356001600160a01b03166102f4565b6101896004803603602081101561017957600080fd5b50356001600160a01b0316610379565b604080519115158252519081900360200190f35b61013b600480360360208110156101b357600080fd5b50356001600160a01b0316610397565b61013b61040e565b6101d36104c5565b604080516001600160a01b039092168252519081900360200190f35b61013b6004803603602081101561020557600080fd5b81019060208101813564010000000081111561022057600080fd5b82018360208201111561023257600080fd5b8035906020019184602083028401116401000000008311171561025457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104d4945050505050565b6101d3610504565b61013b600480360360208110156102b057600080fd5b50356001600160a01b0316610513565b60005b81518110156102f0576102e88282815181106102db57fe5b60200260200101516102f4565b6001016102c3565b5050565b6102fc610591565b80610306816105e6565b6001600160a01b03821660009081526002602052604090205460ff161561032c576102f0565b6001600160a01b038216600081815260026020526040808220805460ff19166001179055517f2c51f80053e9ee7518567e43b2f8e8b48f50cf10daede6d11893df9ad49e4a8a9190a25050565b6001600160a01b031660009081526002602052604090205460ff1690565b61039f610591565b6001600160a01b03811660009081526002602052604090205460ff166103c45761040b565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f7ec2df28665f8610f9b1d2f74faae35dbc6bd58684a1194a6dfc31584953f03b9190a25b50565b6001546001600160a01b03163314610461576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b60005b81518110156102f0576104fc8282815181106104ef57fe5b6020026020010151610397565b6001016104d7565b6001546001600160a01b031681565b61051b610591565b6000546001600160a01b038281169116141561056f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105e4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b03811661040b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fdfea2646970667358221220b0845cd6fb1ceffdba4a24a7fc8e6e80553d4243de97e809d5076294dccef79264736f6c634300060c0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806379ba50971161006657806379ba5097146101c35780638da5cb5b146101cb578063a84eb999146101ef578063d4ee1d9014610292578063f2fde38b1461029a57610093565b80633628731c1461009857806338eada1c1461013d5780633af32abf146101635780634ba79dfe1461019d575b600080fd5b61013b600480360360208110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460208302840111640100000000831117156100fd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506102c0945050505050565b005b61013b6004803603602081101561015357600080fd5b50356001600160a01b03166102f4565b6101896004803603602081101561017957600080fd5b50356001600160a01b0316610379565b604080519115158252519081900360200190f35b61013b600480360360208110156101b357600080fd5b50356001600160a01b0316610397565b61013b61040e565b6101d36104c5565b604080516001600160a01b039092168252519081900360200190f35b61013b6004803603602081101561020557600080fd5b81019060208101813564010000000081111561022057600080fd5b82018360208201111561023257600080fd5b8035906020019184602083028401116401000000008311171561025457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104d4945050505050565b6101d3610504565b61013b600480360360208110156102b057600080fd5b50356001600160a01b0316610513565b60005b81518110156102f0576102e88282815181106102db57fe5b60200260200101516102f4565b6001016102c3565b5050565b6102fc610591565b80610306816105e6565b6001600160a01b03821660009081526002602052604090205460ff161561032c576102f0565b6001600160a01b038216600081815260026020526040808220805460ff19166001179055517f2c51f80053e9ee7518567e43b2f8e8b48f50cf10daede6d11893df9ad49e4a8a9190a25050565b6001600160a01b031660009081526002602052604090205460ff1690565b61039f610591565b6001600160a01b03811660009081526002602052604090205460ff166103c45761040b565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f7ec2df28665f8610f9b1d2f74faae35dbc6bd58684a1194a6dfc31584953f03b9190a25b50565b6001546001600160a01b03163314610461576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b60005b81518110156102f0576104fc8282815181106104ef57fe5b6020026020010151610397565b6001016104d7565b6001546001600160a01b031681565b61051b610591565b6000546001600160a01b038281169116141561056f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105e4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b03811661040b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fdfea2646970667358221220b0845cd6fb1ceffdba4a24a7fc8e6e80553d4243de97e809d5076294dccef79264736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "236:2326:65:-:0;;;;;;;;;;;;-1:-1:-1;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;236:2326:65;;;;;;",
"deployedSourceMap": "236:2326:65:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1674:176;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1674:176:65;;-1:-1:-1;1674:176:65;;-1:-1:-1;;;;;1674:176:65:i;:::-;;1239:301;;;;;;;;;;;;;;;;-1:-1:-1;1239:301:65;-1:-1:-1;;;;;1239:301:65;;:::i;991:122::-;;;;;;;;;;;;;;;;-1:-1:-1;991:122:65;-1:-1:-1;;;;;991:122:65;;:::i;:::-;;;;;;;;;;;;;;;;;;1984:251;;;;;;;;;;;;;;;;-1:-1:-1;1984:251:65;-1:-1:-1;;;;;1984:251:65;;:::i;1422:217:57:-;;;:::i;219:29::-;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:57;;;;;;;;;;;;;;2377:182:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2377:182:65;;-1:-1:-1;2377:182:65;;-1:-1:-1;;;;;2377:182:65:i;255:23:57:-;;;:::i;1164:167::-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;1674:176:65:-;1748:9;1743:100;1767:10;:17;1763:1;:21;1743:100;;;1806:25;1817:10;1828:1;1817:13;;;;;;;;;;;;;;1806:10;:25::i;:::-;1786:3;;1743:100;;;;1674:176;:::o;1239:301::-;726:12:57;:10;:12::i;:::-;1318:8:65::1;594:23:64;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;1364:19:65;::::2;;::::0;;;:9:::2;:19;::::0;;;;;::::2;;1360:93;;;1446:7;;1360:93;-1:-1:-1::0;;;;;1465:19:65;::::2;;::::0;;;:9:::2;:19;::::0;;;;;:26;;-1:-1:-1;;1465:26:65::2;1487:4;1465:26;::::0;;1507:25;::::2;::::0;1465:19;1507:25:::2;749:1:57::1;1239:301:65::0;:::o;991:122::-;-1:-1:-1;;;;;1086:19:65;1062:4;1086:19;;;:9;:19;;;;;;;;;991:122::o;1984:251::-;726:12:57;:10;:12::i;:::-;-1:-1:-1;;;;;2058:19:65;::::1;;::::0;;;:9:::1;:19;::::0;;;;;::::1;;2053:95;;2141:7;;2053:95;-1:-1:-1::0;;;;;2160:19:65;::::1;2182:5;2160:19:::0;;;:9:::1;:19;::::0;;;;;:27;;-1:-1:-1;;2160:27:65::1;::::0;;2203:24;::::1;::::0;2182:5;2203:24:::1;749:1:57;1984:251:65::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;2377:182:65:-;2454:9;2449:103;2473:10;:17;2469:1;:21;2449:103;;;2512:28;2526:10;2537:1;2526:13;;;;;;;;;;;;;;2512;:28::i;:::-;2492:3;;2449:103;;255:23:57;;;-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;;;;;;;;;;;;;",
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./Owned.sol\";\r\nimport \"./Utils.sol\";\r\nimport \"./interfaces/IWhitelist.sol\";\r\n\r\n/**\r\n * @dev The contract manages a list of whitelisted addresses\r\n*/\r\ncontract Whitelist is IWhitelist, Owned, Utils {\r\n mapping (address => bool) private whitelist;\r\n\r\n /**\r\n * @dev triggered when an address is added to the whitelist\r\n *\r\n * @param _address address that's added from the whitelist\r\n */\r\n event AddressAddition(address indexed _address);\r\n\r\n /**\r\n * @dev triggered when an address is removed from the whitelist\r\n *\r\n * @param _address address that's removed from the whitelist\r\n */\r\n event AddressRemoval(address indexed _address);\r\n\r\n /**\r\n * @dev returns true if a given address is whitelisted, false if not\r\n *\r\n * @param _address address to check\r\n *\r\n * @return true if the address is whitelisted, false if not\r\n */\r\n function isWhitelisted(address _address) public view override returns (bool) {\r\n return whitelist[_address];\r\n }\r\n\r\n /**\r\n * @dev adds a given address to the whitelist\r\n *\r\n * @param _address address to add\r\n */\r\n function addAddress(address _address)\r\n ownerOnly\r\n validAddress(_address)\r\n public\r\n {\r\n if (whitelist[_address]) // checks if the address is already whitelisted\r\n return;\r\n\r\n whitelist[_address] = true;\r\n emit AddressAddition(_address);\r\n }\r\n\r\n /**\r\n * @dev adds a list of addresses to the whitelist\r\n *\r\n * @param _addresses addresses to add\r\n */\r\n function addAddresses(address[] memory _addresses) public {\r\n for (uint256 i = 0; i < _addresses.length; i++) {\r\n addAddress(_addresses[i]);\r\n }\r\n }\r\n\r\n /**\r\n * @dev removes a given address from the whitelist\r\n *\r\n * @param _address address to remove\r\n */\r\n function removeAddress(address _address) ownerOnly public {\r\n if (!whitelist[_address]) // checks if the address is actually whitelisted\r\n return;\r\n\r\n whitelist[_address] = false;\r\n emit AddressRemoval(_address);\r\n }\r\n\r\n /**\r\n * @dev removes a list of addresses from the whitelist\r\n *\r\n * @param _addresses addresses to remove\r\n */\r\n function removeAddresses(address[] memory _addresses) public {\r\n for (uint256 i = 0; i < _addresses.length; i++) {\r\n removeAddress(_addresses[i]);\r\n }\r\n }\r\n}\r\n",
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Whitelist.sol",
"ast": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Whitelist.sol",
"exportedSymbols": {
"Whitelist": [
22808
]
},
"id": 22809,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 22663,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:65"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol",
"file": "./Owned.sol",
"id": 22664,
"nodeType": "ImportDirective",
"scope": 22809,
"sourceUnit": 21819,
"src": "77:21:65",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol",
"file": "./Utils.sol",
"id": 22665,
"nodeType": "ImportDirective",
"scope": 22809,
"sourceUnit": 22662,
"src": "100:21:65",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol",
"file": "./interfaces/IWhitelist.sol",
"id": 22666,
"nodeType": "ImportDirective",
"scope": 22809,
"sourceUnit": 22918,
"src": "123:37:65",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22668,
"name": "IWhitelist",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22917,
"src": "258:10:65",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IWhitelist_$22917",
"typeString": "contract IWhitelist"
}
},
"id": 22669,
"nodeType": "InheritanceSpecifier",
"src": "258:10:65"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22670,
"name": "Owned",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21818,
"src": "270:5:65",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Owned_$21818",
"typeString": "contract Owned"
}
},
"id": 22671,
"nodeType": "InheritanceSpecifier",
"src": "270:5:65"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22672,
"name": "Utils",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22661,
"src": "277:5:65",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Utils_$22661",
"typeString": "contract Utils"
}
},
"id": 22673,
"nodeType": "InheritanceSpecifier",
"src": "277:5:65"
}
],
"contractDependencies": [
21818,
22661,
22847,
22917
],
"contractKind": "contract",
"documentation": {
"id": 22667,
"nodeType": "StructuredDocumentation",
"src": "164:70:65",
"text": " @dev The contract manages a list of whitelisted addresses"
},
"fullyImplemented": true,
"id": 22808,
"linearizedBaseContracts": [
22808,
22661,
21818,
22847,
22917
],
"name": "Whitelist",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 22677,
"mutability": "mutable",
"name": "whitelist",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22808,
"src": "290:43:65",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 22676,
"keyType": {
"id": 22674,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "299:7:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "290:25:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 22675,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "310:4:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "private"
},
{
"anonymous": false,
"documentation": {
"id": 22678,
"nodeType": "StructuredDocumentation",
"src": "342:151:65",
"text": " @dev triggered when an address is added to the whitelist\n @param _address address that's added from the whitelist"
},
"id": 22682,
"name": "AddressAddition",
"nodeType": "EventDefinition",
"parameters": {
"id": 22681,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22680,
"indexed": true,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22682,
"src": "521:24:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22679,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "521:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "520:26:65"
},
"src": "499:48:65"
},
{
"anonymous": false,
"documentation": {
"id": 22683,
"nodeType": "StructuredDocumentation",
"src": "555:157:65",
"text": " @dev triggered when an address is removed from the whitelist\n @param _address address that's removed from the whitelist"
},
"id": 22687,
"name": "AddressRemoval",
"nodeType": "EventDefinition",
"parameters": {
"id": 22686,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22685,
"indexed": true,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22687,
"src": "739:24:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22684,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "739:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "738:26:65"
},
"src": "718:47:65"
},
{
"baseFunctions": [
22916
],
"body": {
"id": 22700,
"nodeType": "Block",
"src": "1068:45:65",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22696,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "1086:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22698,
"indexExpression": {
"argumentTypes": null,
"id": 22697,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22690,
"src": "1096:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1086:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 22695,
"id": 22699,
"nodeType": "Return",
"src": "1079:26:65"
}
]
},
"documentation": {
"id": 22688,
"nodeType": "StructuredDocumentation",
"src": "773:212:65",
"text": " @dev returns true if a given address is whitelisted, false if not\n @param _address address to check\n @return true if the address is whitelisted, false if not"
},
"functionSelector": "3af32abf",
"id": 22701,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isWhitelisted",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 22692,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1044:8:65"
},
"parameters": {
"id": 22691,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22690,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22701,
"src": "1014:16:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22689,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1014:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1013:18:65"
},
"returnParameters": {
"id": 22695,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22694,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22701,
"src": "1062:4:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 22693,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1062:4:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1061:6:65"
},
"scope": 22808,
"src": "991:122:65",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 22727,
"nodeType": "Block",
"src": "1349:191:65",
"statements": [
{
"condition": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22712,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "1364:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22714,
"indexExpression": {
"argumentTypes": null,
"id": 22713,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22704,
"src": "1374:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1364:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 22716,
"nodeType": "IfStatement",
"src": "1360:93:65",
"trueBody": {
"expression": null,
"functionReturnParameters": 22711,
"id": 22715,
"nodeType": "Return",
"src": "1446:7:65"
}
},
{
"expression": {
"argumentTypes": null,
"id": 22721,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22717,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "1465:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22719,
"indexExpression": {
"argumentTypes": null,
"id": 22718,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22704,
"src": "1475:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1465:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 22720,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1487:4:65",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1465:26:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22722,
"nodeType": "ExpressionStatement",
"src": "1465:26:65"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22724,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22704,
"src": "1523:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 22723,
"name": "AddressAddition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22682,
"src": "1507:15:65",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 22725,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1507:25:65",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22726,
"nodeType": "EmitStatement",
"src": "1502:30:65"
}
]
},
"documentation": {
"id": 22702,
"nodeType": "StructuredDocumentation",
"src": "1121:112:65",
"text": " @dev adds a given address to the whitelist\n @param _address address to add"
},
"functionSelector": "38eada1c",
"id": 22728,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 22707,
"modifierName": {
"argumentTypes": null,
"id": 22706,
"name": "ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21754,
"src": "1286:9:65",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1286:9:65"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 22709,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22704,
"src": "1318:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 22710,
"modifierName": {
"argumentTypes": null,
"id": 22708,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22618,
"src": "1305:12:65",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "1305:22:65"
}
],
"name": "addAddress",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22705,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22704,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22728,
"src": "1259:16:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22703,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1259:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1258:18:65"
},
"returnParameters": {
"id": 22711,
"nodeType": "ParameterList",
"parameters": [],
"src": "1349:0:65"
},
"scope": 22808,
"src": "1239:301:65",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 22754,
"nodeType": "Block",
"src": "1732:118:65",
"statements": [
{
"body": {
"id": 22752,
"nodeType": "Block",
"src": "1791:52:65",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22747,
"name": "_addresses",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22732,
"src": "1817:10:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 22749,
"indexExpression": {
"argumentTypes": null,
"id": 22748,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22736,
"src": "1828:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1817:13:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 22746,
"name": "addAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22728,
"src": "1806:10:65",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 22750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1806:25:65",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22751,
"nodeType": "ExpressionStatement",
"src": "1806:25:65"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 22742,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 22739,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22736,
"src": "1763:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 22740,
"name": "_addresses",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22732,
"src": "1767:10:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 22741,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1767:17:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1763:21:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22753,
"initializationExpression": {
"assignments": [
22736
],
"declarations": [
{
"constant": false,
"id": 22736,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22753,
"src": "1748:9:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 22735,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1748:7:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 22738,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 22737,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1760:1:65",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1748:13:65"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 22744,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1786:3:65",
"subExpression": {
"argumentTypes": null,
"id": 22743,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22736,
"src": "1786:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 22745,
"nodeType": "ExpressionStatement",
"src": "1786:3:65"
},
"nodeType": "ForStatement",
"src": "1743:100:65"
}
]
},
"documentation": {
"id": 22729,
"nodeType": "StructuredDocumentation",
"src": "1548:120:65",
"text": " @dev adds a list of addresses to the whitelist\n @param _addresses addresses to add"
},
"functionSelector": "3628731c",
"id": 22755,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "addAddresses",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22733,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22732,
"mutability": "mutable",
"name": "_addresses",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22755,
"src": "1696:27:65",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 22730,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1696:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 22731,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1696:9:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1695:29:65"
},
"returnParameters": {
"id": 22734,
"nodeType": "ParameterList",
"parameters": [],
"src": "1732:0:65"
},
"scope": 22808,
"src": "1674:176:65",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 22779,
"nodeType": "Block",
"src": "2042:193:65",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 22766,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2057:20:65",
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22763,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "2058:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22765,
"indexExpression": {
"argumentTypes": null,
"id": 22764,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22758,
"src": "2068:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2058:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 22768,
"nodeType": "IfStatement",
"src": "2053:95:65",
"trueBody": {
"expression": null,
"functionReturnParameters": 22762,
"id": 22767,
"nodeType": "Return",
"src": "2141:7:65"
}
},
{
"expression": {
"argumentTypes": null,
"id": 22773,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22769,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "2160:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22771,
"indexExpression": {
"argumentTypes": null,
"id": 22770,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22758,
"src": "2170:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2160:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 22772,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2182:5:65",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "2160:27:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22774,
"nodeType": "ExpressionStatement",
"src": "2160:27:65"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22776,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22758,
"src": "2218:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 22775,
"name": "AddressRemoval",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22687,
"src": "2203:14:65",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 22777,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2203:24:65",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22778,
"nodeType": "EmitStatement",
"src": "2198:29:65"
}
]
},
"documentation": {
"id": 22756,
"nodeType": "StructuredDocumentation",
"src": "1858:120:65",
"text": " @dev removes a given address from the whitelist\n @param _address address to remove"
},
"functionSelector": "4ba79dfe",
"id": 22780,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 22761,
"modifierName": {
"argumentTypes": null,
"id": 22760,
"name": "ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21754,
"src": "2025:9:65",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2025:9:65"
}
],
"name": "removeAddress",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22759,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22758,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22780,
"src": "2007:16:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22757,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2007:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2006:18:65"
},
"returnParameters": {
"id": 22762,
"nodeType": "ParameterList",
"parameters": [],
"src": "2042:0:65"
},
"scope": 22808,
"src": "1984:251:65",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 22806,
"nodeType": "Block",
"src": "2438:121:65",
"statements": [
{
"body": {
"id": 22804,
"nodeType": "Block",
"src": "2497:55:65",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22799,
"name": "_addresses",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22784,
"src": "2526:10:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 22801,
"indexExpression": {
"argumentTypes": null,
"id": 22800,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22788,
"src": "2537:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2526:13:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 22798,
"name": "removeAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22780,
"src": "2512:13:65",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 22802,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2512:28:65",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22803,
"nodeType": "ExpressionStatement",
"src": "2512:28:65"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 22794,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 22791,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22788,
"src": "2469:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 22792,
"name": "_addresses",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22784,
"src": "2473:10:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 22793,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2473:17:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2469:21:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22805,
"initializationExpression": {
"assignments": [
22788
],
"declarations": [
{
"constant": false,
"id": 22788,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22805,
"src": "2454:9:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 22787,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2454:7:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 22790,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 22789,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2466:1:65",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "2454:13:65"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 22796,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2492:3:65",
"subExpression": {
"argumentTypes": null,
"id": 22795,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22788,
"src": "2492:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 22797,
"nodeType": "ExpressionStatement",
"src": "2492:3:65"
},
"nodeType": "ForStatement",
"src": "2449:103:65"
}
]
},
"documentation": {
"id": 22781,
"nodeType": "StructuredDocumentation",
"src": "2243:128:65",
"text": " @dev removes a list of addresses from the whitelist\n @param _addresses addresses to remove"
},
"functionSelector": "a84eb999",
"id": 22807,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "removeAddresses",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22785,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22784,
"mutability": "mutable",
"name": "_addresses",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22807,
"src": "2402:27:65",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 22782,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2402:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 22783,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2402:9:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2401:29:65"
},
"returnParameters": {
"id": 22786,
"nodeType": "ParameterList",
"parameters": [],
"src": "2438:0:65"
},
"scope": 22808,
"src": "2377:182:65",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 22809,
"src": "236:2326:65"
}
],
"src": "52:2512:65"
},
"legacyAST": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Whitelist.sol",
"exportedSymbols": {
"Whitelist": [
22808
]
},
"id": 22809,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 22663,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:65"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol",
"file": "./Owned.sol",
"id": 22664,
"nodeType": "ImportDirective",
"scope": 22809,
"sourceUnit": 21819,
"src": "77:21:65",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol",
"file": "./Utils.sol",
"id": 22665,
"nodeType": "ImportDirective",
"scope": 22809,
"sourceUnit": 22662,
"src": "100:21:65",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol",
"file": "./interfaces/IWhitelist.sol",
"id": 22666,
"nodeType": "ImportDirective",
"scope": 22809,
"sourceUnit": 22918,
"src": "123:37:65",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22668,
"name": "IWhitelist",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22917,
"src": "258:10:65",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IWhitelist_$22917",
"typeString": "contract IWhitelist"
}
},
"id": 22669,
"nodeType": "InheritanceSpecifier",
"src": "258:10:65"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22670,
"name": "Owned",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21818,
"src": "270:5:65",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Owned_$21818",
"typeString": "contract Owned"
}
},
"id": 22671,
"nodeType": "InheritanceSpecifier",
"src": "270:5:65"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 22672,
"name": "Utils",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22661,
"src": "277:5:65",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Utils_$22661",
"typeString": "contract Utils"
}
},
"id": 22673,
"nodeType": "InheritanceSpecifier",
"src": "277:5:65"
}
],
"contractDependencies": [
21818,
22661,
22847,
22917
],
"contractKind": "contract",
"documentation": {
"id": 22667,
"nodeType": "StructuredDocumentation",
"src": "164:70:65",
"text": " @dev The contract manages a list of whitelisted addresses"
},
"fullyImplemented": true,
"id": 22808,
"linearizedBaseContracts": [
22808,
22661,
21818,
22847,
22917
],
"name": "Whitelist",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 22677,
"mutability": "mutable",
"name": "whitelist",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22808,
"src": "290:43:65",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 22676,
"keyType": {
"id": 22674,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "299:7:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "290:25:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 22675,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "310:4:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "private"
},
{
"anonymous": false,
"documentation": {
"id": 22678,
"nodeType": "StructuredDocumentation",
"src": "342:151:65",
"text": " @dev triggered when an address is added to the whitelist\n @param _address address that's added from the whitelist"
},
"id": 22682,
"name": "AddressAddition",
"nodeType": "EventDefinition",
"parameters": {
"id": 22681,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22680,
"indexed": true,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22682,
"src": "521:24:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22679,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "521:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "520:26:65"
},
"src": "499:48:65"
},
{
"anonymous": false,
"documentation": {
"id": 22683,
"nodeType": "StructuredDocumentation",
"src": "555:157:65",
"text": " @dev triggered when an address is removed from the whitelist\n @param _address address that's removed from the whitelist"
},
"id": 22687,
"name": "AddressRemoval",
"nodeType": "EventDefinition",
"parameters": {
"id": 22686,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22685,
"indexed": true,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22687,
"src": "739:24:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22684,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "739:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "738:26:65"
},
"src": "718:47:65"
},
{
"baseFunctions": [
22916
],
"body": {
"id": 22700,
"nodeType": "Block",
"src": "1068:45:65",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22696,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "1086:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22698,
"indexExpression": {
"argumentTypes": null,
"id": 22697,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22690,
"src": "1096:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1086:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 22695,
"id": 22699,
"nodeType": "Return",
"src": "1079:26:65"
}
]
},
"documentation": {
"id": 22688,
"nodeType": "StructuredDocumentation",
"src": "773:212:65",
"text": " @dev returns true if a given address is whitelisted, false if not\n @param _address address to check\n @return true if the address is whitelisted, false if not"
},
"functionSelector": "3af32abf",
"id": 22701,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isWhitelisted",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 22692,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1044:8:65"
},
"parameters": {
"id": 22691,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22690,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22701,
"src": "1014:16:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22689,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1014:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1013:18:65"
},
"returnParameters": {
"id": 22695,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22694,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22701,
"src": "1062:4:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 22693,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1062:4:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1061:6:65"
},
"scope": 22808,
"src": "991:122:65",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 22727,
"nodeType": "Block",
"src": "1349:191:65",
"statements": [
{
"condition": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22712,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "1364:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22714,
"indexExpression": {
"argumentTypes": null,
"id": 22713,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22704,
"src": "1374:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1364:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 22716,
"nodeType": "IfStatement",
"src": "1360:93:65",
"trueBody": {
"expression": null,
"functionReturnParameters": 22711,
"id": 22715,
"nodeType": "Return",
"src": "1446:7:65"
}
},
{
"expression": {
"argumentTypes": null,
"id": 22721,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22717,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "1465:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22719,
"indexExpression": {
"argumentTypes": null,
"id": 22718,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22704,
"src": "1475:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1465:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 22720,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1487:4:65",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1465:26:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22722,
"nodeType": "ExpressionStatement",
"src": "1465:26:65"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22724,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22704,
"src": "1523:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 22723,
"name": "AddressAddition",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22682,
"src": "1507:15:65",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 22725,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1507:25:65",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22726,
"nodeType": "EmitStatement",
"src": "1502:30:65"
}
]
},
"documentation": {
"id": 22702,
"nodeType": "StructuredDocumentation",
"src": "1121:112:65",
"text": " @dev adds a given address to the whitelist\n @param _address address to add"
},
"functionSelector": "38eada1c",
"id": 22728,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 22707,
"modifierName": {
"argumentTypes": null,
"id": 22706,
"name": "ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21754,
"src": "1286:9:65",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1286:9:65"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 22709,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22704,
"src": "1318:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 22710,
"modifierName": {
"argumentTypes": null,
"id": 22708,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22618,
"src": "1305:12:65",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "1305:22:65"
}
],
"name": "addAddress",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22705,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22704,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22728,
"src": "1259:16:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22703,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1259:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1258:18:65"
},
"returnParameters": {
"id": 22711,
"nodeType": "ParameterList",
"parameters": [],
"src": "1349:0:65"
},
"scope": 22808,
"src": "1239:301:65",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 22754,
"nodeType": "Block",
"src": "1732:118:65",
"statements": [
{
"body": {
"id": 22752,
"nodeType": "Block",
"src": "1791:52:65",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22747,
"name": "_addresses",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22732,
"src": "1817:10:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 22749,
"indexExpression": {
"argumentTypes": null,
"id": 22748,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22736,
"src": "1828:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1817:13:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 22746,
"name": "addAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22728,
"src": "1806:10:65",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 22750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1806:25:65",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22751,
"nodeType": "ExpressionStatement",
"src": "1806:25:65"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 22742,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 22739,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22736,
"src": "1763:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 22740,
"name": "_addresses",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22732,
"src": "1767:10:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 22741,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1767:17:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1763:21:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22753,
"initializationExpression": {
"assignments": [
22736
],
"declarations": [
{
"constant": false,
"id": 22736,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22753,
"src": "1748:9:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 22735,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1748:7:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 22738,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 22737,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1760:1:65",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1748:13:65"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 22744,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1786:3:65",
"subExpression": {
"argumentTypes": null,
"id": 22743,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22736,
"src": "1786:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 22745,
"nodeType": "ExpressionStatement",
"src": "1786:3:65"
},
"nodeType": "ForStatement",
"src": "1743:100:65"
}
]
},
"documentation": {
"id": 22729,
"nodeType": "StructuredDocumentation",
"src": "1548:120:65",
"text": " @dev adds a list of addresses to the whitelist\n @param _addresses addresses to add"
},
"functionSelector": "3628731c",
"id": 22755,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "addAddresses",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22733,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22732,
"mutability": "mutable",
"name": "_addresses",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22755,
"src": "1696:27:65",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 22730,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1696:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 22731,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1696:9:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1695:29:65"
},
"returnParameters": {
"id": 22734,
"nodeType": "ParameterList",
"parameters": [],
"src": "1732:0:65"
},
"scope": 22808,
"src": "1674:176:65",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 22779,
"nodeType": "Block",
"src": "2042:193:65",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 22766,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2057:20:65",
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22763,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "2058:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22765,
"indexExpression": {
"argumentTypes": null,
"id": 22764,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22758,
"src": "2068:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2058:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 22768,
"nodeType": "IfStatement",
"src": "2053:95:65",
"trueBody": {
"expression": null,
"functionReturnParameters": 22762,
"id": 22767,
"nodeType": "Return",
"src": "2141:7:65"
}
},
{
"expression": {
"argumentTypes": null,
"id": 22773,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22769,
"name": "whitelist",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22677,
"src": "2160:9:65",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 22771,
"indexExpression": {
"argumentTypes": null,
"id": 22770,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22758,
"src": "2170:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2160:19:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 22772,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2182:5:65",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "2160:27:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22774,
"nodeType": "ExpressionStatement",
"src": "2160:27:65"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22776,
"name": "_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22758,
"src": "2218:8:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 22775,
"name": "AddressRemoval",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22687,
"src": "2203:14:65",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 22777,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2203:24:65",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22778,
"nodeType": "EmitStatement",
"src": "2198:29:65"
}
]
},
"documentation": {
"id": 22756,
"nodeType": "StructuredDocumentation",
"src": "1858:120:65",
"text": " @dev removes a given address from the whitelist\n @param _address address to remove"
},
"functionSelector": "4ba79dfe",
"id": 22780,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 22761,
"modifierName": {
"argumentTypes": null,
"id": 22760,
"name": "ownerOnly",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21754,
"src": "2025:9:65",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2025:9:65"
}
],
"name": "removeAddress",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22759,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22758,
"mutability": "mutable",
"name": "_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22780,
"src": "2007:16:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22757,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2007:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2006:18:65"
},
"returnParameters": {
"id": 22762,
"nodeType": "ParameterList",
"parameters": [],
"src": "2042:0:65"
},
"scope": 22808,
"src": "1984:251:65",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 22806,
"nodeType": "Block",
"src": "2438:121:65",
"statements": [
{
"body": {
"id": 22804,
"nodeType": "Block",
"src": "2497:55:65",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 22799,
"name": "_addresses",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22784,
"src": "2526:10:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 22801,
"indexExpression": {
"argumentTypes": null,
"id": 22800,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22788,
"src": "2537:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2526:13:65",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 22798,
"name": "removeAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22780,
"src": "2512:13:65",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 22802,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2512:28:65",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22803,
"nodeType": "ExpressionStatement",
"src": "2512:28:65"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 22794,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 22791,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22788,
"src": "2469:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 22792,
"name": "_addresses",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22784,
"src": "2473:10:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 22793,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2473:17:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2469:21:65",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22805,
"initializationExpression": {
"assignments": [
22788
],
"declarations": [
{
"constant": false,
"id": 22788,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22805,
"src": "2454:9:65",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 22787,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2454:7:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 22790,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 22789,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2466:1:65",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "2454:13:65"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 22796,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "2492:3:65",
"subExpression": {
"argumentTypes": null,
"id": 22795,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22788,
"src": "2492:1:65",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 22797,
"nodeType": "ExpressionStatement",
"src": "2492:3:65"
},
"nodeType": "ForStatement",
"src": "2449:103:65"
}
]
},
"documentation": {
"id": 22781,
"nodeType": "StructuredDocumentation",
"src": "2243:128:65",
"text": " @dev removes a list of addresses from the whitelist\n @param _addresses addresses to remove"
},
"functionSelector": "a84eb999",
"id": 22807,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "removeAddresses",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22785,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22784,
"mutability": "mutable",
"name": "_addresses",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22807,
"src": "2402:27:65",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 22782,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2402:7:65",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 22783,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2402:9:65",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2401:29:65"
},
"returnParameters": {
"id": 22786,
"nodeType": "ParameterList",
"parameters": [],
"src": "2438:0:65"
},
"scope": 22808,
"src": "2377:182:65",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 22809,
"src": "236:2326:65"
}
],
"src": "52:2512:65"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.3",
"updatedAt": "2020-10-20T08:24:47.848Z",
"devdoc": {
"details": "The contract manages a list of whitelisted addresses",
"events": {
"AddressAddition(address)": {
"details": "triggered when an address is added to the whitelist",
"params": {
"_address": "address that's added from the whitelist"
}
},
"AddressRemoval(address)": {
"details": "triggered when an address is removed from the whitelist",
"params": {
"_address": "address that's removed from the whitelist"
}
}
},
"kind": "dev",
"methods": {
"acceptOwnership()": {
"details": "used by a new owner to accept an ownership transfer"
},
"addAddress(address)": {
"details": "adds a given address to the whitelist",
"params": {
"_address": "address to add"
}
},
"addAddresses(address[])": {
"details": "adds a list of addresses to the whitelist",
"params": {
"_addresses": "addresses to add"
}
},
"isWhitelisted(address)": {
"details": "returns true if a given address is whitelisted, false if not",
"params": {
"_address": "address to check"
},
"returns": {
"_0": "true if the address is whitelisted, false if not"
}
},
"removeAddress(address)": {
"details": "removes a given address from the whitelist",
"params": {
"_address": "address to remove"
}
},
"removeAddresses(address[])": {
"details": "removes a list of addresses from the whitelist",
"params": {
"_addresses": "addresses to remove"
}
},
"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"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}