Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Whitelist
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.5; import '@openzeppelin/contracts/access/Ownable.sol'; /// @title Whitelist /// @notice contains a list of wallets allowed to perform a certain operation contract Whitelist is Ownable { mapping(address => bool) internal wallets; /// @notice events of approval and revoking wallets event ApproveWallet(address); event RevokeWallet(address); /// @notice approves wallet /// @param _wallet the wallet to approve function approveWallet(address _wallet) external onlyOwner { if (!wallets[_wallet]) { wallets[_wallet] = true; emit ApproveWallet(_wallet); } } /// @notice revokes wallet /// @param _wallet the wallet to revoke function revokeWallet(address _wallet) external onlyOwner { if (wallets[_wallet]) { wallets[_wallet] = false; emit RevokeWallet(_wallet); } } /// @notice checks if _wallet is whitelisted /// @param _wallet the wallet to check /// @return true if wallet is whitelisted function check(address _wallet) external view returns (bool) { return wallets[_wallet]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"}],"name":"ApproveWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"}],"name":"RevokeWallet","type":"event"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"approveWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"check","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"revokeWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080806040523461005b5760008054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36103b590816100618239f35b600080fdfe60406080815260048036101561001457600080fd5b600091823560e01c80630fcb0ae5146102a2578063715018a614610239578063808a9d40146101b85780638da5cb5b1461018e578063c23697a8146101505763f2fde38b1461006257600080fd5b3461014c57602036600319011261014c578135916001600160a01b039182841680940361014857610091610327565b83156100df57505082548273ffffffffffffffffffffffffffffffffffffffff198216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8480fd5b8280fd5b50903461014c57602036600319011261014c57356001600160a01b03811680910361014c57818360ff92602095526001855220541690519015158152f35b8382346101b457816003193601126101b4576001600160a01b0360209254169051908152f35b5080fd5b50903461014c57602036600319011261014c5735906001600160a01b03821680920361014c576101e6610327565b81835260016020528083209182549160ff8316610201578480f35b7f1b676c3cc753786cb95aff57280fd7406f1da74e2a8b9755fdd395aded3e16dd9360209360ff1916905551908152a1388080808480f35b833461029f578060031936011261029f57610252610327565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b50903461014c57602036600319011261014c5735906001600160a01b03821680920361014c576102d0610327565b81835260016020528083209182549160ff8316156102ec578480f35b7fc1e7aae3f3125e58cfc69ab2a872a655dbb9427614aa85b29bb5abeaca4d6a9293600160209460ff191617905551908152a1388080808480f35b6001600160a01b0360005416330361033b57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea2646970667358221220a74e417d9263016c1d0776c84dc5726a31c293ebb9da761078ab602aab62198964736f6c63430008120033
Deployed Bytecode
0x60406080815260048036101561001457600080fd5b600091823560e01c80630fcb0ae5146102a2578063715018a614610239578063808a9d40146101b85780638da5cb5b1461018e578063c23697a8146101505763f2fde38b1461006257600080fd5b3461014c57602036600319011261014c578135916001600160a01b039182841680940361014857610091610327565b83156100df57505082548273ffffffffffffffffffffffffffffffffffffffff198216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8480fd5b8280fd5b50903461014c57602036600319011261014c57356001600160a01b03811680910361014c57818360ff92602095526001855220541690519015158152f35b8382346101b457816003193601126101b4576001600160a01b0360209254169051908152f35b5080fd5b50903461014c57602036600319011261014c5735906001600160a01b03821680920361014c576101e6610327565b81835260016020528083209182549160ff8316610201578480f35b7f1b676c3cc753786cb95aff57280fd7406f1da74e2a8b9755fdd395aded3e16dd9360209360ff1916905551908152a1388080808480f35b833461029f578060031936011261029f57610252610327565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b50903461014c57602036600319011261014c5735906001600160a01b03821680920361014c576102d0610327565b81835260016020528083209182549160ff8316156102ec578480f35b7fc1e7aae3f3125e58cfc69ab2a872a655dbb9427614aa85b29bb5abeaca4d6a9293600160209460ff191617905551908152a1388080808480f35b6001600160a01b0360005416330361033b57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea2646970667358221220a74e417d9263016c1d0776c84dc5726a31c293ebb9da761078ab602aab62198964736f6c63430008120033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.