Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- Blocklist
- Optimization enabled
- true
- Compiler version
- v0.8.16+commit.07a7930e
- Optimization runs
- 100
- EVM Version
- default
- Verified at
- 2023-10-24T17:07:27.532563Z
contracts/usdy/blocklist/Blocklist.sol
/**SPDX-License-Identifier: BUSL-1.1 ââââââââââââ âââââ ,ââââ, 'ââââ âââ ââââââââââââ âââÂľ ,, ,, , ,,, ,,, ââ ,ââÂŹ ââââââ âââ âââ ââââââââââ ââââ ââ ââââââââââ âââââââââ, ââ ââ âââ' âââ âââ ââ âââ âââ âââââ, ââ âââ ââââ âââ ââââ ââ âââ ââ ââ ââ ââ âââ âââ ââ ââââ ââ âââ âââ jââ âââ ââ ââ âââ âââ âââ ââ âââ âââ ââ âââââ âââ ââââ âââ ,âââ ââ "ââ, âââââââââââââââ ââââââââââ ââ âââ âââââââââ âââââââââ` âââ âââââââââ,,, ÂŹâ 'âÂŹ âââââ 'âââââââââââ âââââââââRâ */ pragma solidity 0.8.16; import "contracts/external/openzeppelin/contracts/access/Ownable2Step.sol"; import "contracts/interfaces/IBlocklist.sol"; /** * @title Blocklist * @author Ondo Finance * @notice This contract manages the blocklist status for accounts. */ contract Blocklist is Ownable2Step, IBlocklist { constructor() {} // {<address> => is account blocked} mapping(address => bool) private blockedAddresses; /** * @notice Returns name of contract */ function name() external pure returns (string memory) { return "Ondo Finance Blocklist Oracle"; } /** * @notice Function to add a list of accounts to the blocklist * * @param accounts Array of addresses to block */ function addToBlocklist(address[] calldata accounts) external onlyOwner { for (uint256 i; i < accounts.length; ++i) { blockedAddresses[accounts[i]] = true; } emit BlockedAddressesAdded(accounts); } /** * @notice Function to remove a list of accounts from the blocklist * * @param accounts Array of addresses to unblock */ function removeFromBlocklist(address[] calldata accounts) external onlyOwner { for (uint256 i; i < accounts.length; ++i) { blockedAddresses[accounts[i]] = false; } emit BlockedAddressesRemoved(accounts); } /** * @notice Function to check if an account is blocked * * @param addr Address to check * * @return True if account is blocked, false otherwise */ function isBlocked(address addr) external view returns (bool) { return blockedAddresses[addr]; } }
contracts/external/openzeppelin/contracts/access/Ownable2Step.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides 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} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
contracts/external/openzeppelin/contracts/utils/Context.sol
// 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; } }
contracts/interfaces/IBlocklist.sol
/**SPDX-License-Identifier: BUSL-1.1 ââââââââââââ âââââ ,ââââ, 'ââââ âââ ââââââââââââ âââÂľ ,, ,, , ,,, ,,, ââ ,ââÂŹ ââââââ âââ âââ ââââââââââ ââââ ââ ââââââââââ âââââââââ, ââ ââ âââ' âââ âââ ââ âââ âââ âââââ, ââ âââ ââââ âââ ââââ ââ âââ ââ ââ ââ ââ âââ âââ ââ ââââ ââ âââ âââ jââ âââ ââ ââ âââ âââ âââ ââ âââ âââ ââ âââââ âââ ââââ âââ ,âââ ââ "ââ, âââââââââââââââ ââââââââââ ââ âââ âââââââââ âââââââââ` âââ âââââââââ,,, ÂŹâ 'âÂŹ âââââ 'âââââââââââ âââââââââRâ */ pragma solidity 0.8.16; interface IBlocklist { function addToBlocklist(address[] calldata accounts) external; function removeFromBlocklist(address[] calldata accounts) external; function isBlocked(address account) external view returns (bool); /** * @notice Event emitted when addresses are added to the blocklist * * @param accounts The addresses that were added to the blocklist */ event BlockedAddressesAdded(address[] accounts); /** * @notice Event emitted when addresses are removed from the blocklist * * @param accounts The addresses that were removed from the blocklist */ event BlockedAddressesRemoved(address[] accounts); }
contracts/external/openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "contracts/external/openzeppelin/contracts/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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public 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); } }
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers"]}},"optimizer":{"runs":100,"enabled":true},"metadata":{"useLiteralContent":true},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"BlockedAddressesAdded","inputs":[{"type":"address[]","name":"accounts","internalType":"address[]","indexed":false}],"anonymous":false},{"type":"event","name":"BlockedAddressesRemoved","inputs":[{"type":"address[]","name":"accounts","internalType":"address[]","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferStarted","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"acceptOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addToBlocklist","inputs":[{"type":"address[]","name":"accounts","internalType":"address[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isBlocked","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pendingOwner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeFromBlocklist","inputs":[{"type":"address[]","name":"accounts","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
Contract Creation Code
0x608060405234801561001057600080fd5b5061001a3361001f565b610096565b600180546001600160a01b031916905561004381610046602090811b61049017901c565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6106ee806100a56000396000f3fe608060405234801561001057600080fd5b50600436106100835760003560e01c806306fdde0314610088578063715018a6146100d057806379ba5097146100da5780638da5cb5b146100e2578063ab63e69c14610102578063e30c397814610115578063f2fde38b14610126578063f71a55f814610139578063fbac39511461014c575b600080fd5b604080518082018252601d81527f4f6e646f2046696e616e636520426c6f636b6c697374204f7261636c65000000602082015290516100c791906104f9565b60405180910390f35b6100d8610188565b005b6100d86101cc565b6100ea610246565b6040516001600160a01b0390911681526020016100c7565b6100d8610110366004610547565b610255565b6001546001600160a01b03166100ea565b6100d86101343660046105d8565b610332565b6100d8610147366004610547565b6103bf565b61017861015a3660046105d8565b6001600160a01b031660009081526002602052604090205460ff1690565b60405190151581526020016100c7565b33610191610246565b6001600160a01b0316146101c05760405162461bcd60e51b81526004016101b7906105fa565b60405180910390fd5b6101ca60006104e0565b565b60015433906001600160a01b0316811461023a5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016101b7565b610243816104e0565b50565b6000546001600160a01b031690565b3361025e610246565b6001600160a01b0316146102845760405162461bcd60e51b81526004016101b7906105fa565b60005b818110156102f4576000600260008585858181106102a7576102a761062f565b90506020020160208101906102bc91906105d8565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790556102ed81610645565b9050610287565b507f825ac0fb57c227a7d56aba274d9e0e69c9c6b837841a26298e3e0148c201ba28828260405161032692919061066c565b60405180910390a15050565b3361033b610246565b6001600160a01b0316146103615760405162461bcd60e51b81526004016101b7906105fa565b600180546001600160a01b0319166001600160a01b038316908117909155610387610246565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b336103c8610246565b6001600160a01b0316146103ee5760405162461bcd60e51b81526004016101b7906105fa565b60005b8181101561045e576001600260008585858181106104115761041161062f565b905060200201602081019061042691906105d8565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561045781610645565b90506103f1565b507f3a615a701ac9b684212c0070be113e8c7847390b2cb8a03c9998684e2a86ae29828260405161032692919061066c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600180546001600160a01b031916905561024381610490565b600060208083528351808285015260005b818110156105265785810183015185820160400152820161050a565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806020838503121561055a57600080fd5b823567ffffffffffffffff8082111561057257600080fd5b818501915085601f83011261058657600080fd5b81358181111561059557600080fd5b8660208260051b85010111156105aa57600080fd5b60209290920196919550909350505050565b80356001600160a01b03811681146105d357600080fd5b919050565b6000602082840312156105ea57600080fd5b6105f3826105bc565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60006001820161066557634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082528181018390526000908460408401835b868110156106ad576001600160a01b0361069a846105bc565b1682529183019190830190600101610681565b50969550505050505056fea264697066735822122040a2537dc86c4db549a94fd3124487f5744c7bcb705c13faad975202ec47317564736f6c63430008100033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106100835760003560e01c806306fdde0314610088578063715018a6146100d057806379ba5097146100da5780638da5cb5b146100e2578063ab63e69c14610102578063e30c397814610115578063f2fde38b14610126578063f71a55f814610139578063fbac39511461014c575b600080fd5b604080518082018252601d81527f4f6e646f2046696e616e636520426c6f636b6c697374204f7261636c65000000602082015290516100c791906104f9565b60405180910390f35b6100d8610188565b005b6100d86101cc565b6100ea610246565b6040516001600160a01b0390911681526020016100c7565b6100d8610110366004610547565b610255565b6001546001600160a01b03166100ea565b6100d86101343660046105d8565b610332565b6100d8610147366004610547565b6103bf565b61017861015a3660046105d8565b6001600160a01b031660009081526002602052604090205460ff1690565b60405190151581526020016100c7565b33610191610246565b6001600160a01b0316146101c05760405162461bcd60e51b81526004016101b7906105fa565b60405180910390fd5b6101ca60006104e0565b565b60015433906001600160a01b0316811461023a5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016101b7565b610243816104e0565b50565b6000546001600160a01b031690565b3361025e610246565b6001600160a01b0316146102845760405162461bcd60e51b81526004016101b7906105fa565b60005b818110156102f4576000600260008585858181106102a7576102a761062f565b90506020020160208101906102bc91906105d8565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790556102ed81610645565b9050610287565b507f825ac0fb57c227a7d56aba274d9e0e69c9c6b837841a26298e3e0148c201ba28828260405161032692919061066c565b60405180910390a15050565b3361033b610246565b6001600160a01b0316146103615760405162461bcd60e51b81526004016101b7906105fa565b600180546001600160a01b0319166001600160a01b038316908117909155610387610246565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b336103c8610246565b6001600160a01b0316146103ee5760405162461bcd60e51b81526004016101b7906105fa565b60005b8181101561045e576001600260008585858181106104115761041161062f565b905060200201602081019061042691906105d8565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561045781610645565b90506103f1565b507f3a615a701ac9b684212c0070be113e8c7847390b2cb8a03c9998684e2a86ae29828260405161032692919061066c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600180546001600160a01b031916905561024381610490565b600060208083528351808285015260005b818110156105265785810183015185820160400152820161050a565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806020838503121561055a57600080fd5b823567ffffffffffffffff8082111561057257600080fd5b818501915085601f83011261058657600080fd5b81358181111561059557600080fd5b8660208260051b85010111156105aa57600080fd5b60209290920196919550909350505050565b80356001600160a01b03811681146105d357600080fd5b919050565b6000602082840312156105ea57600080fd5b6105f3826105bc565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60006001820161066557634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082528181018390526000908460408401835b868110156106ad576001600160a01b0361069a846105bc565b1682529183019190830190600101610681565b50969550505050505056fea264697066735822122040a2537dc86c4db549a94fd3124487f5744c7bcb705c13faad975202ec47317564736f6c63430008100033
Loading...
Loading...