Deploy a contract

Deploying Contracts on the ONINO Blockchain Testnet

The ONINO blockchain is fully compatible with the Ethereum Virtual Machine (EVM), allowing smart contracts written in Solidity to function seamlessly, just as they would on Ethereum.

To deploy a smart contract on the ONINO testnet, you'll send a transaction containing the compiled bytecode without specifying any recipient. ONI tokens are required to cover the gas fees associated with deploying contracts. If you're working on the testnet, you can obtain testnet ONI by using the ONINO testnet faucet.

Once deployed, your contract will be available to all users on the ONINO network, and it will have a unique ONINO address, just like any other account on the blockchain.

Requirements:

  • Compiled bytecode of your smart contract (Solidity).

  • ONI tokens to pay for gas costs.

  • A deployment script or tool (such as Remix or Hardhat).

  • Access to a ONINO node (you can run your own node or access a node via an API).

After deployment, you can verify your contract directly through the ONINO testnet explorer for transparency and public interaction.

Deploying Using Remix:

If you'd like to deploy a smart contract using Remix on the ONINO testnet:

  1. Connect MetaMask to the ONINO testnet.

  2. In the Remix IDE, select the Injected Provider - MetaMask option under the "Environment" dropdown.

  3. Ensure the network ID is set to 211223, which is the chain ID for the ONINO testnet.

  4. Once deployed, your contract will be live on the ONINO testnet. You can always check your deployment on testnet.onino.io

Tools

  • Hardhat: Development environment for editing, compiling, debugging, and deploying your smart contracts using the EVM.

  • Truffle: Development environment, testing framework, and asset pipeline for blockchains using the EVM.

  • Remix: IDE that’s used to write, compile, debug, and deploy Solidity code in your browser.

  • Solidity: Solidity is an object-oriented, high-level programming language for implementing smart contracts.

  • OpenZeppelin: OpenZeppelin Contracts helps you minimize risk by using battle-tested libraries of smart contracts for Ethereum and other blockchains.

  • thirdweb: Complete Web3 development framework that provides everything you need to connect your applications and games to decentralized networks.

Using these tools, developers can efficiently write, test, and deploy smart contracts on the ONINO blockchain, taking advantage of its EVM compatibility and secure infrastructure.

Last updated