Verified contractPartialMIT
GeodeToken
Address0x5cc34822d4d1e5c9cd40f8ff666335c1ef0fe0ba
- Balance
0 ETH
- Transactions
1,505
- Compiler
solc 0.8.27
- Same code
2 more contracts
Details
- Compiler
- solc 0.8.27+commit.40a35a09
- Language
- solidity
- Optimization
- Yes, 10 runs
- EVM version
- cancun
- Via IR
- yes
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 25,062,014
- Creation transaction
- 0x39681f79b0…c8b57e6577
src/GeodeToken.sol
// SPDX-License-Identifier: MIT
//
// ██████╗ ███████╗ ██████╗ ██████╗ ███████╗
// ██╔════╝ ██╔════╝██╔═══██╗██╔══██╗██╔════╝
// ██║ ███╗█████╗ ██║ ██║██║ ██║█████╗
// ██║ ██║██╔══╝ ██║ ██║██║ ██║██╔══╝
// ╚██████╔╝███████╗╚██████╔╝██████╔╝███████╗
// ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚══════╝
//
// Geode Protocol — Permanent Curve Venue on Uniswap v4
// https://geode.ag
//
pragma solidity ^0.8.26;
/// @title GeodeToken
/// @author Geode Protocol (https://geode.ag)
/// @notice Minimal ERC20 deployed by GeodeFactory for permissionless token launches.
/// @dev Full supply minted to a single recipient (the hook) at construction.
/// No admin keys, no upgradeability, no mint/burn post-construction, no transfer restrictions.
contract GeodeToken {
// ─── ERC20 Storage ──────────────────────────────────────────────────────────
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;
// ─── Events ─────────────────────────────────────────────────────────────────
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
// ─── Constructor ────────────────────────────────────────────────────────────
/// @notice Deploy token and mint full supply to recipient
/// @param _name Token name
/// @param _symbol Token symbol
/// @param _totalSupply Total supply to mint (18 decimals)
/// @param _recipient Address to receive the full supply (the GeodeHook)
constructor(
string memory _name,
string memory _symbol,
uint256 _totalSupply,
address _recipient
) {
name = _name;
symbol = _symbol;
totalSupply = _totalSupply;
balanceOf[_recipient] = _totalSupply;
emit Transfer(address(0), _recipient, _totalSupply);
}
// ─── ERC20 Functions ────────────────────────────────────────────────────────
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) {
return _transfer(msg.sender, to, amount);
}
function transferFrom(address from, address to, uint256 amount) external returns (bool) {
uint256 currentAllowance = allowance[from][msg.sender];
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
allowance[from][msg.sender] = currentAllowance - amount;
}
}
return _transfer(from, to, amount);
}
// ─── Internal ───────────────────────────────────────────────────────────────
function _transfer(address from, address to, uint256 amount) internal returns (bool) {
require(from != address(0), "ERC20: transfer from zero address");
require(to != address(0), "ERC20: transfer to zero address");
require(balanceOf[from] >= amount, "ERC20: insufficient balance");
unchecked {
balanceOf[from] -= amount;
balanceOf[to] += amount;
}
emit Transfer(from, to, amount);
return true;
}
}
Compiler settingsShow
{
"viaIR": true,
"metadata": {
"appendCBOR": false,
"bytecodeHash": "none",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 10,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"forge-std/=lib/forge-std/src/",
"v4-core/=lib/v4-core/",
"v4-periphery/=lib/v4-periphery/",
"permit2/=lib/permit2/",
"@openzeppelin/contracts/=lib/v4-core/lib/openzeppelin-contracts/contracts/",
"solmate/=lib/v4-core/lib/solmate/",
"@ensdomains/=lib/v4-core/node_modules/@ensdomains/",
"@uniswap/v4-core/=lib/v4-periphery/lib/v4-core/",
"ds-test/=lib/permit2/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/",
"hardhat/=lib/v4-core/node_modules/hardhat/",
"openzeppelin-contracts/=lib/permit2/lib/openzeppelin-contracts/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.