Generate smart contracts to Blockchain Network

Learn how to import smart contracts published on EQ Hub and deploy contracts to blockchain networks.

Through the contract library service, explore various smart contracts and deploy the smart contracts you want to the blockchain network!

This guide explains how to:

  • Searching and importing public smart contracts
  • Deploying smart contract

Searching and getting public smart contracts

Click [Developer] - [Contract Library] in the menu to enter the page to view the list of open smart contracts. You can click on each smart contract to see detailed information about that contract.


Searching smart contract details

You can check the information below if you click a specific contract in the smart contract list.


Contract Info

This is the basic information of the smart contract.

DataDescription
Contract TitleThe name of the smart contract registered in the Contract Library.
Contract IDThis is the ID of the smart contract registered in the contract library.
Contract TypeThe type of smart contract selected. It consists of one Fixed, Implementation, and Proxy.
ERCThe ERC type of the selected smart contract. It consists of one of ERC-20, ERC-721, etc.
DescriptionThis is the description of the smart contract registered in the Contract Library.

Version Info

This is the version information of the selected smart contract.

DataDescription
Contract VersionAmong the version information registered in the selected smart contract, you can check the versions published in the contract library.
The currently selected smart contract version information is displayed.
Contract DisclosureMeans whether the chosen smart contract is public or not.
Version DescriptionA detailed description of the currently selected smart contract version.

Contract Functions (Constructor, Function, Event)

The functions that make up the smart contract are displayed.

Functions that make up smart contracts are composed of the following types.

  • Constructor
    • Displays the name, type, and description of parameters required when Constructor is executed.
  • Functions
    • The name of the function and the name, type, and description of the arguments required when the function is executed are displayed.
  • Events
    • The name of the event and the name, type, and description of the parameters required when the event is executed are displayed.

For details on the types of functions that make up a smart contract, refer to Smart Contract.


Generating smart contract

🚧

Check the pre-conditions before generating the smart contract

In order to generate a smart contract, the user's project must have a selected network.
For information on the network selected by Project, refer to Project.

You can generate the desired smart contract by clicking the [Get] button on the smart contract details page. After generating a smart contract, you can deploy the smart contract to a specific blockchain network through the contract list page.


1. Entering common information

This is the information that must be entered in common to generate the smart contract.

DataDescriptionExample
Network / MicrochainChoose the network on which you want to deploy your smart contract.EQ Hub Mainnet
Contract NameThis is the name registered on the contract list.EQ Hub Airdrop
MemoA brief description of the smart contract being imported.This is Airdrop contract for EQ Hub mainnet

2. Entering the implementation contract address (Optional)

Enter the address of the deployed Implementation Contract to connect with the proxy contract.

📘

Notes

This process is carried out only when generating the proxy contract.
To import a Fixed, Implementation contract, skip this step and proceed to step 3.

3. Entering arguments

Enter the parameters required for the function that is executed when the smart contract is deployed according to the required type.

For information on the argument type, refer to here.

4. Generating smart contract

After entering all the information, click the [Add] button to import the smart contract.

5. Checking generated smart contract list and details

Click [ Developer ] - [ Contract Library ] on the menu bar to enter the contract list page. You can check the list of smart contracts you have imported on the Contract List page.

Among the smart contracts on the list, click on the smart contract you want to check detailed information on to enter the detailed page. You can check detailed information about the imported smart contract on the contract details page.


Deploying the smart contract

Click [ Developer ] - [ Contract Library ] to enter the contract list page. You can enter the detailed page by clicking on the smart contract to be deployed on the contract list page.

🚧

Before deploying a smart contract, check the pre-conditions.

  • EQ Hub Wallet must be installed to deploy smart contracts.
    For information related to EQ Hub Wallet, check EQ Hub Wallet (Extension).
  • In order to deploy a smart contract, you must have more than the transaction fee of the coins of the network on which you want to deploy the smart contract.

Connecting wallet

  1. Click the ‘Connect’ button at the bottom of the details page.
  2. Click the ‘Connect’ button shown on the EQ Hub extension screen.
  3. When the connection is complete, the button displays the wallet address along with the phrase ‘Disconnect’.

Deploying smart contract

Smart Contract Owner

At the time the smart contract is deployed, the entity that signed the transaction that deploys the smart contract becomes the owner of the smart contract.

The owner of the smart contract can change the settings of the contract or handle all functions of the contract, including functions that only the owner can execute.

For smooth use of the contract, it is recommended to back up the information of the connected wallet at the time of distribution.

  1. After completing the wallet connection, click the ‘Deploy’ button.
  2. Sign the transaction by clicking the ‘Certificate’ button shown on the EQ Hub extension screen.
  3. Click the button and wait for a while; the smart contract deployment is complete.

Concluding

Through the above process, we looked at importing the desired smart contract from the EQ Hub's contract library and deploying it to the blockchain network. Now, you can build any type of Web3 application by utilizing the deployed smart contract.

If you want to use the deployed smart contract, please refer to it here.