ETH Price: $3,696.61 (+1.65%)
 

Overview

Max Total Supply

10,000,000,000 HOFF

Holders

242

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 8 Decimals)

Balance
2 HOFF

Value
$0.00
0x00016035a0799e579876d1102628927b20248392
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
HoffCoin

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : HoffCoin_flattened.sol
// SPDX-License-Identifier: None
// File: contracts/interfaces/IERC20.sol


// OpenZeppelin Contracts v4.3.2 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.9;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external returns (uint256 totalSupply);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Emitted when a transfer is made from a `owner` to the zero address
     * which will burn the tokens
     */
    event Burn(address indexed owner, uint256 value);


}
// File: contracts/interfaces/IERC20Metadata.sol


// OpenZeppelin Contracts v4.3.2 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.9;


/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
// File: contracts/ERC20.sol


// Modified version of OpenZeppelin Contracts v4.3.2 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.9;



/**
 * @dev Implementation of the {IERC20} interface.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 */
contract ERC20 is IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name}, {symbol} and {decimals} and mints {supply} to {mintAddress}
     *
     * All of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(
        string memory name_, 
        string memory symbol_, 
        uint8 decimals_, 
        uint256 supply_, 
        address mintAddress_
        ) {
            _name = name_;
            _symbol = symbol_;
            _decimals = decimals_;
            _balances[mintAddress_] = supply_;
            _totalSupply = supply_;

            emit Transfer(address(0), mintAddress_, supply_);
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory name_) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory symbol_) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8 decimals_) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256 totalSupply_) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256 balance_) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address _recipient, uint256 _amount) public virtual override returns (bool _success) {
        _transfer(msg.sender, _recipient, _amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256 allowance_) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool result_) {
        _approve(msg.sender, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool result) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][msg.sender];
        require(currentAllowance >= amount, "ERC20:transferFrom: transfer amount exceeds allowance");
        _approve(sender, msg.sender, currentAllowance - amount);

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * If the token is sent to the zero address it is simply burned
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20:_transfer: cannot transfer from the zero address");
        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20:_tranfser: amount exceeds balance");

        if (recipient == address(0)) {
            _balances[sender] = senderBalance - amount;
            _totalSupply = _totalSupply - amount;
            emit Burn(sender, amount);
            emit Transfer(sender, address(0), amount);

        } else if (recipient != address(0)) {

            _balances[sender] = senderBalance - amount;
            _balances[recipient] += amount;
            emit Transfer(sender, recipient, amount);
        }
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(spender != address(0), "ERC20:_approve: cannot approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

}
// File: contracts/HoffCoin.sol


pragma solidity ^0.8.9;

contract HoffCoinConfig is ERC20 {

    string internal constant TOKEN_SYMBOL = "HOFF";
    string internal constant TOKEN_NAME = "Hoff Coin";
    uint8 internal constant TOKEN_DECIMALS = 8;
    uint256 internal constant TOTAL_SUPPLY = 1000000000000000000;
    address internal constant INITIAL_MINT_ADDRESS = 0x8B1382A3BeC340cA91571293616f18c476949463;

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals,
        uint256 _totalSupply,
        address _mintAddress)
        ERC20(
            _name,
            _symbol,
            _decimals,
            _totalSupply,
            _mintAddress)
    {}
}


contract HoffCoin is HoffCoinConfig {

    constructor()
        HoffCoinConfig(
            TOKEN_NAME,
            TOKEN_SYMBOL,
            TOKEN_DECIMALS,
            TOTAL_SUPPLY,
            INITIAL_MINT_ADDRESS
        )
    {}
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"allowance_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"result_","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"decimals_","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"name_","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"totalSupply_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"_success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051806040016040528060098152602001682437b3331021b7b4b760b91b815250604051806040016040528060048152602001632427a32360e11b8152506008670de0b6b3a7640000738b1382a3bec340ca91571293616f18c4769494638484848484846003908051906020019061008b92919061010e565b50835161009f90600490602087019061010e565b506005805460ff191660ff85161790556001600160a01b0381166000818152602081815260408083208690556002869055518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050505050505050506101e2565b82805461011a906101a7565b90600052602060002090601f01602090048101928261013c5760008555610182565b82601f1061015557805160ff1916838001178555610182565b82800160010185558215610182579182015b82811115610182578251825591602001919060010190610167565b5061018e929150610192565b5090565b5b8082111561018e5760008155600101610193565b600181811c908216806101bb57607f821691505b602082108114156101dc57634e487b7160e01b600052602260045260246000fd5b50919050565b610829806101f16000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146100fe57806370a082311461011357806395d89b411461013c578063a9059cbb14610144578063dd62ed3e1461015757600080fd5b806306fdde0314610098578063095ea7b3146100b657806318160ddd146100d957806323b872dd146100eb575b600080fd5b6100a0610190565b6040516100ad9190610647565b60405180910390f35b6100c96100c43660046106b8565b610222565b60405190151581526020016100ad565b6002545b6040519081526020016100ad565b6100c96100f93660046106e2565b610238565b60055460405160ff90911681526020016100ad565b6100dd61012136600461071e565b6001600160a01b031660009081526020819052604090205490565b6100a06102fb565b6100c96101523660046106b8565b61030a565b6100dd610165366004610740565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461019f90610773565b80601f01602080910402602001604051908101604052809291908181526020018280546101cb90610773565b80156102185780601f106101ed57610100808354040283529160200191610218565b820191906000526020600020905b8154815290600101906020018083116101fb57829003601f168201915b5050505050905090565b600061022f338484610317565b50600192915050565b60006102458484846103e9565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156102dc5760405162461bcd60e51b815260206004820152603560248201527f45524332303a7472616e7366657246726f6d3a207472616e7366657220616d6f604482015274756e74206578636565647320616c6c6f77616e636560581b60648201526084015b60405180910390fd5b6102f085336102eb86856107c4565b610317565b506001949350505050565b60606004805461019f90610773565b600061022f3384846103e9565b6001600160a01b0382166103885760405162461bcd60e51b815260206004820152603260248201527f45524332303a5f617070726f76653a2063616e6e6f7420617070726f766520746044820152716f20746865207a65726f206164647265737360701b60648201526084016102d3565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661045e5760405162461bcd60e51b815260206004820152603660248201527f45524332303a5f7472616e736665723a2063616e6e6f74207472616e736665726044820152752066726f6d20746865207a65726f206164647265737360501b60648201526084016102d3565b6001600160a01b038316600090815260208190526040902054818110156104d75760405162461bcd60e51b815260206004820152602760248201527f45524332303a5f7472616e667365723a20616d6f756e7420657863656564732060448201526662616c616e636560c81b60648201526084016102d3565b6001600160a01b03831661059d576104ef82826107c4565b6001600160a01b0385166000908152602081905260409020556002546105169083906107c4565b6002556040518281526001600160a01b038516907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a26040518281526000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610641565b6001600160a01b03831615610641576105b682826107c4565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906105ec9084906107db565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161063891815260200190565b60405180910390a35b50505050565b600060208083528351808285015260005b8181101561067457858101830151858201604001528201610658565b81811115610686576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146106b357600080fd5b919050565b600080604083850312156106cb57600080fd5b6106d48361069c565b946020939093013593505050565b6000806000606084860312156106f757600080fd5b6107008461069c565b925061070e6020850161069c565b9150604084013590509250925092565b60006020828403121561073057600080fd5b6107398261069c565b9392505050565b6000806040838503121561075357600080fd5b61075c8361069c565b915061076a6020840161069c565b90509250929050565b600181811c9082168061078757607f821691505b602082108114156107a857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156107d6576107d66107ae565b500390565b600082198211156107ee576107ee6107ae565b50019056fea2646970667358221220c21e2d314c7ba1ff0c937a48e74a83ed3da8e4549efbbcabfc1b18fce463989a64736f6c63430008090033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146100fe57806370a082311461011357806395d89b411461013c578063a9059cbb14610144578063dd62ed3e1461015757600080fd5b806306fdde0314610098578063095ea7b3146100b657806318160ddd146100d957806323b872dd146100eb575b600080fd5b6100a0610190565b6040516100ad9190610647565b60405180910390f35b6100c96100c43660046106b8565b610222565b60405190151581526020016100ad565b6002545b6040519081526020016100ad565b6100c96100f93660046106e2565b610238565b60055460405160ff90911681526020016100ad565b6100dd61012136600461071e565b6001600160a01b031660009081526020819052604090205490565b6100a06102fb565b6100c96101523660046106b8565b61030a565b6100dd610165366004610740565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461019f90610773565b80601f01602080910402602001604051908101604052809291908181526020018280546101cb90610773565b80156102185780601f106101ed57610100808354040283529160200191610218565b820191906000526020600020905b8154815290600101906020018083116101fb57829003601f168201915b5050505050905090565b600061022f338484610317565b50600192915050565b60006102458484846103e9565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156102dc5760405162461bcd60e51b815260206004820152603560248201527f45524332303a7472616e7366657246726f6d3a207472616e7366657220616d6f604482015274756e74206578636565647320616c6c6f77616e636560581b60648201526084015b60405180910390fd5b6102f085336102eb86856107c4565b610317565b506001949350505050565b60606004805461019f90610773565b600061022f3384846103e9565b6001600160a01b0382166103885760405162461bcd60e51b815260206004820152603260248201527f45524332303a5f617070726f76653a2063616e6e6f7420617070726f766520746044820152716f20746865207a65726f206164647265737360701b60648201526084016102d3565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661045e5760405162461bcd60e51b815260206004820152603660248201527f45524332303a5f7472616e736665723a2063616e6e6f74207472616e736665726044820152752066726f6d20746865207a65726f206164647265737360501b60648201526084016102d3565b6001600160a01b038316600090815260208190526040902054818110156104d75760405162461bcd60e51b815260206004820152602760248201527f45524332303a5f7472616e667365723a20616d6f756e7420657863656564732060448201526662616c616e636560c81b60648201526084016102d3565b6001600160a01b03831661059d576104ef82826107c4565b6001600160a01b0385166000908152602081905260409020556002546105169083906107c4565b6002556040518281526001600160a01b038516907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a26040518281526000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610641565b6001600160a01b03831615610641576105b682826107c4565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906105ec9084906107db565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161063891815260200190565b60405180910390a35b50505050565b600060208083528351808285015260005b8181101561067457858101830151858201604001528201610658565b81811115610686576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146106b357600080fd5b919050565b600080604083850312156106cb57600080fd5b6106d48361069c565b946020939093013593505050565b6000806000606084860312156106f757600080fd5b6107008461069c565b925061070e6020850161069c565b9150604084013590509250925092565b60006020828403121561073057600080fd5b6107398261069c565b9392505050565b6000806040838503121561075357600080fd5b61075c8361069c565b915061076a6020840161069c565b90509250929050565b600181811c9082168061078757607f821691505b602082108114156107a857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156107d6576107d66107ae565b500390565b600082198211156107ee576107ee6107ae565b50019056fea2646970667358221220c21e2d314c7ba1ff0c937a48e74a83ed3da8e4549efbbcabfc1b18fce463989a64736f6c63430008090033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.