Contract Source Code:
File 1 of 1 : TheLostHex
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;
// ロストヘックス
// The Lost Hex is made up of many hexagonal plates.
// Each of them is a piece of land or sea.
// They are either connected to each other or separated by large gaps.
// Together, they form somewhat of an incomplete sphere.
// The Lost Hex also has no nucleus, as the continent has only an empty space in its center.
// However, despite what its appearance might imply, it is not an independent planet, but rather one of the satellites that orbit Earth.
contract TheLostHex {
string public name = "TheLostHex";
string public symbol = "TLH";// // //\ /\ //\ .//
uint8 public decimals = 18;// /////\ //°//\//\ .//.//.
uint256 public totalSupply;// // // ///\
mapping(address => uint256) private balances; //
mapping(address => mapping(address => uint256)) private allowances; //
//
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
constructor() {
totalSupply = 100000000000000000 * 10 ** uint256(decimals);
balances[msg.sender] = totalSupply;
emit Transfer(address(0), msg.sender, totalSupply);
}
function balanceOf(address account) public view returns (uint256) {
return balances[account];
}
function transfer(address recipient, uint256 amount) public returns (bool) {
require(balances[msg.sender] >= amount, "Not enough tokens");
_transfer(msg.sender, recipient, amount);
return true;
}
function approve(address spender, uint256 amount) public returns (bool) {
allowances[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function allowance(address owner, address spender) public view returns (uint256) {
return allowances[owner][spender];
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
require(balances[sender] >= amount, "Not enough tokens");
require(allowances[sender][msg.sender] >= amount, "Transfer amount exceeds allowance");
allowances[sender][msg.sender] -= amount;
_transfer(sender, recipient, amount);
return true;
}
function _transfer(address from, address to, uint256 amount) internal {
require(to != address(0), "Cannot transfer to zero address");
balances[from] -= amount;
balances[to] += amount;
emit Transfer(from, to, amount);
}
}
// https://dweb.link/ipfs/QmNxiiRWEQEUkfGC6TpGYDPaHSGkxtKxQfzoceuLRX7AR4