# Smart Contracts

The following smart contract addresses are integral to the Onyx blockchain infrastructure. These addresses correspond to core protocol contracts and token bridge contracts, which facilitate transaction processing, cross-chain interoperability, and protocol governance. Developers building on Onyx should reference these addresses for contract interactions, cross-chain asset transfers, and network-specific implementations.

## Layer 1 Governance & Staking

The smart contracts for Onyx on Ethereum are below:

<table><thead><tr><th width="129.94921875">Name</th><th width="385.56640625">Address</th><th>Details</th></tr></thead><tbody><tr><td>Governor</td><td><code>0xdec2f31c3984f3440540dc78ef21b1369d4ef767</code></td><td>The core Governance contract for Onyx.</td></tr><tr><td>Timelock</td><td><code>0x08eDF0F2AF8672029eb445742B3b4072c6158DF3</code></td><td>The Timelock security contract for Onyx Governance.</td></tr><tr><td>XCN Staking </td><td><code>0x23445c63FeEf8D85956dc0f19aDe87606D0e19A9</code></td><td>The XCN Staking contract that determines vote weight for Onyx Governance. </td></tr><tr><td>XCN Unitroller</td><td><code>0x3fA642C0bBad64569eb8424af35F518347249216</code></td><td>The XCN Farming contract for Uniswap V2 XCN-WETH pool.</td></tr><tr><td>Onyx DAO Registry</td><td><code>0xf161C603Ed58E81694765fdE7095184d1c52A6BB</code></td><td>The Onyx DAO registry contract governs the protocol's service providers through onchain governance.</td></tr></tbody></table>

## Layer 3 Core Protocol Contracts

The core smart contracts of Onyx define the network’s fundamental operations, including transaction finalization, message passing, and state synchronization.

| Name                   | Address                                    | Details                                                                                          |
| ---------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| Rollup                 | 0x50752f7988d0195d4d5fb09a1A22B8354b5A8c0b | Handles L3 rollup execution and state commitments.                                               |
| Inbox                  | 0x8635f49481A90DeD18E8D0eB374028C4b39E700F | Manages incoming messages from L2 to L3.                                                         |
| Outbox                 | 0x10e9F660ed21e662e7f3fB4a49B0Bd9B219bEf95 | Handles message relays from L3 back to L2.                                                       |
| AdminProxy             | 0x615b81747e819e0dB25c13570D5DA45Ef9bc81B3 | Administrative contract for protocol governance and upgradeability.                              |
| SequencerInbox         | 0xdA2445f1cA60bC2C739A96298746aDBB6706f011 | Responsible for batching and sequencing transactions before final inclusion in the rollup state. |
| Bridge                 | 0xcdf10130c75D42a3880Ae521734EaA8631aC2905 | Facilitates cross-chain asset transfers between Onyx and external networks.                      |
| Utils                  | 0x23264394923E4aEB990234180c37Bf757667C6f7 | Provides auxiliary functions for the Onyx protocol.                                              |
| ValidatorWalletCreator | 0x2A8ccC4829c0323b470357cffDaD492C789f9315 | Generates validator wallets for network security operations.                                     |
| L3UpgradeExecutor      | 0x00177AC867e05EC9209a70be32A79157D065E6dE | Manages network upgrades and protocol-level modifications                                        |

## Token Bridge Contracts

The Token Bridge Contracts enable seamless asset transfers between Onyx and external networks. These contracts are responsible for asset locking, minting, and validation in both Layer 2 (L2) and Layer 3 (L3) environments.

#### L2 Token Bridge Contracts:

| Name            | Address                                    | Details                                                              |
| --------------- | ------------------------------------------ | -------------------------------------------------------------------- |
| CustomGateway   | 0x5e1035ca5f4e00F37C2e33E4d7FE6611AdE76A1a | Handles L2-specific custom token bridging.                           |
| Multicall       | 0xb444317D808b5cFfE66495920D40A35E7D247cC4 | Enables batched contract calls to optimize transactions.             |
| Router          | 0x3CaA4581e7bA1Af2607e0198aF4E4C208f09c98b | Directs token movements between networks.                            |
| StandardGateway | 0x167D43d1D60DE2320B5E143F9c6a058092A913C2 | Supports standard ERC-20 token transfers between Onyx and L2 chains. |

#### L3 Token Bridge Contracts

| Name            | Address                                    | Details                                                                                         |
| --------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------- |
| CustomGateway   | 0x98c0C61F5Ca34F5d471a89Ac350BbaF8dd48b3FB | Manages custom asset transfers at the L3 level.                                                 |
| Multicall       | 0x07f1104a28A6D805A847Ca8ec57d1A3a9f430fCf | Allows batch execution of multiple contract calls in a single transaction.                      |
| ProxyAdmin      | 0x0707DDF430c956A7642aD543d462752b32A04CCB | Controls upgradeability of bridge contracts.                                                    |
| Router          | 0x716f4586941Cfb4704F947CdAA2b2CB6432397ff | Directs token transactions across L3 and connected networks.                                    |
| StandardGateway | 0x64B59bC9Ac590AE050353A9F21875E35c48Ea4AF | <p>Processes standard ERC-20 token bridging between L3 and other supported networks.</p><p></p> |
