More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 1,227 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Approve | 21026942 | 12 days ago | IN | 0 ETH | 0.00022937 | ||||
Approve | 21003344 | 15 days ago | IN | 0 ETH | 0.00031579 | ||||
Transfer | 20933985 | 25 days ago | IN | 0 ETH | 0.00050814 | ||||
Approve | 20881596 | 32 days ago | IN | 0 ETH | 0.00016375 | ||||
Approve | 20868397 | 34 days ago | IN | 0 ETH | 0.00082808 | ||||
Approve | 20848381 | 37 days ago | IN | 0 ETH | 0.00016967 | ||||
Approve | 20843046 | 38 days ago | IN | 0 ETH | 0.00048179 | ||||
Approve | 20842693 | 38 days ago | IN | 0 ETH | 0.00048675 | ||||
Approve | 20842506 | 38 days ago | IN | 0 ETH | 0.00059203 | ||||
Approve | 20840853 | 38 days ago | IN | 0 ETH | 0.00040509 | ||||
Approve | 20840016 | 38 days ago | IN | 0 ETH | 0.00023168 | ||||
Approve | 20839457 | 38 days ago | IN | 0 ETH | 0.0003594 | ||||
Approve | 20839037 | 38 days ago | IN | 0 ETH | 0.00035713 | ||||
Approve | 20826517 | 40 days ago | IN | 0 ETH | 0.00060153 | ||||
Approve | 20695406 | 58 days ago | IN | 0 ETH | 0.00004846 | ||||
Permit | 20662800 | 63 days ago | IN | 0 ETH | 0.00028297 | ||||
Approve | 20539756 | 80 days ago | IN | 0 ETH | 0.00003142 | ||||
Permit | 20467127 | 90 days ago | IN | 0 ETH | 0.00018268 | ||||
Transfer | 20339581 | 108 days ago | IN | 0 ETH | 0.00039324 | ||||
Permit | 20321944 | 110 days ago | IN | 0 ETH | 0.00040661 | ||||
Approve | 20319586 | 111 days ago | IN | 0 ETH | 0.00035316 | ||||
Approve | 20303359 | 113 days ago | IN | 0 ETH | 0.00015164 | ||||
Approve | 20271981 | 117 days ago | IN | 0 ETH | 0.00011418 | ||||
Approve | 20234358 | 123 days ago | IN | 0 ETH | 0.00056848 | ||||
Approve | 20227299 | 124 days ago | IN | 0 ETH | 0.00063973 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
18877373 | 313 days ago | Contract Creation | 0 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
Contract Source Code (Solidity Standard Json-Input format)
// 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); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IBRC20Factory { function parameters() external view returns (string memory name, string memory symbol, uint8 decimals); }
{ "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
- No Contract Security Audit Submitted- Submit Audit Here
[{"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
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.