ETH Price: $2,603.40 (-3.80%)
Gas: 0.11 GWei

Contract

0xd34A77c963da4C16ECCBEE6D0A246047d086DA1E

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

10 Internal Transactions found.

Latest 10 internal transactions

Parent Transaction Hash Block From To
8553572023-11-14 13:52:54455 days ago1699969974
Kuma Protocol : Blacklist
0 ETH
8553572023-11-14 13:52:54455 days ago1699969974
Kuma Protocol : Blacklist
0 ETH
8553572023-11-14 13:52:54455 days ago1699969974
Kuma Protocol : Blacklist
0 ETH
8553492023-11-14 13:51:18455 days ago1699969878
Kuma Protocol : Blacklist
0 ETH
8553492023-11-14 13:51:18455 days ago1699969878
Kuma Protocol : Blacklist
0 ETH
8553492023-11-14 13:51:18455 days ago1699969878
Kuma Protocol : Blacklist
0 ETH
8479172023-11-13 13:04:48456 days ago1699880688
Kuma Protocol : Blacklist
0 ETH
8479172023-11-13 13:04:48456 days ago1699880688
Kuma Protocol : Blacklist
0 ETH
8479172023-11-13 13:04:48456 days ago1699880688
Kuma Protocol : Blacklist
0 ETH
8479172023-11-13 13:04:48456 days ago1699880688
Kuma Protocol : Blacklist
0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Blacklist

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : Blacklist.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import {Errors} from "./libraries/Errors.sol";
import {IAccessControl} from "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol";
import {IBlacklist} from "./interfaces/IBlacklist.sol";
import {Roles} from "./libraries/Roles.sol";

/**
 * @title MCAG Blacklist
 * @author MIMO Labs
 * @notice This contract stores the blacklist for MCAG
 */
contract Blacklist is IBlacklist {
    IAccessControl public immutable accessController;

    mapping(address => bool) private _blacklisted;

    /**
     * @dev Throws if called by any account other than the blacklister
     */
    modifier onlyBlacklister() {
        if (!accessController.hasRole(Roles.MCAG_BLACKLIST_ROLE, msg.sender)) {
            revert Errors.BLACKLIST_CALLER_IS_NOT_BLACKLISTER();
        }
        _;
    }

    constructor(IAccessControl _accessController) {
        if (address(_accessController) == address(0)) {
            revert Errors.CANNOT_SET_TO_ADDRESS_ZERO();
        }
        accessController = _accessController;

        emit AccessControllerSet(address(_accessController));
    }

    /**
     * @dev Adds account to blacklist
     * @dev Caller must have MCAG_BLACKLIST_ROLE
     * @param account The address to blacklist
     */
    function blacklist(address account) external onlyBlacklister {
        if (_blacklisted[account]) {
            revert Errors.BLACKLIST_ACCOUNT_IS_BLACKLISTED(account);
        }
        _blacklisted[account] = true;
        emit Blacklisted(account);
    }

    /**
     * @dev Removes account from blacklist
     * @dev Caller must have MCAG_BLACKLIST_ROLE
     * @param account The address to remove from the blacklist
     */
    function unBlacklist(address account) external onlyBlacklister {
        if (!_blacklisted[account]) {
            revert Errors.BLACKLIST_ACCOUNT_IS_NOT_BLACKLISTED(account);
        }
        _blacklisted[account] = false;
        emit UnBlacklisted(account);
    }

    /**
     * @dev Checks if account is blacklisted
     * @param account The address to check
     * @return True if the given account is blacklisted, false otherwise
     */
    function isBlacklisted(address account) external view returns (bool) {
        return _blacklisted[account];
    }
}

File 2 of 5 : IBlacklist.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import {IAccessControl} from "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol";

interface IBlacklist {
    event AccessControllerSet(address accesController);
    event Blacklisted(address indexed account);
    event UnBlacklisted(address indexed account);

    function blacklist(address account) external;

    function unBlacklist(address account) external;

    function accessController() external view returns (IAccessControl);

    function isBlacklisted(address account) external view returns (bool);
}

File 3 of 5 : Errors.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

library Errors {
    error CANNOT_SET_TO_ADDRESS_ZERO();
    error ERC721_APPROVAL_TO_CURRENT_OWNER();
    error ERC721_APPROVE_CALLER_IS_NOT_TOKEN_OWNER_OR_APPROVED_FOR_ALL();
    error ERC721_INVALID_TOKEN_ID();
    error ERC721_CALLER_IS_NOT_TOKEN_OWNER();
    error ACCESS_CONTROL_ACCOUNT_IS_MISSING_ROLE(address account, bytes32 role);
    error BLACKLIST_CALLER_IS_NOT_BLACKLISTER();
    error BLACKLIST_ACCOUNT_IS_NOT_BLACKLISTED(address account);
    error BLACKLIST_ACCOUNT_IS_BLACKLISTED(address account);
    error TRANSMITTED_ANSWER_TOO_HIGH(int256 answer, int256 maxAnswer);
    error TRANSMITTED_ANSWER_TOO_LOW(int256 answer, int256 minAnswer);
    error TOKEN_IS_NOT_TRANSFERABLE();
    error KYC_DATA_OWNER_MISMATCH(address to, address owner);
    error RATE_TOO_VOLATILE(uint256 absoluteRateChange, uint256 volatilityThreshold);
    error INVALID_VOLATILITY_THRESHOLD();
    error TERMS_AND_CONDITIONS_URL_DOES_NOT_EXIST(uint256 tncId);
    error TERM_TOO_LOW(uint256 term, uint256 minTerm);
    error RISK_CATEGORY_MISMATCH(bytes4 currency, bytes32 name, uint64 term, bytes32 riskCategory);
    error MATURITY_LESS_THAN_ISSUANCE(uint64 maturity, uint64 issuance);
    error INVALID_RISK_CATEGORY();
    error EMPTY_CUSIP_AND_ISIN();
    error INVALID_MAX_COUPON();
    error INVALID_COUPON(uint256 coupon, uint256 minCoupon, uint256 maxCoupon);
    error ANSWER_VARIATION_TOO_HIGH();
    error CANNOT_SET_NEGATIVE_MAX_ANSWER();
}

File 4 of 5 : Roles.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

library Roles {
    bytes32 public constant MCAG_MINT_ROLE = keccak256("MCAG_MINT_ROLE");
    bytes32 public constant MCAG_BURN_ROLE = keccak256("MCAG_BURN_ROLE");
    bytes32 public constant MCAG_BLACKLIST_ROLE = keccak256("MCAG_BLACKLIST_ROLE");
    bytes32 public constant MCAG_PAUSE_ROLE = keccak256("MCAG_PAUSE_ROLE");
    bytes32 public constant MCAG_UNPAUSE_ROLE = keccak256("MCAG_UNPAUSE_ROLE");
    bytes32 public constant MCAG_TRANSMITTER_ROLE = keccak256("MCAG_TRANSMITTER_ROLE");
    bytes32 public constant MCAG_MANAGER_ROLE = keccak256("MCAG_MANAGER_ROLE");
    bytes32 public constant MCAG_SET_URI_ROLE = keccak256("MCAG_SET_URI_ROLE");
    bytes32 public constant MCAG_SET_TNC_ROLE = keccak256("MCAG_SET_TNC_ROLE");
    bytes32 public constant MCAG_SET_MAX_COUPON_ROLE = keccak256("MCAG_SET_MAX_COUPON_ROLE");
}

File 5 of 5 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IAccessControl","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"BLACKLIST_ACCOUNT_IS_BLACKLISTED","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"BLACKLIST_ACCOUNT_IS_NOT_BLACKLISTED","type":"error"},{"inputs":[],"name":"BLACKLIST_CALLER_IS_NOT_BLACKLISTER","type":"error"},{"inputs":[],"name":"CANNOT_SET_TO_ADDRESS_ZERO","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"accesController","type":"address"}],"name":"AccessControllerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"UnBlacklisted","type":"event"},{"inputs":[],"name":"accessController","outputs":[{"internalType":"contract IAccessControl","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"blacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"unBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b506040516109c13803806109c18339818101604052810190610032919061017e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610098576040517f6a8403ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250507fd0761a673d8d97d3dd1e8beb78920467f6482d897a3d1a77d0749f20c653130d816040516100fb91906101ba565b60405180910390a1506101d5565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006101398261010e565b9050919050565b600061014b8261012e565b9050919050565b61015b81610140565b811461016657600080fd5b50565b60008151905061017881610152565b92915050565b60006020828403121561019457610193610109565b5b60006101a284828501610169565b91505092915050565b6101b48161012e565b82525050565b60006020820190506101cf60008301846101ab565b92915050565b6080516107c46101fd6000396000818160d9015281816102f5015261031901526107c46000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80631a89526614610051578063bc43cbaf1461006d578063f9f92be41461008b578063fe575a87146100a7575b600080fd5b61006b600480360381019061006691906105ec565b6100d7565b005b6100756102f3565b6040516100829190610678565b60405180910390f35b6100a560048036038101906100a091906105ec565b610317565b005b6100c160048036038101906100bc91906105ec565b610534565b6040516100ce91906106ae565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166391d148547fc2c00bfde45aef08863c07b09d5ffc9e9ca5bd1f0f5398c36ae4a2b264de266f336040518363ffffffff1660e01b81526004016101529291906106f1565b602060405180830381865afa15801561016f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101939190610746565b6101c9576040517fb6e9522600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661025657806040517f9498322f00000000000000000000000000000000000000000000000000000000815260040161024d9190610773565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f117e3210bb9aa7d9baff172026820255c6f6c30ba8999d1c2fd88e2848137c4e60405160405180910390a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166391d148547fc2c00bfde45aef08863c07b09d5ffc9e9ca5bd1f0f5398c36ae4a2b264de266f336040518363ffffffff1660e01b81526004016103929291906106f1565b602060405180830381865afa1580156103af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d39190610746565b610409576040517fb6e9522600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561049757806040517f9c6aaf2900000000000000000000000000000000000000000000000000000000815260040161048e9190610773565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b85560405160405180910390a250565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105b98261058e565b9050919050565b6105c9816105ae565b81146105d457600080fd5b50565b6000813590506105e6816105c0565b92915050565b60006020828403121561060257610601610589565b5b6000610610848285016105d7565b91505092915050565b6000819050919050565b600061063e6106396106348461058e565b610619565b61058e565b9050919050565b600061065082610623565b9050919050565b600061066282610645565b9050919050565b61067281610657565b82525050565b600060208201905061068d6000830184610669565b92915050565b60008115159050919050565b6106a881610693565b82525050565b60006020820190506106c3600083018461069f565b92915050565b6000819050919050565b6106dc816106c9565b82525050565b6106eb816105ae565b82525050565b600060408201905061070660008301856106d3565b61071360208301846106e2565b9392505050565b61072381610693565b811461072e57600080fd5b50565b6000815190506107408161071a565b92915050565b60006020828403121561075c5761075b610589565b5b600061076a84828501610731565b91505092915050565b600060208201905061078860008301846106e2565b9291505056fea2646970667358221220810349cdf220b8a2f7e71e39211916948daeb2b0713dc3eca38aecc4adf28f0f64736f6c6343000811003300000000000000000000000080a31ce83b1eb76ec4c550d713136efa29701a40

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80631a89526614610051578063bc43cbaf1461006d578063f9f92be41461008b578063fe575a87146100a7575b600080fd5b61006b600480360381019061006691906105ec565b6100d7565b005b6100756102f3565b6040516100829190610678565b60405180910390f35b6100a560048036038101906100a091906105ec565b610317565b005b6100c160048036038101906100bc91906105ec565b610534565b6040516100ce91906106ae565b60405180910390f35b7f00000000000000000000000080a31ce83b1eb76ec4c550d713136efa29701a4073ffffffffffffffffffffffffffffffffffffffff166391d148547fc2c00bfde45aef08863c07b09d5ffc9e9ca5bd1f0f5398c36ae4a2b264de266f336040518363ffffffff1660e01b81526004016101529291906106f1565b602060405180830381865afa15801561016f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101939190610746565b6101c9576040517fb6e9522600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661025657806040517f9498322f00000000000000000000000000000000000000000000000000000000815260040161024d9190610773565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f117e3210bb9aa7d9baff172026820255c6f6c30ba8999d1c2fd88e2848137c4e60405160405180910390a250565b7f00000000000000000000000080a31ce83b1eb76ec4c550d713136efa29701a4081565b7f00000000000000000000000080a31ce83b1eb76ec4c550d713136efa29701a4073ffffffffffffffffffffffffffffffffffffffff166391d148547fc2c00bfde45aef08863c07b09d5ffc9e9ca5bd1f0f5398c36ae4a2b264de266f336040518363ffffffff1660e01b81526004016103929291906106f1565b602060405180830381865afa1580156103af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d39190610746565b610409576040517fb6e9522600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561049757806040517f9c6aaf2900000000000000000000000000000000000000000000000000000000815260040161048e9190610773565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b85560405160405180910390a250565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105b98261058e565b9050919050565b6105c9816105ae565b81146105d457600080fd5b50565b6000813590506105e6816105c0565b92915050565b60006020828403121561060257610601610589565b5b6000610610848285016105d7565b91505092915050565b6000819050919050565b600061063e6106396106348461058e565b610619565b61058e565b9050919050565b600061065082610623565b9050919050565b600061066282610645565b9050919050565b61067281610657565b82525050565b600060208201905061068d6000830184610669565b92915050565b60008115159050919050565b6106a881610693565b82525050565b60006020820190506106c3600083018461069f565b92915050565b6000819050919050565b6106dc816106c9565b82525050565b6106eb816105ae565b82525050565b600060408201905061070660008301856106d3565b61071360208301846106e2565b9392505050565b61072381610693565b811461072e57600080fd5b50565b6000815190506107408161071a565b92915050565b60006020828403121561075c5761075b610589565b5b600061076a84828501610731565b91505092915050565b600060208201905061078860008301846106e2565b9291505056fea2646970667358221220810349cdf220b8a2f7e71e39211916948daeb2b0713dc3eca38aecc4adf28f0f64736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000080a31ce83b1eb76ec4c550d713136efa29701a40

-----Decoded View---------------
Arg [0] : _accessController (address): 0x80A31CE83B1Eb76Ec4c550D713136EfA29701A40

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000080a31ce83b1eb76ec4c550d713136efa29701a40


Block Transaction Gas Used Reward
view all blocks sequenced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.