Unit Zero Docs
  • Home
  • HOW IT WORKS
    • Navigation
    • Overview
    • Key Components
      • Node
      • Network
      • Blockchain
      • Tokens
        • Unit0
        • WAVES
        • L2MP
        • Cross-Layer Transfer
      • Wallet
      • WavesBridge
      • DAO
        • Proposal
      • dApp
    • Terms & Conditions
    • Privacy Notice
  • GUIDES
    • Navigation
    • Node
      • Run Mainnet Node
      • Run Testnet Node
      • Run Testnet UNIT1 Node
    • Network
      • Connect to Mainnet
      • Connect to Testnet
    • Wallet
      • Set Up WX Wallet
    • Tokens
      • Get Tokens
        • Get Unit0
          • Mine Unit0 With Node
          • Get Unit0 via WX Network and Waves Bridge
          • Get Unit0 via Swop.fi and Waves Bridge
        • Get WAVES
        • Get L2MP
      • Bridge Tokens
        • Bridge Unit0 from Waves to Ethereum
        • Bridge Unit0 from Waves to Unit Zero
      • Stake L2MP
    • DAO
      • Proposal
        • Add
        • Edit
        • Retract
        • Vote
    • dApp
      • Deploy
        • Mainnet Deployment
        • Testnet Deployment
Powered by GitBook
On this page
  • Step 1: Connect Wallet
  • Step 2: Create Script
  • Import GitHub Repository
  • Create New Script
  • Step 3: Compile Script
  • Step 4: Deploy dApp
  • Step 5 (Optional): Test dApp
  1. GUIDES
  2. dApp
  3. Deploy

Mainnet Deployment

PreviousDeployNextTestnet Deployment

Last updated 5 months ago

NOTE: Ensure you meet the before deploying a dApp.

Deploy your dApp by following the steps:

  • .

  • .

  • .

  • .

  • .

Step 1: Connect Wallet

.

Step 2: Create Script

You can:

  • with your dApp.

  • Or .

Import GitHub Repository

  1. Open . The File explorer tab will open.

  2. Go to the Git tab.

  3. On the Git tab, expand the GITHUB SETUP block.

  4. In the GITHUB SETUP block:

    1. Click Login with GitHub. The instructions on how to connect your GitHub account will appear.

    2. Follow the given instructions.

  5. On the Git tab, expand the CLONE block.

  6. In the CLONE block:

    1. Click Load from GitHub. The field with your GitHub account's repositories will open.

    2. From the field with your account's repositories, select the relevant repository.

    3. From the field with the repository's branches, select the relevant branch.

    4. Click clone USERNAME_REPOSITORY:BRANCH. The dApp script will be available on the File explorer tab.

Create New Script

  1. On the File explorer tab, click Create new file. The field to enter the filename will open.

  2. In the field, enter the filename. The FILENAME.sol window will open.

  3. Copy and paste the script to the FILENAME.sol window:

    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    
    contract MessageLogger {
       // Variable that stores the message.
       string private currentMessage;
    
       // Method that updates the message.
       function updateMessage(string calldata newMessage) external {
          currentMessage = newMessage;
       }
    
       // Method that retrieves the current message.
       function fetchMessage() external view returns (string memory) {
          return currentMessage;
       }
    }

Step 3: Compile Script

  1. On the Solidity compiler tab, click Compile FILENAME.sol.

Step 4: Deploy dApp

  1. On the Deploy & run transactions tab:

    1. From the Environment drop-down list, select the Injected Provider - MetaMask. The MetaMask extension will open.

  2. In the MetaMask extension, click Connect.

  3. On the Deploy & run transactions tab, click Deploy. The MetaMask extension will open.

  4. In the MetaMask extension, click Confirm. The Deployed Contracts block will display the address of the deployed dApp.

  5. Optional. In the Deployed Contracts block, click Copy Address.

Step 5 (Optional): Test dApp

  1. Paste the dApp address into the searchbar and click Enter on your keyboard. The page with the dApp details will open.

  2. On the dApp details page, go to the Contract tab.

  3. Click Read/Write contract. The Contract information block will display the dApp's methods.

  4. In the Contract information block:

    1. Click the arrow icon next to the method you want to invoke. The method's fields will be displayed.

    2. Click the button with the relevant call type:

      • Read.

      • Or Write.

  5. In the MetaMask wallet, click Confirm. The Unit Zero Mainnet Explorer interface will return the result of the invoked method.

Open . The File explorer tab will open.

In , go to the Solidity compiler tab.

In , go to the Deploy & run transactions tab.

NOTE: This step is mandatory to .

NOTE: Ensure copying the dApp address after its .

Go to the .

In the method's fields, enter the value in the relevant .

Remix IDE
Remix IDE
Remix IDE
test the dApp
deployment
Unit Zero Mainnet Explorer
Solidity Data Type
prerequisites
Step 1: Connect Wallet
Step 2: Create Script
Step 3: Compile Script
Step 4: Deploy dApp
Step 5 (Optional): Test dApp
Follow the steps to connect your Metamask wallet
Import your GitHub repository
Create a new dApp script
Remix IDE
The “Git” tab
The “GITHUB SETUP” block in the “GitHub” tab
The “Login with GitHub” button
The “CLONE” block
The “Load from GitHub” button
The specified repository parameters
The “Create new file” button
The entered dApp filename
The entered dApp script
The “Solidity compiler” tab
The “Compile FILENAME.sol” button
The “Deploy & run transactions” tab
The “Injected Provider - MetaMask” option
The “Connect” button in the MetaMask extension
The “Deploy” button
The “Confirm” button in the MetaMask extension
The “Copy Address” button
The Mainnet Explorer searchbar with the dApp address entered
The “Contract” tab
The “Read/Write contract” button
The arrow icon next to the dApp's method
The “Contract information” block with the field data entered and “Write” button
The “Confirm” button