Verified contractExactMIT
LaunchToken
Address0xee2d5be9b20b13cfc71ce75fac3e49446f1c8809
- Balance
0 ETH
- Transactions
45
- Compiler
solc 0.8.24
- Same code
42 more contracts
Details
- Compiler
- solc 0.8.24+commit.e11b9ed9
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- Via IR
- yes
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 25,927,414
- Creation transaction
- 0x27b2525421…eeaf624e31
- Main copy (most transactions)
- 0xabc8742d…8a74bbc2
contracts/LaunchToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/// @notice Fixed-supply ERC-20. Entire supply is minted to the factory, then locked in the pool.
contract LaunchToken {
string public name;
string public symbol;
uint8 public constant decimals = 18;
uint256 public immutable totalSupply;
address public immutable factory;
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_;
factory = msg.sender;
balanceOf[msg.sender] = supply_;
emit Transfer(address(0), msg.sender, supply_);
}
function approve(address spender, uint256 value) external returns (bool) {
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
function transfer(address to, uint256 value) external returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
function transferFrom(address from, address to, uint256 value) external returns (bool) {
uint256 allowed = allowance[from][msg.sender];
if (allowed != type(uint256).max) {
require(allowed >= value, "allowance");
allowance[from][msg.sender] = allowed - value;
}
_transfer(from, to, value);
return true;
}
function _transfer(address from, address to, uint256 value) internal {
require(to != address(0), "zero");
require(balanceOf[from] >= value, "balance");
unchecked {
balanceOf[from] -= value;
balanceOf[to] += value;
}
emit Transfer(from, to, value);
}
}
Compiler settingsShow
{
"viaIR": true,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"forge-std/=lib/forge-std/src/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.