{"sources":{"SanctionsList.sol":{"content":"// File: @openzeppelin/contracts/utils/Context.sol\r\n\r\n\r\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\n/**\r\n * @dev Provides information about the current execution context, including the\r\n * sender of the transaction and its data. While these are generally available\r\n * via msg.sender and msg.data, they should not be accessed in such a direct\r\n * manner, since when dealing with meta-transactions the account sending and\r\n * paying for execution may not be the actual sender (as far as an application\r\n * is concerned).\r\n *\r\n * This contract is only required for intermediate, library-like contracts.\r\n */\r\nabstract contract Context {\r\n    function _msgSender() internal view virtual returns (address) {\r\n        return msg.sender;\r\n    }\r\n\r\n    function _msgData() internal view virtual returns (bytes calldata) {\r\n        return msg.data;\r\n    }\r\n}\r\n\r\n// File: @openzeppelin/contracts/access/Ownable.sol\r\n\r\n\r\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\n\r\n/**\r\n * @dev Contract module which provides a basic access control mechanism, where\r\n * there is an account (an owner) that can be granted exclusive access to\r\n * specific functions.\r\n *\r\n * By default, the owner account will be the one that deploys the contract. This\r\n * can later be changed with {transferOwnership}.\r\n *\r\n * This module is used through inheritance. It will make available the modifier\r\n * `onlyOwner`, which can be applied to your functions to restrict their use to\r\n * the owner.\r\n */\r\nabstract contract Ownable is Context {\r\n    address private _owner;\r\n\r\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n    /**\r\n     * @dev Initializes the contract setting the deployer as the initial owner.\r\n     */\r\n    constructor() {\r\n        _transferOwnership(_msgSender());\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the address of the current owner.\r\n     */\r\n    function owner() public view virtual returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the owner.\r\n     */\r\n    modifier onlyOwner() {\r\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Leaves the contract without owner. It will not be possible to call\r\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\r\n     *\r\n     * NOTE: Renouncing ownership will leave the contract without an owner,\r\n     * thereby removing any functionality that is only available to the owner.\r\n     */\r\n    function renounceOwnership() public virtual onlyOwner {\r\n        _transferOwnership(address(0));\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r\n     * Can only be called by the current owner.\r\n     */\r\n    function transferOwnership(address newOwner) public virtual onlyOwner {\r\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\r\n        _transferOwnership(newOwner);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r\n     * Internal function without access restriction.\r\n     */\r\n    function _transferOwnership(address newOwner) internal virtual {\r\n        address oldOwner = _owner;\r\n        _owner = newOwner;\r\n        emit OwnershipTransferred(oldOwner, newOwner);\r\n    }\r\n}\r\n\r\n// File: contracts/SanctionsList.sol\r\n\r\n\r\npragma solidity >=0.4.22 <0.9.0;\r\n\r\n\r\ncontract SanctionsList is Ownable {\r\n\r\n  constructor() {}\r\n\r\n  mapping(address => bool) private sanctionedAddresses;\r\n\r\n  event SanctionedAddress(address indexed addr);\r\n  event NonSanctionedAddress(address indexed addr);\r\n  event SanctionedAddressesAdded(address[] addrs);\r\n  event SanctionedAddressesRemoved(address[] addrs);\r\n\r\n  function name() external pure returns (string memory) {\r\n    return \"Chainalysis sanctions oracle\";\r\n  }\r\n\r\n  function addToSanctionsList(address[] memory newSanctions) public onlyOwner {\r\n    for (uint256 i = 0; i < newSanctions.length; i++) {\r\n      sanctionedAddresses[newSanctions[i]] = true;  \r\n    }\r\n    emit SanctionedAddressesAdded(newSanctions);\r\n  }\r\n\r\n  function removeFromSanctionsList(address[] memory removeSanctions) public onlyOwner {\r\n    for (uint256 i = 0; i < removeSanctions.length; i++) {\r\n      sanctionedAddresses[removeSanctions[i]] = false;  \r\n    }\r\n    emit SanctionedAddressesRemoved(removeSanctions);\r\n  }\r\n\r\n  function isSanctioned(address addr) public view returns (bool) {\r\n    return sanctionedAddresses[addr] == true ;\r\n  }\r\n\r\n  function isSanctionedVerbose(address addr) public returns (bool) {\r\n    if (isSanctioned(addr)) {\r\n      emit SanctionedAddress(addr);\r\n      return true;\r\n    } else {\r\n      emit NonSanctionedAddress(addr);\r\n      return false;\r\n    }\r\n  }\r\n\r\n}"}},"matchId":"2337469","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2024-08-08T15:08:20Z","match":"match","chainId":"1","address":"0x40C57923924B5c5c5455c48D93317139ADDaC8fb"}