Balance
0 $ZTH
Type
Token
Transactions
11
Name
Zenith Farm Token
Symbol
ZFT
Decimals
18
Total Supply
154 ZFT
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.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract FarmToken {
string public name = "Zenith Farm Token";
string public symbol = "ZFT";
uint8 public 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);
function mint(address to, uint256 amount) external {
totalSupply += amount;
balanceOf[to] += amount;
emit Transfer(address(0), to, amount);
}
function transfer(address to, uint256 amount) external returns (bool) {
require(balanceOf[msg.sender] >= amount, "bal");
balanceOf[msg.sender] -= amount;
balanceOf[to] += amount;
emit Transfer(msg.sender, to, amount);
return true;
}
function approve(address sp, uint256 amount) external returns (bool) {
allowance[msg.sender][sp] = amount;
emit Approval(msg.sender, sp, amount);
return true;
}
function transferFrom(address f, address t, uint256 amount) external returns (bool) {
require(balanceOf[f] >= amount && allowance[f][msg.sender] >= amount, "no");
allowance[f][msg.sender] -= amount;
balanceOf[f] -= amount;
balanceOf[t] += amount;
emit Transfer(f, t, amount);
return true;
}
}| Tx Hash | Block | Direction | Counterparty | Value | Age |
|---|---|---|---|---|---|
| 0xaeff...bd14 | 436618 | IN | 0x13f4...e8de | 0 $ZTH | 7m 35s ago |
| 0x4083...89ac | 436615 | IN |
| 0x13f4...e8de |
| 0 $ZTH |
| 7m 46s ago |
| 0x5db7...0b40 | 436579 | IN | 0x1ed6...9319 | 0.0016 $ZTH | 11m 53s ago |
| 0xe940...8432 | 436473 | IN | 0x13f4...e8de | 0 $ZTH | 35m 12s ago |
| 0x4573...1e02 | 436472 | IN | 0x13f4...e8de | 0 $ZTH | 35m 24s ago |
| 0x05b2...68d0 | 436404 | IN | 0x13f4...e8de | 0 $ZTH | 54m 55s ago |
| 0x4aec...494e | 436403 | IN | 0x13f4...e8de | 0 $ZTH | 55m 6s ago |
| 0x50d2...26ec | 436306 | IN | 0x13f4...e8de | 0 $ZTH | 1h 17m ago |
| 0x233d...67db | 436304 | IN | 0x13f4...e8de | 0 $ZTH | 1h 17m ago |
| 0xde0b...236b | 436105 | IN | 0x13f4...e8de | 0 $ZTH | 1h 47m ago |
| 0xff0d...aa4c | 436103 | IN | 0x13f4...e8de | 0 $ZTH | 1h 47m ago |