TokenDeployer
0x5c03d8fe39803b7110fe7089bb1da3e89ee2a61b
Verification
Unverified
v0.8.26+commit.8a97fa7a
Type
Contract
16,806 bytes
ABI entries
5
2 read · 2 write
License
none
Contract information
- Address
- 0x5c03d8fe39803b7110fe7089bb1da3e89ee2a61b
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.26+commit.8a97fa7a
- Optimization
- Enabled
- Creator
- 0xEDC32d6257…3F35DfC9d0
- Creation tx
- 0xd93b04650d…2645495f50
Token
Not a token
This contract does not expose ERC-20 metadata.
Read contract (2)
deployer() → address
factory() → address
ABI
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "address",
"name": "treasury",
"type": "address"
},
{
"internalType": "uint256",
"name": "supplyWhole",
"type": "uint256"
},
{
"internalType": "address",
"name": "poolManager",
"type": "address"
},
{
"internalType": "address",
"name": "positionManager",
"type": "address"
},
{
"internalType": "address",
"name": "universalRouter",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "deploy",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "deployer",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "factory",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "f",
"type": "address"
}
],
"name": "setFactory",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
// Splits the FLOWv4 creation bytecode out of FlowFactory (keeps the factory under the 24KB limit).
// Deploys a basket token, then hands the minted supply + ownership to `to` (the factory).
import {FLOWv4} from "../FLOWv4.sol";
contract TokenDeployer {
address public immutable deployer; // the EOA/bundle that deployed this — only it may wire the factory
address public factory; // only the factory may deploy (set once) — prevents official-address impersonation
constructor() { deployer = msg.sender; }
function setFactory(address f) external {
// gate to the deployer so the one-shot slot can't be front-run/claimed by an attacker (audit M-1)
require(msg.sender == deployer, "not deployer");
require(factory == address(0) && f != address(0), "set");
factory = f;
}
function deploy(
string calldata name,
string calldata symbol,
address treasury,
uint256 supplyWhole,
address poolManager,
address positionManager,
address universalRouter,
address to
) external returns (address) {
require(msg.sender == factory, "only factory");
// launchpad tokens are always `restricted` (locked accounting setters) — the safety guarantee
FLOWv4 t = new FLOWv4(name, symbol, treasury, supplyWhole, poolManager, positionManager, universalRouter, true);
// this deployer is fee-exempt on the fresh token (constructor excludes its deployer), so it can
// move the full pre-launch supply and ownership to the factory.
t.transfer(to, t.balanceOf(address(this)));
t.transferOwnership(to);
return address(t);
}
}
Chain explorer2737msChain node83ms