> For the complete documentation index, see [llms.txt](https://wiki.orbofi.com/learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.orbofi.com/learn/tokenization-liquidity-and-onchain-systems/abis.md).

# ABIs

Everything needed to parse Orbofi launches, pools and fees. Addresses are in [Deployed contract addresses](/learn/tokenization-liquidity-and-onchain-systems/deployed-contract-addresses.md).

### Discovery — Orbofi Factory

The single event that identifies an Orbofi agent. Emitted by **all** Orbofi factories.

```json
{
  "type": "event",
  "name": "AgentCoinLaunched",
  "anonymous": false,
  "inputs": [
    { "name": "asset",         "type": "address", "indexed": true  },
    { "name": "creator",       "type": "address", "indexed": true  },
    { "name": "pool",          "type": "address", "indexed": false },
    { "name": "numeraire",     "type": "address", "indexed": false },
    { "name": "initialSupply", "type": "uint256", "indexed": false }
  ]
}
```

`topic0` = `0x5d474dbccaef0b3274a2302f351854d215f5cb89d8d566861c19668c197670ad`

Only `asset` and `creator` are indexed; `pool`, `numeraire` and `initialSupply` are in the data and cannot be filtered on.

{% hint style="warning" %}
**`pool` is not a pool id.** Decoding a live launch shows this field repeating the `asset` address — Uniswap V4 pools have no address of their own, and their `bytes32` id is not carried here. Take the id from the `Initialize` event instead; treat `pool` as redundant.
{% endhint %}

### Pool — Uniswap V4 PoolManager

```solidity
event Initialize(
    bytes32 indexed id,
    address indexed currency0,
    address indexed currency1,
    uint24  fee,
    int24   tickSpacing,
    address hooks,
    uint160 sqrtPriceX96,
    int24   tick
);

event Swap(
    bytes32 indexed id,
    address indexed sender,
    int128  amount0,
    int128  amount1,
    uint160 sqrtPriceX96,
    uint128 liquidity,
    int24   tick,
    uint24  fee
);
```

`hooks` is in the data, not the topics.

**`sender` on `Swap` is the Universal Router, not the trader.** Every Orbofi trade routes through `0x8876…0904`, so attributing trades to `sender` puts the router on every row. Recover the taker from the transaction's `from`, or from the token `Transfer` logs in the same transaction.

**Amounts are pool-perspective and signed.** A positive `amount0` means currency0 went INTO the pool. If you are porting a Uniswap V3 indexer, check the convention against a known trade before trusting your buy/sell classification.

**`fee` on `Swap` is NOT the total swap fee.** It reports the LP leg only — `1000` (0.1%) on a standing trade. The hook leg is charged through hook deltas that never reach the PoolManager's accounting, so this field misses \~94% of what the trader paid. Use the quoter for cost, and see [Fees](/learn/tokenization-liquidity-and-onchain-systems/fees.md).

### Quoting — V4 Quoter

```solidity
function quoteExactInputSingle(
    (PoolKey poolKey, bool zeroForOne, uint128 exactAmount, bytes hookData)
) external returns (uint256 amountOut, uint256 gasEstimate);
```

Non-view; simulate it (`eth_call`) rather than sending.

### Agent token

A standard ERC-20 (18 decimals): `name`, `symbol`, `totalSupply`, `balanceOf`, `transfer`, `approve`, `allowance`, plus `Transfer` / `Approval`.

Beyond the base standard it also implements three common extensions — verified on a live agent:

* **ERC20Votes** — `delegates`, `getVotes`, `CLOCK_MODE` (`mode=blocknumber`). Vote power is checkpointed, so a transfer also updates voting state; an indexer that assumes transfers have no side effects is fine, but one that mirrors the token's own logic should know the checkpoint write exists.
* **ERC20Permit** — `permit`, `nonces`, `DOMAIN_SEPARATOR`. Gasless approvals by signature.
* **Burnable** — `burn(uint256)`. `totalSupply` can therefore decrease; read it live rather than caching a launch-time value.

There is no `mint` — supply cannot inflate.

### Full factory ABI

The complete Orbofi factory ABI — 20 events, 58 functions, 85 custom errors — is committed alongside these docs at [`developers/abi/OrbofiLauncher.json`](https://github.com/Orbofi/Wiki/tree/main/developers/abi/OrbofiLauncher.json). (`OrbofiLauncher` is the factory's Solidity contract name, which is why the file carries it.) Most integrations only need `AgentCoinLaunched`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wiki.orbofi.com/learn/tokenization-liquidity-and-onchain-systems/abis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
