> For the complete documentation index, see [llms.txt](https://docs.coinfactory.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coinfactory.app/launchpad/integration/onchain-events.md).

# Onchain Events

The CoinFactory Launchpad contract emits onchain events throughout the complete token lifecycle—from creation and bonding curve trading to finalization and DEX migration.

Integrations can use these events to index launched tokens, trades, supply changes, collected liquidity, and migration status. Token addresses should always be used as the primary identifier because token names and symbols are not unique.

### Lifecycle Overview

{% stepper %}
{% step %}

#### TokenCreated

{% endstep %}

{% step %}

#### Mint / Burn

{% endstep %}

{% step %}

#### BondFinalized

{% endstep %}

{% step %}

#### BondMigrated

{% endstep %}
{% endstepper %}

### Events

<pre class="language-solidity"><code class="lang-solidity">/**
 * @notice Emitted when a new bonding curve token is created.
 */
event TokenCreated( 
<strong>    address indexed token, 
</strong>    string name, 
    string symbol, 
    address indexed reserveToken, 
    string metadataUrl 
);
</code></pre>

```solidity
/**
 * @notice Emitted when tokens are purchased from the bonding curve.
 */
event Mint(
    address indexed token,
    address indexed user,
    address receiver,
    uint256 amountMinted,
    uint256 reserveAmount,
    uint256 supplyAfter,
    uint256 priceAfter,
    uint40 timestamp
);
```

```solidity
/**
 * @notice Emitted when tokens are sold back to the bonding curve.
 */
event Burn(
    address indexed token,
    address indexed user,
    address receiver,
    uint256 amountBurned,
    uint256 refundAmount,
    uint256 supplyAfter,
    uint256 priceAfter,
    uint40 timestamp
);
```

```solidity
/**
 * @notice Emitted when the bonding curve reaches its sale supply.
 */
event BondFinalized(
    address indexed token,
    uint256 saleSupply,
    uint256 reserveBalance,
    uint40 timestamp
);
```

<pre class="language-solidity"><code class="lang-solidity">/**
 * @notice Emitted when a finalized bonding curve is migrated to DEX liquidity.
 * @param token The address of the migrated token.
 * @param pair The address of the created liquidity pair.
 * @param tokenAmount The amount of tokens allocated to the liquidity pool.
 * @param reserveAmount The amount of reserve tokens allocated to the liquidity pool.
 * @param protocolFee The protocol fee deducted during migration.
 * @param lpAmount The amount of liquidity tokens created.
 * @param timestamp The migration timestamp.
 */
<strong> event BondMigrated(
</strong>    address indexed token,
    address indexed pair,
    uint256 tokenAmount,
    uint256 reserveAmount,
    uint256 protocolFee,
    uint256 lpAmount,
    uint40 timestamp
);
</code></pre>
