Author: Wyz_Research
When you don’t know how to deploy a contract, you may not be able to call it BUIDL.
Every airdrop enthusiast will enter the chain and application as a user, but from the perspective of the chain, users have certain hierarchical boundaries. Among them, for the chain, application developers are The most valuable.
Application developers develop dApp that can attract users to use it. Gas will be generated during use. Developers will deploy contracts on the chain and actively attract users to perform chain operations. The chain itself The value will increase infinitely.
So, it can be said that having development capabilities or simple development knowledge is a better way to increase the chances of obtaining airdrops, or to be more precise, to become a real builder on the chain.
In this article, we will describe in detail the simple development knowledge required by a user who likes to experience chain operations. Among them, it will not involve building a front-end, building a development environment or SDK corresponding operations. This article will lead ordinary users into the theoretical period of development experience for novices. If they want to enter the practical period, they can continue to study other in-depth knowledge.
Building an understanding framework from blockchain theory
Our previous article "How to use technical logic to dismantle new and old projects around the world?" "The definition of the attributes of blockchain is explained in "Blockchain is not just a general ledger. All public chains that exist today are designed for superficial application development.
So understanding the development knowledge of the chain is consistent with the Internet development and application itself. In terms of architectural understanding, it is just that the backend has become a chain, and the data status originally in the database has become the data status on the chain. .
For Internet application development, you first need to purchase cloud services (in earlier times, you may access the network through computing devices or deploy them as servers). Suppose we purchase two servers, one for front-end deployment and one for Deploy the backend, purchase a website, configure the website and front-end development parts, and then develop the backend to manage data. The interactive data of the website will enter the backend when used, and front-end users need to obtain feedback when operating. When data is re-operated, it is executed after accessing the data status in the database.
Based on such a complex process, in traditional applications, users basically cannot feel the backend, but in the blockchain, they can clearly feel the frontend and backend.
The backend of dApp turns the servers and databases used in Internet application development into chains and the overall state on the chain.
During development, the chain at the backend exposes a remote call interface rpc. All developers and applications operate the chain through this interface.
This is why when using MetaMask to experience different dApp , you need to add different networks to dApp . When adding a network, url represents rpc access point.
In other network designs, there is another way to upgrade the dApp again. If a chain only uses one rpc, and a large amount of interaction is required, just before the task is submitted to the chain The access process will be congested.
At this time, if it is possible to build an application by yourself rpc , it will have a greater advantage. However, in the current public chain field, with the current pos design, the dApp operates like this ;Not much.
At this point, we can basically figure out that when we interact with the chain for development actions, we will need a wallet and an rpc port.
Important development tools
After getting the entrance, the next step is how to perform operations on the chain.
Ethereum is known as the world computer, and it can run various types of automatically executed smart contracts. This process is carried out by deploying contracts to the network and being executed by EVM.
The word virtual machine VM is a word that will definitely be mentioned in the cloud service industry. We can think of the computing device in the Ethereum network as a huge computing storage area, that is, a virtual machine. The virtual machine gives smart contracts the ability to run and complete the execution of task instructions.
Then smart contracts become the key, and the core link for developers to experience is smart contracts.
The deployment of smart contracts is divided into writing the code first, compiling the code second, and deploying it third. After the deployment is completed, the contract function can be directly called.
Ethereum has fixed tools, and these tools have been extremely simplified. After understanding the entire process, you can try the entire process by looking carefully.
Remix, Hardhat, and OpenZeppelin are currently the simplest and most open tools. In addition to these open source tools, there are also tools such as Thirdweb that can assist development and simplify some processes.
Start with the experience of various network testnets
Recently, we have experienced the testnets of public chains such as Berachain, Taiko, and Shardeum. You can learn about development knowledge from the experience process of these chains.
First of all, I am a normal user and I use the MetaMask operation to interact with the network. The first step is to add the test network in MetaMask and obtain the tokens in the test network. The test network tokens are obtained from the test network faucet. The quantity is limited. They are listed in the official documents of the three projects. The collection process was announced. The test tokens of these three chains are Bera, ETH, and SHM.
It can be found that Berachain and Shardeum are both L1 and use their own native tokens, while Taiko is L2 and their goal is to expand Ethereum, so they use ETH , and, because Ethereum has a public test network, Taiko also used Ethereum's own test network to conduct some functional tests. If users want to experience it, they need to know which chain it will ultimately implement.
After getting the experience tokens from the faucets of the three chains, the next step is to try how to use development tools to deploy the contract to the chain.
So there are three steps in the next step: find the contract, modify the contract, and complete the contract deployment in the IDE
The documentation pages of the three projects will clearly indicate which tools will be supported for corresponding contract deployment. After checking, these three projects all support the use of Remix for deployment, so we will use Remix for this process.
Remix is an online editable environment, which is very convenient. There is no need to use other more complex tools such as SDK or terminal. However, the simple process in this article is only a one-time deployment, modification and call to the contract. Testing these still requires other tools.
1. How to find the contract to be deployed
On OpenZeppelin , several commonly used token issuance contracts are modularly displayed. We can directly Select a feature there and jump directly to Remix.
This is the initial page:
2. Make simple modifications to the contract code
Then I set up the contract for issuing token , using the full name of Wyz Research , the abbreviation of Wyz , and selected The pre-release of the function was carried out, and the control ownership of the contract was specified. Through these operations, the contract code on the right has the builder shown in the first red box, and the pre-release tokens also have addresses to point to.
3. How to deploy the contract
Next click Open in Remix in the upper right corner, and we can start editing in the Remix interface.
Before starting editing in the Remix interface , please adjust the network and wallet addresses in the MetaMask correctly first.
After entering the page, we need to modify the two corresponding addresses above. I used the wallet address to replace them. The display is as follows:
Then click  on the left ;Auto compile, that is, automatic compilation. If there is no automatic compilation, you need to click the blue button on the left. When a green check mark appears on the far left. Then click the button under the green check on the left to enter the deployment page.
When the wallet has been modified correctly, Click on the account section in the upper left corner. This position represents the account for paying gas , and the position below represents the deployment address. After selecting, it will appear as follows:
Click Deploy, MetaMask will pop up to pay the gas fee for this operation.
During the contract deployment process, in Remix  ;The contract will be displayed on the lower side pending
Contract deployment After success, the transaction success will be displayed on the lower side.
4. Query transactions in the browser
After completing the deployment, when you click the button in the wallet to enter the browser to view the transaction, you can find that we have just completed the action of creating a contract, and during the execution of the contract, a corresponding transaction was sent to one of the tokens. of tokens.
When you click the address again to view it, you will find , I Mint got 1000 W tokens in the address. However, it seems that due to the testnet browser, the token name is not displayed, and this issue remains to be verified.
This deployment uses Shardeum. If deployed on Berachain and Taiko, the process is the same. You only need to adjust the corresponding network in the wallet. Remix This type of online IDE provides a simple entrance to network operations.
To carry out certain development operations on the chain, it is the simplest construction attempt for non-application users. You can try to use contracts to issue some assets, or fork other dApp codes. Every dApp contract on the chain interacts through combination. For example, the swap we see of Uniswap is one contract, and the one that provides LP is another A contract.
Compared with Dex, other Defi and Gamefi contracts are more complex. Although the development process is complex and lengthy, for enthusiasts, understanding its principles can help chains and applications build more.