Factory

Factory

Token deployment contract

Factory Contract

The Factory contract deploys new tokens with Uniswap V4 pools.

Addresses

NetworkAddress
Base0xDbbC0A64fFe2a23b4543b0731CF61ef0d5d4E265
Ethereum0x1dc68bc05ecb132059fb45b281dbfa92b6fab610

Functions

deployToken

Deploys a new token with a Uniswap V4 pool.

solidity
function deployToken(
    string memory name,
    string memory symbol,
    uint256 supply,
    address nftCollection,
    string memory imageUrl,
    string memory socialUrl,
    string memory website,
    uint256 devBuyAmount
) external payable returns (address token)

Parameters:

  • name: Token name (e.g., "My Token")
  • symbol: Token symbol (e.g., "MTK")
  • supply: Total supply in wei (default: 1B tokens)
  • nftCollection: NFT collection address for fee distribution
  • imageUrl: Token image URL (IPFS or HTTPS)
  • socialUrl: Social media link
  • website: Website URL
  • devBuyAmount: ETH to swap for tokens at launch

Returns:

  • token: Deployed token address

Events

solidity
event TokenDeployed(
    address indexed token,
    address indexed deployer,
    address indexed nftCollection,
    address pool
);

Usage Example

javascript
const factory = new ethers.Contract(FACTORY_ADDRESS, FACTORY_ABI, signer);

const tx = await factory.deployToken(
    "My Token",
    "MTK",
    ethers.parseEther("1000000000"), // 1B supply
    "0x...", // NFT collection
    "ipfs://...",
    "https://twitter.com/...",
    "https://mytoken.com",
    ethers.parseEther("0.1") // 0.1 ETH dev buy
);

const receipt = await tx.wait();
const tokenAddress = receipt.logs[0].args.token;