Verified contractPartialMIT
OG
Address0xce7eb1ad9e2e1c784ea05f7ea4a0fe625923d10a
- Balance
0 ETH
- Transactions
1,177
- Compiler
solc 0.8.26
- Same code
Only this contract
Details
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- Via IR
- yes
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,147,432
- Creation transaction
- 0x091cf7f8c7…c23cdfb946
src/OG.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
/// @notice Fixed launch supply. Burning is an ordinary transfer to DEAD, never a supply reduction.
contract OG {
string public constant name = "OG";
string public constant symbol = "OG";
uint8 public constant decimals = 18;
uint256 public constant totalSupply = 1_000_000_000 ether;
address public constant DEAD = 0x000000000000000000000000000000000000dEaD;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
uint256 public totalBurned;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
error ZeroAddress();
constructor() {
balanceOf[msg.sender] = totalSupply;
emit Transfer(address(0), msg.sender, totalSupply);
}
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) {
_transfer(msg.sender, to, amount);
return true;
}
function transferFrom(address from, address to, uint256 amount) external returns (bool) {
uint256 approved = allowance[from][msg.sender];
if (approved != type(uint256).max) allowance[from][msg.sender] = approved - amount;
_transfer(from, to, amount);
return true;
}
function _transfer(address from, address to, uint256 amount) internal {
if (to == address(0)) revert ZeroAddress();
balanceOf[from] -= amount;
balanceOf[to] += amount;
if (to == DEAD) totalBurned += amount;
emit Transfer(from, to, amount);
}
}
Compiler settingsShow
{
"viaIR": true,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "none",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"v4-core/=lib/v4-core/",
"forge-std/=lib/forge-std/src/",
"solmate/=lib/solmate/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.