LaunchToken
0xa9038d2c4e798d10dd46c2fdb1f72c9b397bbdad
Verification
Verified
v0.8.26+commit.8a97fa7a
Type
Contract
2,396 bytes
ABI entries
26
9 read · 4 write
License
none
Contract information
- Address
- 0xa9038d2c4e798d10dd46c2fdb1f72c9b397bbdad
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.26+commit.8a97fa7a
- Optimization
- Enabled
- Creator
- 0x23aB86d6F6…25BfFFC9Eb
- Creation tx
- 0xe267b18caa…d7b55947d0
Token
- Name
- vladdy
- Symbol
- VLAD
- Decimals
- 18
- Holders
- 209
- Market
- View token page →
Read contract (9)
allowance(address, address) → uint256
balanceOf(address) → uint256
decimals() → uint8
distributor() → address
factory() → address
metadataURI() → string
name() → string
symbol() → string
totalSupply() → uint256
Events (3)
ApprovalDistributorSetTransfer
ABI
[
{
"inputs": [
{
"internalType": "string",
"name": "name_",
"type": "string"
},
{
"internalType": "string",
"name": "symbol_",
"type": "string"
},
{
"internalType": "uint256",
"name": "totalSupply_",
"type": "uint256"
},
{
"internalType": "string",
"name": "metadataURI_",
"type": "string"
},
{
"internalType": "address",
"name": "mintTo",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "DistributorAlreadySet",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC20InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC20InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC20InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "ERC20InvalidSpender",
"type": "error"
},
{
"inputs": [],
"name": "OnlyFactory",
"type": "error"
},
{
"inputs": [],
"name": "ZeroDistributor",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "distributor",
"type": "address"
}
],
"name": "DistributorSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "distributor",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "factory",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "metadataURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_distributor",
"type": "address"
}
],
"name": "setDistributor",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
interface IBalanceReceiver {
function setBalance(address account, uint256 newBalance) external;
}
/// @title LaunchToken
/// @notice Minimal fixed-supply ERC-20. The entire supply is minted to the factory at construction,
/// which then seeds the Uniswap v4 liquidity position. There is no mint function after
/// construction, so supply is permanently fixed.
///
/// STOCK-REWARDS MODE
/// ------------------
/// For launches that opt into Stock Rewards, the factory wires a `distributor` exactly once
/// (right after deploy). While set, every balance change is mirrored to the distributor so it
/// can pay stock dividends pro-rata to holders. When unset (the default / buyback-mode launches)
/// the token behaves as a plain fixed-supply ERC-20. Keeping a single token contract means the
/// CREATE2 init-code hash is identical for both modes.
contract LaunchToken is ERC20 {
/// @notice The launchpad factory that created this token.
address public immutable factory;
/// @notice IPFS/HTTPS URI for token metadata (logo, socials, description).
string public metadataURI;
/// @notice Stock-rewards distributor for this token, or address(0) for buyback-mode launches.
/// Set exactly once by the factory; immutable thereafter.
address public distributor;
event DistributorSet(address indexed distributor);
error OnlyFactory();
error DistributorAlreadySet();
error ZeroDistributor();
constructor(
string memory name_,
string memory symbol_,
uint256 totalSupply_,
string memory metadataURI_,
address mintTo
) ERC20(name_, symbol_) {
factory = msg.sender;
metadataURI = metadataURI_;
_mint(mintTo, totalSupply_);
}
/// @notice Wire the stock-rewards distributor. Factory-only and one-time; the mint in the constructor
/// happens before this is set, so the full supply lands with the (excluded) factory first.
function setDistributor(address _distributor) external {
if (msg.sender != factory) revert OnlyFactory();
if (distributor != address(0)) revert DistributorAlreadySet();
if (_distributor == address(0)) revert ZeroDistributor();
distributor = _distributor;
emit DistributorSet(_distributor);
}
/// @dev Mirror every balance change to the distributor so stock rewards accrue correctly. No-op for
/// buyback-mode tokens (distributor unset).
function _update(address from, address to, uint256 value) internal override {
super._update(from, to, value);
address d = distributor;
if (d != address(0)) {
if (from != address(0)) IBalanceReceiver(d).setBalance(from, balanceOf(from));
if (to != address(0)) IBalanceReceiver(d).setBalance(to, balanceOf(to));
}
}
}
Chain explorer2848msChain node83ms