Contract detail
SimpleToken
SimpleToken is a verified Robinhood Chain smart contract at 0xc6ac11c2…d7f4992e with 2 indexed transactions.
- Address type
- Smart contract
- Transactions
- 2
- First indexed block
- #28560913
- Latest indexed block
- #29521141
- Emitted events
- 6
- Token tracker
- UniFrog
- Verification
- Verified
- Compiler
- v0.8.20+commit.a1b79de6
- Verification match
- partial
- Creation transaction
- 0xe9bc8e98…46656219
- Created at block
- #28560913
- Language
- solidity
- EVM version
- shanghai
- License
- none
- Compiler optimization
- Enabled · 200 runs
Related activity
Transactions
| Transaction | Block | From | To | Value (wei) |
|---|---|---|---|---|
| 0x9e4e45d0…e3efa6e2 | #29521141 | 0xdf9f4199…28d84260 | 0xc6ac11c2…d7f4992e | 0 |
| 0x581ce779…52a207ba | #28560949 | 0xd692ac55…f0bda095 | 0xc6ac11c2…d7f4992e | 0 |
Verified contract
Contract source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/// @notice Plain ERC20 — fixed supply to deployer, no tax, no blacklist.
contract SimpleToken {
string public name;
string public symbol;
uint8 public constant decimals = 18;
uint256 public totalSupply;
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);
constructor(string memory name_, string memory symbol_, uint256 supply_) {
name = name_;
symbol = symbol_;
totalSupply = supply_;
balanceOf[msg.sender] = supply_;
emit Transfer(address(0), msg.sender, supply_);
}
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 allowed = allowance[from][msg.sender];
if (allowed != type(uint256).max) {
require(allowed >= amount, "ALLOWANCE");
allowance[from][msg.sender] = allowed - amount;
}
_transfer(from, to, amount);
return true;
}
function _transfer(address from, address to, uint256 amount) internal {
require(to != address(0), "ZERO");
uint256 bal = balanceOf[from];
require(bal >= amount, "BALANCE");
unchecked {
balanceOf[from] = bal - amount;
balanceOf[to] += amount;
}
emit Transfer(from, to, amount);
}
}