Intelligent contract

When it comes to Ethereum development, there’s no getting around smart contracts.

A smart contract, which is actually an agreement, is a kind of rule that regulates transactions, transfers, and so on. A smart contract can also be understood as a “piece of code”, and the developer is executing the “piece of code” to get a result, which could be the result of a transfer, etc.

When developing Ethereum, developers need to write smart contracts first, and then deploy smart contracts to corresponding Ethereum nodes. Ethereum is deployed on different servers, and nodes jointly maintain the Ethereum public chain. Callers access the smart contracts by calling ethereum interfaces, and obtain corresponding results.

remix

Ethereum also has a response development tool for developers at ————remix, remix-online, as well as an IDE development tool, remix-Desktop

use

Like normal IDE tools, Remix also supports syntax highlighting and code hints, as well as error messages

After enabling automatic compilation, you can preview the editing results in real time, which is convenient for us to correct grammar errors in time.

Simple smart contracts

Let’s write a simple additive smart contract

contract Test { function add(uint8 arg1, uint8 arg2) public pure returns (uint8) { return arg1 + arg2; }}Copy the code

A simple smart contract is implemented.

Welcome to refer to my blog, let’s grow together: Feilong.tech