Balance
0 $ZTH
Type
Token
Transactions
58
Name
Orbit
Symbol
ORBT
Decimals
18
Total Supply
100,000 ORBT
This contract's methods and events are decoded across the explorer.
Prefer source verification? Verify from Foundry or Hardhat against the Etherscan-compatible API to publish the full source too.
This contract delegates calls to an implementation contract. Its methods and events are read via the implementation's ABI.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
contract RoyaToken {
string public name;
string public symbol;
uint8 public constant decimals = 18;
uint256 public totalSupply;
bool private initialized;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function initialize(string calldata name_, string calldata symbol_, uint256 supply) external {
require(!initialized, "already initialized");
initialized = true;
require(supply > 0, "zero supply");
name = name_;
symbol = symbol_;
totalSupply = supply;
balanceOf[msg.sender] = supply;
emit Transfer(address(0), msg.sender, supply);
}
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) {
_move(msg.sender, to, value);
return true;
}
function transferFrom(address from, address to, uint256 value) external returns (bool) {
uint256 allowed = allowance[from][msg.sender];
require(allowed >= value, "insufficient allowance");
if (allowed != type(uint256).max) {
allowance[from][msg.sender] = allowed - value;
}
_move(from, to, value);
return true;
}
function burn(uint256 amount) external {
require(balanceOf[msg.sender] >= amount, "insufficient balance");
balanceOf[msg.sender] -= amount;
totalSupply -= amount;
emit Transfer(msg.sender, address(0), amount);
}
function _move(address from, address to, uint256 value) internal {
require(balanceOf[from] >= value, "insufficient balance");
balanceOf[from] -= value;
balanceOf[to] += value;
emit Transfer(from, to, value);
}
}
No transactions found
This address has no recorded transactions yet