UNPKG

@gnosis.pm/conditional-tokens-market-makers

Version:
1 lines 19 kB
{"contractName":"Whitelist","abi":[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"isWhitelisted","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"users","type":"address[]"}],"name":"UsersAddedToWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"users","type":"address[]"}],"name":"UsersRemovedFromWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"constant":false,"inputs":[{"name":"users","type":"address[]"}],"name":"addToWhitelist","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"users","type":"address[]"}],"name":"removeFromWhitelist","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}],"metadata":"{\"compiler\":{\"version\":\"0.5.10+commit.5a6ea5b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"isWhitelisted\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"users\",\"type\":\"address[]\"}],\"name\":\"removeFromWhitelist\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"users\",\"type\":\"address[]\"}],\"name\":\"addToWhitelist\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"users\",\"type\":\"address[]\"}],\"name\":\"UsersAddedToWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"users\",\"type\":\"address[]\"}],\"name\":\"UsersRemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"author\":\"Anton Shtylman - @InfiniteStyles\",\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Whitelist for adding/removing users from a whitelist\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/alan/src/github.com/gnosis/conditional-tokens-market-makers/contracts/Whitelist.sol\":\"Whitelist\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/alan/src/github.com/gnosis/conditional-tokens-market-makers/contracts/Whitelist.sol\":{\"keccak256\":\"0xe608e935510e8190d6d9fd7a0a6ecc02776d0dd106cbcbe3bac5ee0309abfae5\",\"urls\":[\"bzzr://88b9da6174844aa2f45b5bf2686298a34a12c4546449ebc8344baaafd612ac42\",\"dweb:/ipfs/QmXqMsiTBAgfgZvfL5rP1QjFhfw56JBdyVmJJRmB2WoFJ4\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xf79fb10e8235770eb4aea7249034076a3cc9f9119ad944fc48705bae9c9d20dc\",\"urls\":[\"bzzr://d12a11272051eb6586de8f7e0a82c04a98c9984ce8b2a6cf1ee439f65aba29a9\",\"dweb:/ipfs/QmS55hgTvNEAKinus19m65CB4wcymN8EiUPFpRx5tYJ1i2\"]}},\"version\":1}","bytecode":"0x60806040819052600080546001600160a01b03191633178082556001600160a01b0316917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3610635806100576000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80637f6497831161005b5780637f649783146101365780638da5cb5b146101a65780638f32d59b146101ca578063f2fde38b146101d25761007d565b80633af32abf14610082578063548db174146100bc578063715018a61461012e575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b03166101f8565b604080519115158252519081900360200190f35b61012c600480360360208110156100d257600080fd5b8101906020810181356401000000008111156100ed57600080fd5b8201836020820111156100ff57600080fd5b8035906020019184602083028401116401000000008311171561012157600080fd5b50909250905061020d565b005b61012c610312565b61012c6004803603602081101561014c57600080fd5b81019060208101813564010000000081111561016757600080fd5b82018360208201111561017957600080fd5b8035906020019184602083028401116401000000008311171561019b57600080fd5b5090925090506103a3565b6101ae6104a7565b604080516001600160a01b039092168252519081900360200190f35b6100a86104b6565b61012c600480360360208110156101e857600080fd5b50356001600160a01b03166104c7565b60016020526000908152604090205460ff1681565b6102156104b6565b610254576040805162461bcd60e51b815260206004820181905260248201526000805160206105e1833981519152604482015290519081900360640190fd5b60005b818110156102aa5760006001600085858581811061027157fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff1916911515919091179055600101610257565b507f980469cd56680c471176aaf1931063250267d2044b92e69bd162f7f4bafba861828260405180806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b61031a6104b6565b610359576040805162461bcd60e51b815260206004820181905260248201526000805160206105e1833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103ab6104b6565b6103ea576040805162461bcd60e51b815260206004820181905260248201526000805160206105e1833981519152604482015290519081900360640190fd5b60005b8181101561043f57600180600085858581811061040657fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff19169115159190911790556001016103ed565b507f571817b02d15d247d0d4961fca494acd141f951ca62623d639cbbcd882a5290d828260405180806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6104cf6104b6565b61050e576040805162461bcd60e51b815260206004820181905260248201526000805160206105e1833981519152604482015290519081900360640190fd5b6105178161051a565b50565b6001600160a01b03811661055f5760405162461bcd60e51b81526004018080602001828103825260268152602001806105bb6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a72305820902031c9148fc225ba48a56484d17077187be16615f292580b7d0e21ebcb604b64736f6c634300050a0032","deployedBytecode":"0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80637f6497831161005b5780637f649783146101365780638da5cb5b146101a65780638f32d59b146101ca578063f2fde38b146101d25761007d565b80633af32abf14610082578063548db174146100bc578063715018a61461012e575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b03166101f8565b604080519115158252519081900360200190f35b61012c600480360360208110156100d257600080fd5b8101906020810181356401000000008111156100ed57600080fd5b8201836020820111156100ff57600080fd5b8035906020019184602083028401116401000000008311171561012157600080fd5b50909250905061020d565b005b61012c610312565b61012c6004803603602081101561014c57600080fd5b81019060208101813564010000000081111561016757600080fd5b82018360208201111561017957600080fd5b8035906020019184602083028401116401000000008311171561019b57600080fd5b5090925090506103a3565b6101ae6104a7565b604080516001600160a01b039092168252519081900360200190f35b6100a86104b6565b61012c600480360360208110156101e857600080fd5b50356001600160a01b03166104c7565b60016020526000908152604090205460ff1681565b6102156104b6565b610254576040805162461bcd60e51b815260206004820181905260248201526000805160206105e1833981519152604482015290519081900360640190fd5b60005b818110156102aa5760006001600085858581811061027157fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff1916911515919091179055600101610257565b507f980469cd56680c471176aaf1931063250267d2044b92e69bd162f7f4bafba861828260405180806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b61031a6104b6565b610359576040805162461bcd60e51b815260206004820181905260248201526000805160206105e1833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103ab6104b6565b6103ea576040805162461bcd60e51b815260206004820181905260248201526000805160206105e1833981519152604482015290519081900360640190fd5b60005b8181101561043f57600180600085858581811061040657fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff19169115159190911790556001016103ed565b507f571817b02d15d247d0d4961fca494acd141f951ca62623d639cbbcd882a5290d828260405180806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6104cf6104b6565b61050e576040805162461bcd60e51b815260206004820181905260248201526000805160206105e1833981519152604482015290519081900360640190fd5b6105178161051a565b50565b6001600160a01b03811661055f5760405162461bcd60e51b81526004018080602001828103825260268152602001806105bb6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a72305820902031c9148fc225ba48a56484d17077187be16615f292580b7d0e21ebcb604b64736f6c634300050a0032","sourceMap":"200:608:9:-;;;;;657:6:23;:19;;-1:-1:-1;;;;;;657:19:23;666:10;657:19;;;;-1:-1:-1;;;;;724:6:23;;691:40;;657:6;;691:40;200:608:9;;;;;;","deployedSourceMap":"200:608:9:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;200:608:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;336:45;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;336:45:9;-1:-1:-1;;;;;336:45:9;;:::i;:::-;;;;;;;;;;;;;;;;;;593:213;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;593:213:9;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;593:213:9;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;593:213:9;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;593:213:9;;-1:-1:-1;593:213:9;-1:-1:-1;593:213:9;:::i;:::-;;1599:137:23;;;:::i;386:203:9:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;386:203:9;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;386:203:9;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;386:203:9;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;386:203:9;;-1:-1:-1;386:203:9;-1:-1:-1;386:203:9;:::i;814:77:23:-;;;:::i;:::-;;;;-1:-1:-1;;;;;814:77:23;;;;;;;;;;;;;;1165:90;;;:::i;1885:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1885:107:23;-1:-1:-1;;;;;1885:107:23;;:::i;336:45:9:-;;;;;;;;;;;;;;;:::o;593:213::-;1018:9:23;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;1010:54:23;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:23;;;;;;;;;;;;;;;678:6:9;673:86;690:16;;;673:86;;;747:5;721:13;:23;735:5;;741:1;735:8;;;;;;;;;;;;;;;;-1:-1:-1;;;;;735:8:9;721:23;;-1:-1:-1;721:23:9;;;;;;;;-1:-1:-1;721:23:9;:31;;-1:-1:-1;;721:31:9;;;;;;;;;;-1:-1:-1;708:3:9;673:86;;;;769:32;795:5;;769:32;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;769:32:9;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;769:32:9;;;;-1:-1:-1;769:32:9;;-1:-1:-1;;;;769:32:9;593:213;;:::o;1599:137:23:-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;1010:54:23;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:23;;;;;;;;;;;;;;;1697:1;1681:6;;1660:40;;-1:-1:-1;;;;;1681:6:23;;;;1660:40;;1697:1;;1660:40;1727:1;1710:19;;-1:-1:-1;;;;;;1710:19:23;;;1599:137::o;386:203:9:-;1018:9:23;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;1010:54:23;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:23;;;;;;;;;;;;;;;466:6:9;461:85;478:16;;;461:85;;;535:4;509:13;:23;523:5;;529:1;523:8;;;;;;;;;;;;;;;;-1:-1:-1;;;;;523:8:9;509:23;;-1:-1:-1;509:23:9;;;;;;;;-1:-1:-1;509:23:9;:30;;-1:-1:-1;;509:30:9;;;;;;;;;;-1:-1:-1;496:3:9;461:85;;;;556:28;578:5;;556:28;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;556:28:9;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;556:28:9;;;;-1:-1:-1;556:28:9;;-1:-1:-1;;;;556:28:9;386:203;;:::o;814:77:23:-;852:7;878:6;-1:-1:-1;;;;;878:6:23;814:77;:::o;1165:90::-;1205:4;1242:6;-1:-1:-1;;;;;1242:6:23;1228:10;:20;;1165:90::o;1885:107::-;1018:9;:7;:9::i;:::-;1010:54;;;;;-1:-1:-1;;;1010:54:23;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1010:54:23;;;;;;;;;;;;;;;1957:28;1976:8;1957:18;:28::i;:::-;1885:107;:::o;2093:225::-;-1:-1:-1;;;;;2166:22:23;;2158:73;;;;-1:-1:-1;;;2158:73:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2267:6;;;2246:38;;-1:-1:-1;;;;;2246:38:23;;;;2267:6;;;2246:38;;;2294:6;:17;;-1:-1:-1;;;;;;2294:17:23;-1:-1:-1;;;;;2294:17:23;;;;;;;;;;2093:225::o","source":"pragma solidity ^0.5.1;\n\nimport 'openzeppelin-solidity/contracts/ownership/Ownable.sol'; \n\n/// @title Whitelist for adding/removing users from a whitelist\n/// @author Anton Shtylman - @InfiniteStyles\ncontract Whitelist is Ownable {\n\n event UsersAddedToWhitelist(address[] users);\n event UsersRemovedFromWhitelist(address[] users);\n\n mapping(address => bool) public isWhitelisted;\n\n function addToWhitelist(address[] calldata users) onlyOwner external {\n for (uint i = 0; i < users.length; i++) {\n isWhitelisted[users[i]] = true;\n }\n emit UsersAddedToWhitelist(users);\n }\n\n function removeFromWhitelist(address[] calldata users) onlyOwner external {\n for (uint i = 0; i < users.length; i++) {\n isWhitelisted[users[i]] = false;\n }\n emit UsersRemovedFromWhitelist(users);\n }\n}\n","compiler":{"name":"solc","version":"0.5.10+commit.5a6ea5b1.Emscripten.clang"},"networks":{"1":{"events":{"0x571817b02d15d247d0d4961fca494acd141f951ca62623d639cbbcd882a5290d":{"anonymous":false,"inputs":[{"indexed":false,"name":"users","type":"address[]"}],"name":"UsersAddedToWhitelist","type":"event","signature":"0x571817b02d15d247d0d4961fca494acd141f951ca62623d639cbbcd882a5290d"},"0x980469cd56680c471176aaf1931063250267d2044b92e69bd162f7f4bafba861":{"anonymous":false,"inputs":[{"indexed":false,"name":"users","type":"address[]"}],"name":"UsersRemovedFromWhitelist","type":"event","signature":"0x980469cd56680c471176aaf1931063250267d2044b92e69bd162f7f4bafba861"},"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0":{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event","signature":"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0"}},"links":{},"address":"0x5250B9241D0c63a2b60aFb7F2b24b12D94d8ae7D","transactionHash":"0xa935800116302a9d4807fd66b425753496de14ee2a07bea5a1091e7a53457b5f"},"4":{"events":{"0x571817b02d15d247d0d4961fca494acd141f951ca62623d639cbbcd882a5290d":{"anonymous":false,"inputs":[{"indexed":false,"name":"users","type":"address[]"}],"name":"UsersAddedToWhitelist","type":"event","signature":"0x571817b02d15d247d0d4961fca494acd141f951ca62623d639cbbcd882a5290d"},"0x980469cd56680c471176aaf1931063250267d2044b92e69bd162f7f4bafba861":{"anonymous":false,"inputs":[{"indexed":false,"name":"users","type":"address[]"}],"name":"UsersRemovedFromWhitelist","type":"event","signature":"0x980469cd56680c471176aaf1931063250267d2044b92e69bd162f7f4bafba861"},"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0":{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event","signature":"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0"}},"links":{},"address":"0x50feC2CC2782c1e1500E2dA2e25BedC5bD3B2868","transactionHash":"0x84fcbd21ce707bfd1beb58a55f10d08a1e22bb54b91eab3ee8f8fefa4bee4d57"}},"schemaVersion":"3.0.16","updatedAt":"2020-03-16T19:03:53.124Z","devdoc":{"author":"Anton Shtylman - @InfiniteStyles","methods":{"isOwner()":{"details":"Returns true if the caller is the current owner."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * > Note: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"title":"Whitelist for adding/removing users from a whitelist"},"userdoc":{"methods":{}}}