Skip to main content

Deploying a contract with Remix

Remix IDE is a browser-based Solidity IDE — the fastest way to compile and deploy a contract to ZENIQ Smart Chain without a local toolchain. Because ZENIQ Smart Chain is EVM-compatible, Remix talks to it through MetaMask exactly as it would to Ethereum.

Step 0 — Add ZENIQ Smart Chain to MetaMask

If you haven't already, add the network to MetaMask using the settings from the MetaMask integration guide:

FieldValue
Network NameZENIQ Smart Chain
RPC URLhttps://api.zeniq.network
Chain ID383414847825
Currency SymbolZENIQ
Block Explorerhttps://zeniqscan.com

Select the ZENIQ Smart Chain network in MetaMask and make sure the account you intend to deploy from holds a little ZENIQ for gas.

Step 1 — Open Remix and write a contract

Open remix.ethereum.org. In the File Explorer, create a new file (e.g. Storage.sol). A minimal example:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

contract Storage {
uint256 private value;

function store(uint256 newValue) public {
value = newValue;
}

function retrieve() public view returns (uint256) {
return value;
}
}
Use Solidity 0.8.19 (London EVM)

ZENIQ Smart Chain targets the London instruction set and does not support the PUSH0 opcode introduced in Shanghai. In Remix's Solidity Compiler tab, select compiler 0.8.19, and under Advanced Configurations set EVM Version to london. Newer compilers may emit bytecode you can deploy but not successfully call.

Step 2 — Compile

Open the Solidity Compiler tab, confirm the compiler version and EVM version above, and click Compile Storage.sol.

Step 3 — Connect Remix to ZENIQ Smart Chain

Open the Deploy & Run Transactions tab. In the Environment dropdown, choose Injected Provider - MetaMask. MetaMask will prompt you to connect; approve it, and make sure the selected network is ZENIQ Smart Chain (chain ID 383414847825). Remix now shows your account and its ZENIQ balance.

Step 4 — Deploy

With your contract selected under Contract, click Deploy. MetaMask opens a confirmation popup showing the gas fee in ZENIQ — click Confirm.

After the transaction is mined (~4 s), the deployed contract appears under Deployed Contracts. Expand it to call its functions (store, retrieve), each of which is another MetaMask-confirmed transaction or a free view call.

You can verify the deployment and inspect transactions on zeniqscan.com.