For the complete documentation index, see llms.txt. This page is also available as Markdown.

Trading Methods

CoinFactory provides separate methods for ERC-20 reserve tokens and native ETH.

Current CoinFactory bonds use WETH as the reserve asset. End-user applications can use the native ETH methods to automatically wrap or unwrap ETH during a trade.

Buy with an ERC-20 Reserve Token

Purchases an exact number of tokens using the bond’s configured ERC-20 reserve asset.


/**
* @dev Mint new tokens by depositing reserve tokens.
* @param token The address of the token to mint.
* @param tokensToMint The amount of tokens to mint.
* @param maxReserveAmount The maximum reserve amount allowed for the minting operation.
* @param receiver The address to receive the minted tokens.
*/
function mint(
    address token,
    uint256 tokensToMint,
    uint256 maxReserveAmount,
    address receiver
) external returns (uint256 reserveAmount);

Buy with ETH

Purchases tokens using native ETH for a WETH-backed bond. The launchpad automatically wraps ETH into WETH as part of the transaction.

Sell for an ERC-20 Reserve Token

Sells tokens back to the bonding curve and receives the configured ERC-20 reserve asset.

Sell for ETH

Sells tokens from a WETH-backed bond and automatically unwraps the resulting WETH into native ETH.

Last updated