---
updatedAt: 2026-08-18T08:59:36.000Z
agentTools:
  projectIndex: https://docs.onechain.nexus/llms.txt
---

# 4-2. Contracts

# 4-2. Contracts

Deploy the token contract and the RAMP contract, then link them to your project.

**What you need**

* **A connected wallet** — deployment and linking both require a wallet connection.
* **An Owner (Admin) wallet** — a company-managed wallet. **ONEpocket, MetaMask, and others are supported.** → [3.2](https://docs.onechain.nexus/docs/prerequisites#32-wallet)
  * Deployment gas is about **1 $ONE or less**
  * Linking to a project requires **at least 0.5 $ONE** on the Owner address
* **A Validator address** → [3.3](https://docs.onechain.nexus/docs/prerequisites#33-validator-key)

**Connectable wallets** — choose one from `Connect Wallet` at the top right.

| Group                         | Options                                                    |
| ----------------------------- | ---------------------------------------------------------- |
| Social Account Wallet Connect | `Sign in with Apple` · `Sign in with Google`               |
| Other Wallets                 | `ONEpocket` · `ONEpocket Extension` · `MetaMask` · `Privy` |

* Only when using MetaMask do you need to add the ONE Chain networks manually. → [3.6](https://docs.onechain.nexus/docs/prerequisites#36-network-information)

**Order of work**

* ① Deploy the token contract → ② Deploy the RAMP contract (**HMAC Key is issued**) → ③ Link the token contract to the project

***

## 4-2.1 Deploying the Token Contract

**Path** — Studio `Contracts` → `Deploy Contract`

* Deploy and manage **ERC-20** game tokens on Testnet and Mainnet from the Studio.
  * **This guide covers ERC-20.** The wizard shows other types, but they are not covered here.
* Columns — Name · Network · Type · Status · Contract Address · Last updated
* Filters — by network and by type / Search — by name or contract address

> **Connect your wallet first.** If you click `Deploy Contract` without connecting, the deployment screen does not open. Connect the wallet at the top right first.

![](https://files.readme.io/cc88a63f21e2a3449116c1ae1efd9e7473a84517d4986c696e40d1823022fb70-20-contracts-empty.png)

<br />

Deployment runs through a **five-step wizard**.

### ① Network Selection

* **Testnet** — development and validation / **Mainnet** — production

![](https://files.readme.io/c05d984d886af4811d01a7d17b208b4b5897dc335663b208a93f223ad71d49bb-21-deploy-step1-network.png)

<br />

### ② Token Type Selection

* Select `ERC-20`. This is the type for game tokens (fungible currency).

![](https://files.readme.io/45273cb803a67652a386d7609691ffccc078cb524dedd2676269eb7061cdf155-22-deploy-step2-type.png)

<br />

### ③ Basic Information

| Field            | Required | Description                          |
| ---------------- | -------- | ------------------------------------ |
| **Token Name**   | Required | The token name                       |
| **Token Symbol** | Required | The token symbol                     |
| **Token Image**  | Required | PNG · JPG · JPEG, about 3 MB or less |

![](https://files.readme.io/105c4e3ccd4226baca08192dbf6e5d8c956144b1c01013d5ae974a7b797da334-23-deploy-step3-basic.png)

<br />

* All three are required. You cannot advance without uploading an image.
* Replace an uploaded image with the `×` at the top right of the preview.

### ④ Admin, Supply, and Issuance Limits

**Admin Settings**

* **Admin Address** — the address holding administrative rights over the token (issuance, ownership, and so on). This must be a company-managed wallet address.

**Token Supply & Distribution**

| Mode                  | Behavior                                                   | Issuance limits   |
| --------------------- | ---------------------------------------------------------- | ----------------- |
| `Zero Initial Supply` | No pre-issuance; mints on demand                           | **Configurable**  |
| `Custom Amount`       | Pre-issues a fixed amount and deducts from it on each mint | **Not available** |

> **Issuance Limits are only available with&#x20;**`Zero Initial Supply`**.**
> With `Custom Amount`, the pre-issued supply is held by the RAMP Contract and drawn down from there, so the pre-issued amount itself acts as the cap. If you need per-period limits, you must choose `Zero Initial Supply`.

**Issuance Limits** — toggle between `Enabled` and `Disabled` (available when `Zero Initial Supply` is selected).

![](https://files.readme.io/ad040c3b75c3f76dac276796e87f8769c089ec2bb7a90e2e0be497b70e2585c3-24-deploy-step4-supply.png)

<br />

Selecting `Enabled` reveals three fields.

| Field                         | Description                                              |
| ----------------------------- | -------------------------------------------------------- |
| **Issuance Interval**         | Issuance period — `1D` · `7D` (default) · `30D` · `365D` |
| **Issuance Limit per Period** | Maximum issuance per period                              |
| **Max Supply**                | Total issuable supply                                    |

![](https://files.readme.io/9ec2e49f3c3d5953f3aeb3be1ecc36c438ff307eb1d022eda38bd261f07b865f-25-deploy-step4-limits.png)

<br />

* The **wei equivalent is shown live** beneath the amount you type, so you can verify the digit count visually.
* Issuance limits **reset at UTC-0**.

![](https://files.readme.io/6c93ce7fb258aac3268085db81e5411c38d719df2e7fee8bace60da22e19070c-26-deploy-interval-options.png)

<br />

### ⑤ Deploy Confirmation

Review every value you entered on one screen.

![](https://files.readme.io/c4b657c96c1954542100e8e408003ec86752c5b8027f646cdf43c2f9efa63bd7-27-deploy-step5-confirm.png)

<br />

> **Token information and issuance settings cannot be changed after deployment.** Re-check the name, symbol, Admin address, supply mode, and limits.

* Click `Deploy` → **sign** in your wallet → deployment proceeds

### Deployment Complete

The deployed token is added to the list.

![](https://files.readme.io/4b9a770ced03750be65967736470c6d4a30c86f077f848e78caf42c7be00c5ad-28-contracts-deployed.png)

<br />

* Columns — symbol and name · Network · Type · **Status (**`Deployed`**)** · Contract Address · Last updated
* Use the copy icon to the left of the address to **copy the contract address**.
* **Record the contract address.** You will use it as `intent.token` in the `initialize` request. → [5.3](https://docs.onechain.nexus/docs/endpint-apis#53-issuing-a-uuid--initialize)

### Verifying the Deployed Values (Overview)

Clicking a token in the list opens its detail screen. **On the&#x20;**`Overview`**&#x20;tab, confirm that the values you entered were applied exactly.** They cannot be changed after deployment.

![](https://files.readme.io/796ce13adc943bc2568e1728d98b87720cf4ebdca69b20d419d9b9cb69940c81-33-token-overview.png)

<br />

| Group              | Fields                                                                                         |
| ------------------ | ---------------------------------------------------------------------------------------------- |
| **Summary**        | Address · Owner · Decimals · Deploy Status · Published Status · Created Date · Deployment Date |
| **Admin Settings** | Admin Address · Issuance Interval · Issuance Limit per Period · Max Supply                     |

* Confirm that `Deploy Status` is `Deployed` and `Published Status` is `Published`.
* Issuance limits are shown **with both the entered value and the wei value** (for example `1,000,000` / `1000000000000000000000000` wei). Re-verify the digit count here.
* Dates are in **UTC-0**.

> If a value is not what you intended, **it cannot be edited, so you must redeploy.** Keep in mind that names and symbols must be unique, so pick a new name.

***

## 4-2.2 Deploying the RAMP Contract

This contract handles the internal Mint/Burn logic and must be **deployed separately for each project and each network**.

**Path** — Project `ONEramp` → `Settings` → **Ramp Contract Settings** → `Deploy Contract`

* Before deployment, only a notice and the `Deploy Contract` button are shown. → [4-3.2](https://docs.onechain.nexus/docs/3-ramp-settings#4-32-ramp-contract-settings)
* **Check the network tab (Mainnet / Testnet) at the top right first.** RAMP contracts are completely separate per tab.
* **Connect your wallet first.** The deployment screen does not open while disconnected.

The `Deploy ONEramp Contract` wizard has **three steps**.

### ① Register Validator Address

![](https://files.readme.io/543cdabe709864496a87cbe8187bb97ca0c0e998231cda0c82623cd3cfbaa3b6-29-ramp-deploy-step1-validator.png)

<br />

* **Validator Address** (required) — the address that validates Ramp operations on behalf of the game (`0x…`)
  * It is the reference value used to verify signatures created by your backend server. → [3.3](https://docs.onechain.nexus/docs/prerequisites#33-validator-key)
* The **Key Generator download URL** is shown at the top of the screen, with a copy icon on the right.
  * `https://github.com/to-nexus/key-generator/releases/tag/v1.0.2`
* **Enter the address only. Never enter or upload a private key.**
* **Security Confirmation** — you must **check all three items** before `Next` becomes active.

### ② Set Owner Address

![](https://files.readme.io/a0093cc64e241f01701941af765307e0cd678d7779ede6dafbfe3fa90372104b-30-ramp-deploy-step2-owner.png)

<br />

* **Owner Address** (required) — the address holding contract administration rights (`0x…`)
* The Owner holds sensitive permissions such as **fee updates and pausing**.
* Use a **company-managed wallet**, not a personal one, and document your key custody policy.

### ③ Review & Sign for Deployment

![](https://files.readme.io/696a05cdb3aa3c5233de1856684fb033c73fc7999c68b9af37a3b1190911df50-31-ramp-deploy-step3-review.png)

<br />

* Review the three values — **Network, Validator Address, and Owner Address** — before signing.
* `Request Deployment` → sign in the connected wallet and deployment proceeds.

### Deployment Complete — Contract Info and HMAC Key

Once signing is done, the results are filled into `Ramp Contract Settings`.

![](https://files.readme.io/6bb5b8377cf8b464fae6a7d642251e544526936da30c30c40a743d62067b9a3e-32-ramp-contract-deployed.png)

<br />

| Item                        | Description                                       | Button shown alongside                            |
| --------------------------- | ------------------------------------------------- | ------------------------------------------------- |
| **Contract Address**        | Address of the deployed RAMP contract             | Copy                                              |
| **Owner Address**           | Address holding contract administration rights    | `Transfer Ownership` — transfer ownership         |
| **Validator Address**       | The registered Validator address                  | `Reset Validator` — replace the Validator address |
| **HMAC Authentication Key** | Integrity verification key for RAMP ↔ your server | `Reissue` — reissue the key                       |

> **The HMAC Key is the basis for integrity verification between RAMP and your game server.**
> It is used for the `X-HMAC-SIGNATURE` request header. Store it in a secret manager immediately and use it only as a game server environment variable. → [5.3](https://docs.onechain.nexus/docs/endpint-apis#53-issuing-a-uuid--initialize)

> **Clicking&#x20;**`Reissue`**&#x20;invalidates the existing key immediately.** Only do it when you are ready to swap and deploy the game server environment variable. Otherwise every in-flight request fails signature verification.

> `Reset Validator`**&#x20;and&#x20;**`Transfer Ownership`**&#x20;also affect production directly.** Changing the Validator address causes signatures made with the old Validator key to be rejected, and transferring ownership strips administration rights from the previous Owner.

***

## 4-2.3 Linking the Token Contract to a Project

This step **grants Mint permission on the token contract** so that the project's RAMP contract can mint that token.

**Path** — Studio `Contracts` → select the token contract → `Link Project`**&#x20;tab** → `Add Project`

**Prerequisites**

* **The RAMP contract is deployed** — the project must have a Ramp Address to appear in the list. → [4-2.2](https://docs.onechain.nexus/docs/2-contracts#4-22-deploying-the-ramp-contract)
* **A connected wallet** — while disconnected, the `Add Project` button is **inactive**.
* **Wallet network = contract network** — see ② below
* **Gas on the Owner address** — at least `0.5 $ONE` (tONE on Testnet)

### ① Open the Link Project Tab

Selecting a token shows two tabs, `Overview` and `Link Project`. Go to the `Link Project` tab.

* To verify the deployed values themselves → [4-2.1 Verifying the Deployed Values](https://docs.onechain.nexus/docs/2-contracts#4-21-deploying-the-token-contract)

![](https://files.readme.io/d0fb8f7ba199fd56517873b459a0a926b3eb06a162e1e8e7e778c086a3646e2e-34-link-project-empty.png)

<br />

* If no projects are linked, the list appears empty.
* **If the wallet is not connected,&#x20;**`Add Project`**&#x20;cannot be clicked.** The screen above shows that state.

### ② Check the Wallet Network

> **If the contract is on Testnet, the wallet must also be on ONE Testnet.** The Testnet tab in the console and **the wallet's own network are separate**. Proceeding with the wallet on Mainnet fails at the signing step.

![](https://files.readme.io/4d84dcc9c9d62fedd803a101f1109ad216423f010a5741ec368db4b41cf94dbf-35-wallet-network-switch.png)

<br />

* Click the wallet address at the top right → switch between `ONE Mainnet` and `ONE Testnet` under `Switch Network`
* The same panel shows **the balance for that network** (tONE on Testnet).
* If the balance is low, top up via `TESTNET Faucet` in the Studio sidebar.

### ③ Select Projects → Link Projects

![](https://files.readme.io/9e1bb940e5354c4637dca72c201837b24e276c294e4716dd15343a411362150f-36-add-project-modal.png)

<br />

* The **RAMP contracts of the projects you select here will be able to mint this token.**
* Each project shows its **name, Project ID, and Ramp Address**.
  * **Check here that the Ramp Address matches the RAMP contract you deployed in 4-2.2.**
* Check the box, click `Link Projects`, then **sign with the Owner address** in your wallet.

### ④ Confirm the Link

![](https://files.readme.io/aa11508c643093dc7f397c2efe4573804ad909da960200320f06a4956c78b65f-37-linked-projects.png)

<br />

* The `Linked Projects` table shows Project · Status `Linked` · Ramp Address · Project ID.
* The `Linked projects: N` line below shows the count.

**Confirm from the project side too** — project `Tokens` → `Linked Contracts`

![](https://files.readme.io/ce97fdce16a9b612fd549d9ed148cfbfd59baf536519e3cab3a6ba19cfac995a-38-project-linked-contracts.png)

<br />

* `Linked (N)` is shown along with Name · Type · Network · Address.
* Entries are **listed separately per Mainnet / Testnet tab** at the top right.

> **Without this link, Mint and Burn will not work no matter what else you configure.** Verify the link status on both screens before integration testing.

### When Signing Fails

| Symptom                              | Cause                                                  | What to do                                       |
| ------------------------------------ | ------------------------------------------------------ | ------------------------------------------------ |
| `Add Project` button is inactive     | Wallet not connected                                   | Reconnect the wallet at the top right            |
| A signature-cancelled notice appears | The signature was not approved in the wallet popup     | Check the wallet popup and sign again            |
| The button stays in a loading state  | The wallet signature popup is hidden behind a window   | Bring the wallet window to the front and approve |
| Signed, but the list is still empty  | **Wallet network does not match the contract network** | Switch the wallet to the same network and retry  |
| Insufficient gas error               | Not enough balance on the Owner address                | Top up via `TESTNET Faucet` or with $ONE         |

## 4-2.4 Known Limitations and Gotchas

Console behaviors worth knowing in advance to save time.

| Behavior                                                                                                            | Impact                                                              | What to do                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **The wallet disconnects** after navigating or switching the network tab                                            | `Deploy Contract` and `Add Project` stop responding                 | Re-check the wallet connection right before you act                                                                                                      |
| **The wallet network and the console network tab are separate**                                                     | Signing a Testnet contract with the wallet on Mainnet fails         | Align them via `Switch Network` in the wallet popup → [4-2.3](https://docs.onechain.nexus/docs/2-contracts#4-23-linking-the-token-contract-to-a-project) |
| Token information and issuance limits **cannot be edited after deployment**                                         | A bad deployment requires redeploying                               | Review all values on the confirmation screen before signing                                                                                              |
| Deploying with `Custom Amount` means **you cannot set issuance limits**                                             | No per-period issuance control, and it cannot be changed afterwards | Deploy with `Zero Initial Supply` if you need limits → [4-2.1](https://docs.onechain.nexus/docs/2-contracts#4-21-deploying-the-token-contract)           |
| The selection counter in the `Add Project` modal shows a different number than the actual selection (`Selected: 2`) | Display bug only; the link result is unaffected                     | Judge by the **checkbox state**, not the counter                                                                                                         |
| Korean strings mixed into the English UI (`Select All (1개)`)                                                        | Display issue                                                       | Can be ignored                                                                                                                                           |

***

## 4-2.5 FAQ

**Can I change the token name after deploying the contract?**
Token information and issuance settings **cannot be changed after deployment.** The project name and icon can be changed in `Settings` → `General`. → [4-1.5](https://docs.onechain.nexus/docs/account-project#4-15-confirming-creation-and-the-project-id)

**Mint and Burn are not working.**
First check whether the token contract is **linked to the project**. → [4-2.3](https://docs.onechain.nexus/docs/2-contracts#4-23-linking-the-token-contract-to-a-project)

**Can Testnet and Mainnet share settings?**
No. Contracts, HMAC Keys, and endpoints are all separate. Keep environment variables separate per network.

<br />