ETH Price: $3,416.06 (+3.64%)

Contract

0x20fCefA41045080764C48C2b9429e44C644e5deA
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Approve212302292024-11-20 16:46:232 days ago1732121183IN
0x20fCefA4...C644e5deA
0 ETH0.0005553323
Transfer212288792024-11-20 12:13:593 days ago1732104839IN
0x20fCefA4...C644e5deA
0 ETH0.0005760212.37587889
Approve212276962024-11-20 8:16:113 days ago1732090571IN
0x20fCefA4...C644e5deA
0 ETH0.000238189.84045301
Approve212098512024-11-17 20:35:115 days ago1731875711IN
0x20fCefA4...C644e5deA
0 ETH0.0002607410.79932461
Transfer212004362024-11-16 13:03:597 days ago1731762239IN
0x20fCefA4...C644e5deA
0 ETH0.0005493611.8
Approve211415452024-11-08 7:51:5915 days ago1731052319IN
0x20fCefA4...C644e5deA
0 ETH0.0004814310.35587992
Transfer211267942024-11-06 6:22:5917 days ago1730874179IN
0x20fCefA4...C644e5deA
0 ETH0.0012083925.96249928
Approve211221552024-11-05 14:50:2317 days ago1730818223IN
0x20fCefA4...C644e5deA
0 ETH0.0004557418.87538279
Approve210506902024-10-26 15:28:3527 days ago1729956515IN
0x20fCefA4...C644e5deA
0 ETH0.00020018.2669452
Approve210352242024-10-24 11:41:2330 days ago1729770083IN
0x20fCefA4...C644e5deA
0 ETH0.0002571710.62488205
Approve209832192024-10-17 5:33:1137 days ago1729143191IN
0x20fCefA4...C644e5deA
0 ETH0.000188887.80340477
Approve209757502024-10-16 4:31:2338 days ago1729053083IN
0x20fCefA4...C644e5deA
0 ETH0.0005388311.59060105
Approve209658102024-10-14 19:11:3539 days ago1728933095IN
0x20fCefA4...C644e5deA
0 ETH0.0014589331.55349013
Approve209415922024-10-11 9:49:4743 days ago1728640187IN
0x20fCefA4...C644e5deA
0 ETH0.0006668614.42644387
Approve209171612024-10-08 0:06:1146 days ago1728345971IN
0x20fCefA4...C644e5deA
0 ETH0.0034866775
Approve209111632024-10-07 4:02:5947 days ago1728273779IN
0x20fCefA4...C644e5deA
0 ETH0.000193567.28004853
Approve209111622024-10-07 4:02:4747 days ago1728273767IN
0x20fCefA4...C644e5deA
0 ETH0.000344017.4
Approve209084902024-10-06 19:05:3547 days ago1728241535IN
0x20fCefA4...C644e5deA
0 ETH0.000253085.44402874
Approve209065622024-10-06 12:38:5948 days ago1728218339IN
0x20fCefA4...C644e5deA
0 ETH0.000398018.572592
Approve209036932024-10-06 3:02:2348 days ago1728183743IN
0x20fCefA4...C644e5deA
0 ETH0.000172757.1548688
Approve208846622024-10-03 11:22:3551 days ago1727954555IN
0x20fCefA4...C644e5deA
0 ETH0.000238755.13576729
Approve208844572024-10-03 10:41:2351 days ago1727952083IN
0x20fCefA4...C644e5deA
0 ETH0.000245535.31173326
Approve208513962024-09-28 20:02:5955 days ago1727553779IN
0x20fCefA4...C644e5deA
0 ETH0.0002655510.97094652
Approve208513962024-09-28 20:02:5955 days ago1727553779IN
0x20fCefA4...C644e5deA
0 ETH0.0002648910.97094652
Approve208513952024-09-28 20:02:4755 days ago1727553767IN
0x20fCefA4...C644e5deA
0 ETH0.0002926211.17198309
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
185897472023-11-17 6:14:23372 days ago1700201663  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.