ETH Price: $3,897.59 (+0.35%)

Token

ERC-20: BoneShards (BONESHARDS)
 

Overview

Max Total Supply

39,814.08416699999999 BONESHARDS

Holders

515

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Filtered by Token Holder
intensity.eth
Balance
7 BONESHARDS

Value
$0.00
0x2dDDe30552089Dc7F0645Ac703F7D5eDeb25FFa0
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:
BoneShards

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : BoneShards.sol
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// Taken from Solmate: https://github.com/Rari-Capital/solmate

contract BoneShards {
    /*///////////////////////////////////////////////////////////////
                                  EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /*///////////////////////////////////////////////////////////////
                             METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public constant name     = "BoneShards";
    string public constant symbol   = "BONESHARDS";
    uint8  public constant decimals = 18;

    /*///////////////////////////////////////////////////////////////
                             ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    mapping(address => bool) public isMinter;

    address public ruler;

    /*///////////////////////////////////////////////////////////////
                              ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    constructor() { ruler = msg.sender;}

    function approve(address spender, uint256 value) external returns (bool) {
        allowance[msg.sender][spender] = value;

        emit Approval(msg.sender, spender, value);

        return true;
    }

    function transfer(address to, uint256 value) external returns (bool) {
        balanceOf[msg.sender] -= value;

        // This is safe because the sum of all user
        // balances can't exceed type(uint256).max!
        unchecked {
            balanceOf[to] += value;
        }

        emit Transfer(msg.sender, to, value);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool) {
        if (allowance[from][msg.sender] != type(uint256).max) {
            allowance[from][msg.sender] -= value;
        }

        balanceOf[from] -= value;

        // This is safe because the sum of all user
        // balances can't exceed type(uint256).max!
        unchecked {
            balanceOf[to] += value;
        }

        emit Transfer(from, to, value);

        return true;
    }

    /*///////////////////////////////////////////////////////////////
                             ORC PRIVILEGE
    //////////////////////////////////////////////////////////////*/

    function mint(address to, uint256 value) external {
        require(isMinter[msg.sender], "FORBIDDEN TO MINT");
        _mint(to, value);
    }

    function burn(address from, uint256 value) external {
        require(isMinter[msg.sender], "FORBIDDEN TO BURN");
        _burn(from, value);
    }

    /*///////////////////////////////////////////////////////////////
                         Ruler Function
    //////////////////////////////////////////////////////////////*/

    function setMinter(address minter, bool status) external {
        require(msg.sender == ruler, "NOT ALLOWED TO RULE");

        isMinter[minter] = status;
    }

    function setRuler(address ruler_) external {
        require(msg.sender == ruler ||ruler == address(0), "NOT ALLOWED TO RULE");

        ruler = ruler_;
    }


    /*///////////////////////////////////////////////////////////////
                          INTERNAL UTILS
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 value) internal {
        totalSupply += value;

        // This is safe because the sum of all user
        // balances can't exceed type(uint256).max!
        unchecked {
            balanceOf[to] += value;
        }

        emit Transfer(address(0), to, value);
    }

    function _burn(address from, uint256 value) internal {
        balanceOf[from] -= value;

        // This is safe because a user won't ever
        // have a balance larger than totalSupply!
        unchecked {
            totalSupply -= value;
        }

        emit Transfer(from, address(0), value);
    }
}

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":"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":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ruler","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ruler_","type":"address"}],"name":"setRuler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50600480546001600160a01b031916331790556108fc806100326000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a9059cbb11610066578063a9059cbb1461024f578063aa271e1a14610262578063cf456ae714610285578063dd62ed3e1461029857600080fd5b806370a08231146101c857806395d89b41146101e85780639dc29fac14610211578063a51dd75d1461022457600080fd5b806323b872dd116100d357806323b872dd14610173578063313ce5671461018657806340c10f19146101a05780634fa4c5d7146101b557600080fd5b806306fdde03146100fa578063095ea7b31461013957806318160ddd1461015c575b600080fd5b6101236040518060400160405280600a815260200169426f6e6553686172647360b01b81525081565b604051610130919061080c565b60405180910390f35b61014c6101473660046107e2565b6102c3565b6040519015158152602001610130565b61016560005481565b604051908152602001610130565b61014c61018136600461076a565b61032f565b61018e601281565b60405160ff9091168152602001610130565b6101b36101ae3660046107e2565b610417565b005b6101b36101c3366004610715565b61047d565b6101656101d6366004610715565b60016020526000908152604090205481565b6101236040518060400160405280600a815260200169424f4e4553484152445360b01b81525081565b6101b361021f3660046107e2565b610503565b600454610237906001600160a01b031681565b6040516001600160a01b039091168152602001610130565b61014c61025d3660046107e2565b610560565b61014c610270366004610715565b60036020526000908152604090205460ff1681565b6101b36102933660046107a6565b6105c6565b6101656102a6366004610737565b600260209081526000928352604080842090915290825290205481565b3360008181526002602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061031e9086815260200190565b60405180910390a350600192915050565b6001600160a01b038316600090815260026020908152604080832033845290915281205460001914610394576001600160a01b03841660009081526002602090815260408083203384529091528120805484929061038e908490610879565b90915550505b6001600160a01b038416600090815260016020526040812080548492906103bc908490610879565b90915550506001600160a01b03808416600081815260016020526040908190208054860190555190918616906000805160206108a7833981519152906104059086815260200190565b60405180910390a35060019392505050565b3360009081526003602052604090205460ff1661046f5760405162461bcd60e51b81526020600482015260116024820152701193d4909251111153881513c813525395607a1b60448201526064015b60405180910390fd5b6104798282610641565b5050565b6004546001600160a01b031633148061049f57506004546001600160a01b0316155b6104e15760405162461bcd60e51b81526020600482015260136024820152724e4f5420414c4c4f57454420544f2052554c4560681b6044820152606401610466565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526003602052604090205460ff166105565760405162461bcd60e51b81526020600482015260116024820152702327a92124a22222a7102a2790212aa92760791b6044820152606401610466565b610479828261069a565b33600090815260016020526040812080548391908390610581908490610879565b90915550506001600160a01b038316600081815260016020526040908190208054850190555133906000805160206108a78339815191529061031e9086815260200190565b6004546001600160a01b031633146106165760405162461bcd60e51b81526020600482015260136024820152724e4f5420414c4c4f57454420544f2052554c4560681b6044820152606401610466565b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b806000808282546106529190610861565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481526000805160206108a783398151915291015b60405180910390a35050565b6001600160a01b038216600090815260016020526040812080548392906106c2908490610879565b90915550506000805482900381556040518281526001600160a01b038416906000805160206108a78339815191529060200161068e565b80356001600160a01b038116811461071057600080fd5b919050565b60006020828403121561072757600080fd5b610730826106f9565b9392505050565b6000806040838503121561074a57600080fd5b610753836106f9565b9150610761602084016106f9565b90509250929050565b60008060006060848603121561077f57600080fd5b610788846106f9565b9250610796602085016106f9565b9150604084013590509250925092565b600080604083850312156107b957600080fd5b6107c2836106f9565b9150602083013580151581146107d757600080fd5b809150509250929050565b600080604083850312156107f557600080fd5b6107fe836106f9565b946020939093013593505050565b600060208083528351808285015260005b818110156108395785810183015185820160400152820161081d565b8181111561084b576000604083870101525b50601f01601f1916929092016040019392505050565b6000821982111561087457610874610890565b500190565b60008282101561088b5761088b610890565b500390565b634e487b7160e01b600052601160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220773596c49a42df5dda9e20d260a87487e14ac8629911d8fd3c5f6173a119597264736f6c63430008070033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a9059cbb11610066578063a9059cbb1461024f578063aa271e1a14610262578063cf456ae714610285578063dd62ed3e1461029857600080fd5b806370a08231146101c857806395d89b41146101e85780639dc29fac14610211578063a51dd75d1461022457600080fd5b806323b872dd116100d357806323b872dd14610173578063313ce5671461018657806340c10f19146101a05780634fa4c5d7146101b557600080fd5b806306fdde03146100fa578063095ea7b31461013957806318160ddd1461015c575b600080fd5b6101236040518060400160405280600a815260200169426f6e6553686172647360b01b81525081565b604051610130919061080c565b60405180910390f35b61014c6101473660046107e2565b6102c3565b6040519015158152602001610130565b61016560005481565b604051908152602001610130565b61014c61018136600461076a565b61032f565b61018e601281565b60405160ff9091168152602001610130565b6101b36101ae3660046107e2565b610417565b005b6101b36101c3366004610715565b61047d565b6101656101d6366004610715565b60016020526000908152604090205481565b6101236040518060400160405280600a815260200169424f4e4553484152445360b01b81525081565b6101b361021f3660046107e2565b610503565b600454610237906001600160a01b031681565b6040516001600160a01b039091168152602001610130565b61014c61025d3660046107e2565b610560565b61014c610270366004610715565b60036020526000908152604090205460ff1681565b6101b36102933660046107a6565b6105c6565b6101656102a6366004610737565b600260209081526000928352604080842090915290825290205481565b3360008181526002602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061031e9086815260200190565b60405180910390a350600192915050565b6001600160a01b038316600090815260026020908152604080832033845290915281205460001914610394576001600160a01b03841660009081526002602090815260408083203384529091528120805484929061038e908490610879565b90915550505b6001600160a01b038416600090815260016020526040812080548492906103bc908490610879565b90915550506001600160a01b03808416600081815260016020526040908190208054860190555190918616906000805160206108a7833981519152906104059086815260200190565b60405180910390a35060019392505050565b3360009081526003602052604090205460ff1661046f5760405162461bcd60e51b81526020600482015260116024820152701193d4909251111153881513c813525395607a1b60448201526064015b60405180910390fd5b6104798282610641565b5050565b6004546001600160a01b031633148061049f57506004546001600160a01b0316155b6104e15760405162461bcd60e51b81526020600482015260136024820152724e4f5420414c4c4f57454420544f2052554c4560681b6044820152606401610466565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526003602052604090205460ff166105565760405162461bcd60e51b81526020600482015260116024820152702327a92124a22222a7102a2790212aa92760791b6044820152606401610466565b610479828261069a565b33600090815260016020526040812080548391908390610581908490610879565b90915550506001600160a01b038316600081815260016020526040908190208054850190555133906000805160206108a78339815191529061031e9086815260200190565b6004546001600160a01b031633146106165760405162461bcd60e51b81526020600482015260136024820152724e4f5420414c4c4f57454420544f2052554c4560681b6044820152606401610466565b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b806000808282546106529190610861565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481526000805160206108a783398151915291015b60405180910390a35050565b6001600160a01b038216600090815260016020526040812080548392906106c2908490610879565b90915550506000805482900381556040518281526001600160a01b038416906000805160206108a78339815191529060200161068e565b80356001600160a01b038116811461071057600080fd5b919050565b60006020828403121561072757600080fd5b610730826106f9565b9392505050565b6000806040838503121561074a57600080fd5b610753836106f9565b9150610761602084016106f9565b90509250929050565b60008060006060848603121561077f57600080fd5b610788846106f9565b9250610796602085016106f9565b9150604084013590509250925092565b600080604083850312156107b957600080fd5b6107c2836106f9565b9150602083013580151581146107d757600080fd5b809150509250929050565b600080604083850312156107f557600080fd5b6107fe836106f9565b946020939093013593505050565b600060208083528351808285015260005b818110156108395785810183015185820160400152820161081d565b8181111561084b576000604083870101525b50601f01601f1916929092016040019392505050565b6000821982111561087457610874610890565b500190565b60008282101561088b5761088b610890565b500390565b634e487b7160e01b600052601160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220773596c49a42df5dda9e20d260a87487e14ac8629911d8fd3c5f6173a119597264736f6c63430008070033

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.