Smart Contract

Introduction

EQ Hub's Contract Library is a service that helps you easily deploy various smart contracts on a blockchain network. Through the contract library service, you can explore various smart contracts and deploy the smart contracts you want to the blockchain network.

A smart contract is a program that runs when predefined conditions are met in the blockchain. It is significant because it is a self-executing contract that does not require an intermediary.

By using EQ Hub's contract library service, you can deploy the desired smart contract by simply setting data such as the blockchain network to deploy the smart contract and the smart contract name, without the need to implement the smart contract as code.

Equilibrium, the EQBR blockchain engine, uses its own consensus method for consensus but uses EVM for execution, so EQ Hub handles EVM-based smart contracts. Therefore, all smart contracts used in other networks that support EVM can be used.

Suppose you deploy the desired smart contract using the contract library. In that case, you can save various types of costs required in the existing method, such as coding and inspection for smart contract distribution.


Glossary

This is a glossary of terms to help you understand when using Contract Library services.

TermDescription
ERCERC (Ethereum Request for Comment) is the name of an official protocol that proposes improvements to the Ethereum network, and the number written after ERC means the serial number of the proposal registered in ERC.
ERC-20It is a standard specification that defines the interface that a standard token must satisfy in a smart contract defined in EIP.
Also referred to as the Token Standard.
ERC-721It is a standard specification of NFT (Non-Fungible Token) defined in EIP.
Also referred to as the Non-Fungible Token (NFT) Standard.
Unlike tokens that follow the ERC-20 standard, tokens issued using ERC-721 are non-fungible and all have their own value.
Fixed contractIt is a smart contract that cannot be modified after deployment.
Upgradable contractDue to the immutability of blockchain, once data is stored, it cannot be changed or deleted and can only be added. Smart contracts, once deployed, cannot be changed even if bugs are later discovered.
If a smart contract is newly deployed, the address of the newly deployed smart contract must be delivered to the user. Significant time and cost may incur in transferring the previous data.
An upgradable contract is composed of a Proxy pattern to solve these problems.

When a bug occurs in the smart contract logic, the smart contract can be modified without affecting the existing data by changing only the implementation contract address contained in the proxy contract.
Proxy contractThis contract is responsible for the data area in the Upgradable contract.
Implementation contractThis contract is in charge of the logic area in the Upgradable contract.
ConstructorAs a function defined in the smart contract, it is executed when the contract is deployed.
FunctionsThese are functions that make up a smart contract, and can be called from transactions or other smart contracts.
EventsStores information about actions that occurred during transaction execution. Every time an event is executed, it is saved in the Transaction Log.

πŸ“˜

Notes

Decimal means the smallest unit of the asset (coin or token) in a blockchain network.
In other words, if you want to move 100 coins or tokens, the input value should be multiplied by 'the number to move * decimal'.

The blockchain network created by EQ Hub uses 10^18 as the decimal standard.

Therefore, in the area where you enter the value related to the quantity of coins, you must enter the value multiplied by 10^18 to the desired quantity.

When entering a value related to the token quantity, the desired quantity must be multiplied by the decimal defined in the token smart contract.

The smart contract provided by EQ Hub also uses 10^18 as a decimal unit.
It is recommended to read the description of each smart contract for the exact form of the argument to be entered.

Below is an explanation of the type of arguments that must be entered when using the contract library service.

TypeDescription
stringString data type.
addressIt means the form of wallet address.
It starts with 0x and must consist of a total of 42 characters.
bytesA dynamically sized byte array.
byte(N)A byte array of size N.
uintOnly positive numbers can be entered, up to 2^256 - 1.
boolPossible values are true, false.

For more information, see Solidity Docs - Types

Below is a glossary of terms to help you understand when using smart contracts.

TermDescription
CallThis function corresponds to β€˜view’ among the types of functions defined in smart contracts. You can query the data stored in the smart contract but cannot change it.
TransactionThis function can change the value stored in the smart contract. In addition, in order to execute, you must pay the transaction fee of the network where the smart contract is deployed.