ETH Price: $2,384.23 (-3.43%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Approve210269422024-10-23 7:58:1112 days ago1729670291IN
0xBb881a71...E3872Bc24
0 ETH0.000229379.5
Approve210033442024-10-20 0:56:2315 days ago1729385783IN
0xBb881a71...E3872Bc24
0 ETH0.000315796.79809291
Transfer209339852024-10-10 8:22:2325 days ago1728548543IN
0xBb881a71...E3872Bc24
0 ETH0.0005081410.92030215
Approve208815962024-10-03 1:07:1132 days ago1727917631IN
0xBb881a71...E3872Bc24
0 ETH0.000163756.76548613
Approve208683972024-10-01 4:56:4734 days ago1727758607IN
0xBb881a71...E3872Bc24
0 ETH0.0008280831.60038593
Approve208483812024-09-28 9:57:2337 days ago1727517443IN
0xBb881a71...E3872Bc24
0 ETH0.000169677.01006771
Approve208430462024-09-27 16:06:2338 days ago1727453183IN
0xBb881a71...E3872Bc24
0 ETH0.0004817919.90481088
Approve208426932024-09-27 14:55:2338 days ago1727448923IN
0xBb881a71...E3872Bc24
0 ETH0.0004867520.10986019
Approve208425062024-09-27 14:17:5938 days ago1727446679IN
0xBb881a71...E3872Bc24
0 ETH0.0005920324.45924467
Approve208408532024-09-27 8:46:2338 days ago1727426783IN
0xBb881a71...E3872Bc24
0 ETH0.0004050916.73615776
Approve208400162024-09-27 5:58:1138 days ago1727416691IN
0xBb881a71...E3872Bc24
0 ETH0.000231689.57198865
Approve208394572024-09-27 4:05:5938 days ago1727409959IN
0xBb881a71...E3872Bc24
0 ETH0.000359414.84826173
Approve208390372024-09-27 2:41:3538 days ago1727404895IN
0xBb881a71...E3872Bc24
0 ETH0.0003571314.79126353
Approve208265172024-09-25 8:45:5940 days ago1727253959IN
0xBb881a71...E3872Bc24
0 ETH0.0006015324.85150296
Approve206954062024-09-07 1:23:1158 days ago1725672191IN
0xBb881a71...E3872Bc24
0 ETH0.000048461.85377186
Permit206628002024-09-02 12:11:3563 days ago1725279095IN
0xBb881a71...E3872Bc24
0 ETH0.000282975.00910164
Approve205397562024-08-16 7:39:5980 days ago1723793999IN
0xBb881a71...E3872Bc24
0 ETH0.000031421.2981704
Permit204671272024-08-06 4:25:5990 days ago1722918359IN
0xBb881a71...E3872Bc24
0 ETH0.000182683.23525333
Transfer203395812024-07-19 9:08:35108 days ago1721380115IN
0xBb881a71...E3872Bc24
0 ETH0.000393247.66074618
Permit203219442024-07-16 22:04:47110 days ago1721167487IN
0xBb881a71...E3872Bc24
0 ETH0.0004066110.32219895
Approve203195862024-07-16 14:11:47111 days ago1721139107IN
0xBb881a71...E3872Bc24
0 ETH0.0003531614.59052645
Approve203033592024-07-14 7:50:23113 days ago1720943423IN
0xBb881a71...E3872Bc24
0 ETH0.000151643.26185065
Approve202719812024-07-09 22:41:11117 days ago1720564871IN
0xBb881a71...E3872Bc24
0 ETH0.000114184.71725999
Approve202343582024-07-04 16:31:35123 days ago1720110695IN
0xBb881a71...E3872Bc24
0 ETH0.0005684812.22847321
Approve202272992024-07-03 16:53:23124 days ago1720025603IN
0xBb881a71...E3872Bc24
0 ETH0.0006397313.86479831
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
188773732023-12-27 13:44:23313 days ago1703684663  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x38e382F7...f5951DE93
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
BRC20

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion
File 1 of 2 : BRC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./interfaces/IBRC20Factory.sol";


contract BRC20 {
    string public name;
    string public symbol;
    uint8 public immutable decimals;
    address public immutable factory;
    uint256  public totalSupply;
    mapping (address => uint256) public balanceOf;
    mapping (address => mapping(address => uint256)) public allowance;
    mapping (address => uint256) public nonces;

    bytes32 public DOMAIN_SEPARATOR;
    bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

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

    constructor() {
        (name, symbol, decimals) = IBRC20Factory(msg.sender).parameters();

        factory = msg.sender;

        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        DOMAIN_SEPARATOR = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes('1')), chainId, address(this)));
    }

    function mint(address to, uint256 amount) external {
        require(msg.sender == factory, "unauthorized");
        _mint(to, amount);
    }

    function burn(uint256 amount) external {
        require(msg.sender == factory, "unauthorized");
        _burn(msg.sender, amount);
    }

    function approve(address spender, uint256 amount) external returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

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

        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);
        return true;
    }

    function transferFrom(address from, address to, uint256 amount) external returns (bool) {
        uint256 allowed = allowance[from][msg.sender];

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);
        return true;
    }

    function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external {
        require(deadline >= block.timestamp, 'EXPIRED');
        unchecked {
            bytes32 digest = keccak256(
                abi.encodePacked(
                    '\x19\x01',
                    DOMAIN_SEPARATOR,
                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
                )
            );
            address recoveredAddress = ecrecover(digest, v, r, s);
            require(recoveredAddress != address(0) && recoveredAddress == owner, 'INVALID_SIGNATURE');
            allowance[recoveredAddress][spender] = value;
        }
        emit Approval(owner, spender, value);
    }

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

        unchecked {
            balanceOf[to] += amount;
        }

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

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

        unchecked {
            totalSupply -= amount;
        }

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

File 2 of 2 : IBRC20Factory.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;


interface IBRC20Factory {
    function parameters() external view returns (string memory name, string memory symbol, uint8 decimals);
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

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":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"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":"amount","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":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","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":"amount","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":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806340c10f19116100a257806395d89b411161007157806395d89b4114610273578063a9059cbb1461027b578063c45a01551461028e578063d505accf146102cd578063dd62ed3e146102e057600080fd5b806340c10f191461020b57806342966c681461022057806370a08231146102335780637ecebe001461025357600080fd5b806323b872dd116100de57806323b872dd1461018f57806330adf81f146101a2578063313ce567146101c95780633644e5151461020257600080fd5b806306fdde0314610110578063095ea7b31461012e57806318160ddd1461015157806320606b7014610168575b600080fd5b61011861030b565b6040516101259190610938565b60405180910390f35b61014161013c3660046109a9565b610399565b6040519015158152602001610125565b61015a60025481565b604051908152602001610125565b61015a7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b61014161019d3660046109d3565b610405565b61015a7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6101f07f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610125565b61015a60065481565b61021e6102193660046109a9565b6104e5565b005b61021e61022e366004610a0f565b61055f565b61015a610241366004610a28565b60036020526000908152604090205481565b61015a610261366004610a28565b60056020526000908152604090205481565b6101186105d3565b6101416102893660046109a9565b6105e0565b6102b57f000000000000000000000000861e3c82bc2753ea64ae5f962d993df6853a670081565b6040516001600160a01b039091168152602001610125565b61021e6102db366004610a4a565b610646565b61015a6102ee366004610abd565b600460209081526000928352604080842090915290825290205481565b6000805461031890610af0565b80601f016020809104026020016040519081016040528092919081815260200182805461034490610af0565b80156103915780601f1061036657610100808354040283529160200191610391565b820191906000526020600020905b81548152906001019060200180831161037457829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103f49086815260200190565b60405180910390a350600192915050565b6001600160a01b038316600090815260046020908152604080832033845290915281205460001981146104615761043c8382610b41565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b03851660009081526003602052604081208054859290610489908490610b41565b90915550506001600160a01b0380851660008181526003602052604090819020805487019055519091871690600080516020610b71833981519152906104d29087815260200190565b60405180910390a3506001949350505050565b336001600160a01b037f000000000000000000000000861e3c82bc2753ea64ae5f962d993df6853a670016146105515760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b60448201526064015b60405180910390fd5b61055b828261087c565b5050565b336001600160a01b037f000000000000000000000000861e3c82bc2753ea64ae5f962d993df6853a670016146105c65760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b6044820152606401610548565b6105d033826108d6565b50565b6001805461031890610af0565b33600090815260036020526040812080548391908390610601908490610b41565b90915550506001600160a01b03831660008181526003602052604090819020805485019055513390600080516020610b71833981519152906103f49086815260200190565b428410156106805760405162461bcd60e51b81526020600482015260076024820152661156141254915160ca1b6044820152606401610548565b6006546001600160a01b0388811660008181526005602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e280820193601f1981019281900390910190855afa15801561079b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906107d15750886001600160a01b0316816001600160a01b0316145b6108115760405162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b6044820152606401610548565b6001600160a01b0390811660009081526004602090815260408083208b8516808552908352928190208a905551898152919350918a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b806002600082825461088e9190610b58565b90915550506001600160a01b038216600081815260036020908152604080832080548601905551848152600080516020610b7183398151915291015b60405180910390a35050565b6001600160a01b038216600090815260036020526040812080548392906108fe908490610b41565b90915550506002805482900390556040518181526000906001600160a01b03841690600080516020610b71833981519152906020016108ca565b600060208083528351808285015260005b8181101561096557858101830151858201604001528201610949565b81811115610977576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146109a457600080fd5b919050565b600080604083850312156109bc57600080fd5b6109c58361098d565b946020939093013593505050565b6000806000606084860312156109e857600080fd5b6109f18461098d565b92506109ff6020850161098d565b9150604084013590509250925092565b600060208284031215610a2157600080fd5b5035919050565b600060208284031215610a3a57600080fd5b610a438261098d565b9392505050565b600080600080600080600060e0888a031215610a6557600080fd5b610a6e8861098d565b9650610a7c6020890161098d565b95506040880135945060608801359350608088013560ff81168114610aa057600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215610ad057600080fd5b610ad98361098d565b9150610ae76020840161098d565b90509250929050565b600181811c90821680610b0457607f821691505b60208210811415610b2557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015610b5357610b53610b2b565b500390565b60008219821115610b6b57610b6b610b2b565b50019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220bd970baf35e6ee350dce926148c16dab64454197f76b517f1450206554d0a6c664736f6c634300080c0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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
Loading...
Loading
[ Download: CSV Export  ]
[ 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.