Deployment & Execution on TFSC

0 23
Avatar for Sak1e_
Written by
11 months ago

This chapter introduces how to publish your Token/NFT products or fungible tokens on the transformers main net. Before reading this chapter, please familiarize yourself with information about the Solidity language, the ERC20/ERC721 contract standard. You need to use the Remix tool to compile the contract source code. Make sure you have the contract's source code ready to compile and deploy.

Illustrate

To deploy a contract, please strictly adhere to the Ethereum ERC20/ERC721 contract standards. The types and methods defined in the contract should be named according to the standard. Please note that the transformers blockchain browser currently does not support parsing custom parameter types and function methods.

The reference code is as follows:

  • ERC20

  • ERC721

ERC20 contract deployment Example

Let’s take the ERC-20 from solidity by example as a demonstration.

Contract Deployment

  1. First, open the contract codes for IERC20 and ERC20 in the Remix IDE.

  2. Click on the [Compile xx.sol] option on the right to compile.

  1. Click [Compilation Details] to get the contract attachment information required for deployment, including ABI, metadata, compiler version, and so on.

  1. Record or create a text document to save the necessary auxiliary information for deployment on the host where the transformers program is located. For text files, they can be placed in the default folder specified by the program.

  1. Click [Deploy & run transactions] icon Set token name, total supply, gas limit.

  1. Run the program in menu mode, press 8 to deploy the contract, and enter the corresponding auxiliary parameters to complete the deployment of the contract.

  1. If the constructed function of the contract needs to pass in parameters, it can be passed in at the last item of deployment.

open the deployment option of Remix IDE, fill in the required parameters in the DEPLOY form, and click Parameters to copy the encoded parameters.

Paste the parameters into the program input box to complete the deployment.

  1. If the deployment is successful, the two account addresses of the contract account will be printed on the screen.

1
$ 0.00
Avatar for Sak1e_
Written by
11 months ago

Comments