# Contract Addresses

## Contract Addresses

### Hyperliquid EVM

#### System Contracts

<table data-full-width="true"><thead><tr><th width="218.6666259765625">Contract</th><th>Address</th></tr></thead><tbody><tr><td>USDC</td><td><code>0xb88339CB7199b77E23DB6E890353E22632Ba630f</code></td></tr><tr><td>CoreDepositWallet</td><td><code>0x6B9E773128f453f5c2C60935Ee2DE2CBc5390A24</code></td></tr><tr><td>CoreWriter</td><td><code>0x3333333333333333333333333333333333333333</code></td></tr><tr><td>USDC L1 System</td><td><code>0x2000000000000000000000000000000000000000</code></td></tr></tbody></table>

***

### L1 Precompiles

<table data-full-width="true"><thead><tr><th width="229.6666259765625">Precompile</th><th width="391.666748046875">Address</th><th>Purpose</th></tr></thead><tbody><tr><td>PERP_POSITION</td><td><code>0x0000000000000000000000000000000000000800</code></td><td>Query perpetual positions</td></tr><tr><td>SPOT</td><td><code>0x0000000000000000000000000000000000000801</code></td><td>Query spot balance</td></tr><tr><td>WITHDRAWABLE</td><td><code>0x0000000000000000000000000000000000000803</code></td><td>Query withdrawable amount</td></tr><tr><td>ORACLE</td><td><code>0x0000000000000000000000000000000000000807</code></td><td>Get oracle price</td></tr><tr><td>PERP_ASSET_INFO</td><td><code>0x000000000000000000000000000000000000080a</code></td><td>Get asset info (szDecimals, maxLeverage)</td></tr><tr><td>ACCOUNT_MARGIN_SUMMARY</td><td><code>0x000000000000000000000000000000000000080F</code></td><td>Get account margin summary</td></tr></tbody></table>

#### Precompile Return Types

```solidity
// 0x800 PERP_POSITION
(int64 szi, uint64 entryNtl, int64 isolatedRawUsd, uint32 leverage, bool isIsolated)

// 0x801 SPOT (values in 8 decimals)
(uint256 total, uint256 hold, uint256 entryNtl)

// 0x803 WITHDRAWABLE
uint64 withdrawable

// 0x807 ORACLE
uint64 oraclePrice

// 0x80A PERP_ASSET_INFO
(string name, uint32 marginTableId, uint32 szDecimals, uint32 maxLeverage, bool onlyIsolated)

// 0x80F ACCOUNT_MARGIN_SUMMARY
(int64 accountValue, uint64 marginUsed, uint64 ntlPos, int64 rawUsd)
```

***

### Production Factory

<table data-full-width="true"><thead><tr><th>Contract</th><th>Address</th></tr></thead><tbody><tr><td>Factory Proxy</td><td><code>0xeE7dB1582e46c054792AdD4bb52b8D4D6ab45555</code></td></tr><tr><td>Token Implementation</td><td><code>0xFa0A82a463F1501b86aaf415c1A1638ff7B0db7f</code></td></tr><tr><td>Trading Implementation</td><td><code>0x6086d078a06c4080113698E8548a53A7fdeeF364</code></td></tr><tr><td>Treasury</td><td><code>0xE3578A76072aDC15a0CDe1A15ED7DDFfbF5c343c</code></td></tr><tr><td>Owner</td><td><code>0xfa648BC93a7390E999B7a38b82b04a399Dfee67d</code></td></tr></tbody></table>

**Stats:** 5 vaults deployed

***

### Testing Factory

<table data-full-width="true"><thead><tr><th>Contract</th><th>Address</th></tr></thead><tbody><tr><td>Factory Proxy</td><td><code>0xEA0c5fF39f615d5428C8A5832c235dCb86F01F9A</code></td></tr><tr><td>Token Implementation</td><td><code>0xefc7eD042C5519bE735D608df09D801F9B4873d3</code></td></tr><tr><td>Trading Implementation</td><td><code>0x44d244C3b41eCe9051754C005C8e4518eA4E9a3B</code></td></tr><tr><td>Treasury</td><td><code>0xe8900BFdB3AaaD4F472479f6d430eB39CbaBfa9F</code></td></tr><tr><td>Owner</td><td><code>0xe8900BFdB3AaaD4F472479f6d430eB39CbaBfa9F</code></td></tr></tbody></table>

**Stats:** 27 vaults deployed

***

### CoreWriter Action IDs

<table data-full-width="true"><thead><tr><th>Action ID</th><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>ACTION_LIMIT_ORDER</td><td>Place perpetual order</td></tr><tr><td>6</td><td>ACTION_SPOT_SEND</td><td>Transfer L1 Spot → EVM</td></tr><tr><td>7</td><td>ACTION_USD_CLASS_TRANSFER</td><td>Transfer Spot ↔ Perp</td></tr><tr><td>9</td><td>ACTION_ADD_API_WALLET</td><td>Register API wallet on L1</td></tr><tr><td>10</td><td>ACTION_CANCEL_BY_OID</td><td>Cancel order by order ID</td></tr><tr><td>12</td><td>ACTION_APPROVE_BUILDER_FEE</td><td>Approve builder fee</td></tr></tbody></table>

#### Action Encoding Example

```solidity
// Transfer from Spot to Perp
bytes memory action = abi.encodePacked(
    uint8(1),                           // Version
    uint24(7),                          // ACTION_USD_CLASS_TRANSFER
    abi.encode(uint64(amount), true)    // (amount, toPerp)
);
ICoreWriter(0x3333333333333333333333333333333333333333).sendRawAction(action);
```

***

### Network Info

| Property | Value                              |
| -------- | ---------------------------------- |
| Network  | Hyperliquid EVM                    |
| Chain ID | 999                                |
| RPC URL  | `https://rpc.hyperliquid.xyz/evm`  |
| Explorer | `https://explorer.hyperliquid.xyz` |

***

*Last Updated: February 2025*


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hyper-fun.gitbook.io/hypers.fun/smart-contracts/contract-addresses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
