# Developer Quickstart

**Omnex Layer** is a cutting‑edge Layer 2 that delivers superior performance in throughput and latency while addressing critical security challenges. As an EVM‑equivalent Layer 2, **Omnex Layer** remains fully compatible with the Ethereum ecosystem.

This guide will walk you through the essential workflow for developing and deploying a basic Solidity smart contract on the **Omnex Layer** network.

***

## What You’ll Accomplish <a href="#what-you-ll-accomplish" id="what-you-ll-accomplish"></a>

* Get familiar with the Omnex Layer network and tooling.
* Work through a basic Solidity development, deployment, and interaction cycle on Omnex Layer.

***

## Prerequisite

Here we assume that readers are already familiar with the concepts and usage of cryptocurrency. In order to successfully complete the tutorial, you need to be familiar with the usage of the following tools.

* The [Chrome](https://www.google.com/intl/en/chrome/) explorer
* The [Solidity](https://soliditylang.org/) programming language
* The [MetaMask](https://metamask.io/download) wallet
* The [Remix](https://remix.ethereum.org/) development environment

***

## Configure Your Wallet

First, you need to add the **Omnex Layer** network to your MetaMask wallet.

Refer to the [MetaMask help document](https://support.metamask.io/configure/networks/how-to-add-a-custom-network-rpc/#adding-a-network-manually) and use the appropriate configuration below.

| Configuration          | Omnex Mainnet               | Omnex Testnet                                                                  |
| ---------------------- | --------------------------- | ------------------------------------------------------------------------------ |
| **Network Name**       | `Omnex Mainnet`             | `Omnex Testnet`                                                                |
| **RPC URL**            | `https://rpc.omnex.co`      | <p><code><https://api.top/pub></code></p><p><code>lic/omnex-testnet</code></p> |
| **Chain ID**           | `5934949`                   | `258151`                                                                       |
| **Currency Symbol**    | `ETH`                       | `ETH`                                                                          |
| **Block Explorer URL** | `https://explorer.omnex.co` | <p><code><https://sepolia-explorer>.</code></p><p><code>omnex.co/l2</code></p> |

{% hint style="info" %}

> 💡**Tips:** We recommend adding the "Block explorer URL" part when you add network to metamask, but this is optional.
> {% endhint %}

During the development phase, we recommend using the testnet. After completing development, testing, and a security audit, you can deploy to the **Omnex Layer** Mainnet. Here’s how to configure the **Omnex Layer** Testnet in MetaMask.

***

## Get Funds on Omnex

o pay for transaction fees on **Omnex Layer**, you need its native asset, ETH. You can acquire ETH on **Omnex Layer** using one of the following methods:

***

**Method 1: Cross-Chain Bridge (Mainnet & Testnet)**\
The primary way to get ETH on **Omnex Layer** is by bridging it from a Layer 1 network like Ethereum. This process involves locking your ETH on L1 and receiving an equivalent amount on **Omnex Layer**.

For detailed instructions, please follow our complete **Omnex Layer** Bridge DApp Tutorial.

***

**Method 2: Faucet (Testnet Only)**\
If you are working on the **Omnex Layer** Testnet, you can get free testnet ETH from a public faucet. This is the quickest way to get started with development.

* **Navigate to the Faucet**: Open the **Omnex Layer** Faucet.
* **Request Funds**: Follow the instructions on the site to receive testnet ETH in your wallet.
* **Check Your Balance**: After a few moments, you should see the new balance in your MetaMask wallet.

***

## Deploy a Smart Contract with Remix

This section will guide you through deploying and interacting with a simple "Hello World" style contract using the Remix IDE.

### Review demo contract code

Click the copy below to open a pre-loaded demo contract:

```solidity
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

contract OmnexExample {
    string private content = "welcome to Omnex";

    function SetContent(string memory _new_content) public {
        content = _new_content;
    }

    function GetContent() public view returns (string memory){
        return content;
    }
}
```

#### Deploy Contract

Before you start, switch your MetaMask to **Omnex Layer** testnet and set the Remix environment to MetaMask. Then, in Remix, compile the contract and deploy it. If you're not familiar with the process, Remix offers a [guide](https://remix-ide.readthedocs.io/en/latest/run.html) for users.

After deployment, you can find your deployed contract as shown below. You can search for your contract address on the **Omnex Layer** explorer to view the details.

<figure><img src="/files/z2hEGlk4iWqFW0SKOgbv" alt="" width="263"><figcaption></figcaption></figure>

> &#x20;                                                 ***Figure 2: A Deployed Demo Contract***

#### Interacting with deployed contract <a href="#interacting-with-deployed-contract" id="interacting-with-deployed-contract"></a>

Set the some string value in the input box. And click button `transact` to request the wallet to sign and send a transaction to Omnex testnet.

<figure><img src="/files/Dz7bspqgc7ScuznHKA99" alt="" width="263"><figcaption></figcaption></figure>

> &#x20;                                                            *Figure 3: Call and Send Tx*

Copy the transaction hash, which you can find in the Remix console as shown below. Then, search for the transaction hash on the **Omnex Layer** explorer, and you will be able to view more details. The transaction will be confirmed in seconds.

> *Figure 4: Transaction Just Sent*

After confirmation, your account balance will be reduced to pay the transaction fee. Checkout your MetaMask to see it. You will find Omnex is fast and cheap.

Then call the GetContent function to check the content value. You should get the updated value which set by sent transaction.

<figure><img src="/files/uKnKxz6vTRCqYPAC0nYZ" alt="" width="294"><figcaption></figcaption></figure>

> &#x20;                                                          *Figure 5: New Content*

Now you understand that smart contract development on **Omnex Layer** is the same as on Ethereum, but even smoother on **Omnex Layer.**

***

### Next Steps <a href="#next-steps" id="next-steps"></a>

Now that you're familiar with the basics of deploying contracts on Omnex Layer, you can explore more advanced topics and tool-specific guides.


---

# 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://omnex-layer.gitbook.io/omnex-layer/guides/developer-quickstart.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.
