Geth installation
Ethernet Square has a lot of clients, we choose Geth, which is based on the Go language development.
The official address to download the appropriate installation package or Geth domestic mirrored address
Solidity compiler environment installed
We use Browser-Solidity for development. Browser-Solidity is a browser-based Solidity, online programming, you can also see the next time you open the file was last written after adding a bookmark.
Solidity video tutorials https://www.bilibili.com/video/av38555778?from=search&seid=5128487101037421273
Square Ethernet network
- Square Ethernet production network
- Square test Ethernet network TestNet
- Square Ethernet private network PrivateNetwork
Square building private Ethernet network
Create a directory and profile creation block
Creation block the establishment of profiles genesis.json, enter the following:
{
"nonce": "0x0000000000000042",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x00",
"gasLimit": "0x80000000",
"difficulty": "0x1",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc": { },
"config":{
"chainId":15,
"homesteadBlock":0,
"eip155Block":0,
"eip158Block":0
}
}
Creation create blocks in genesis.json directory, enter the command line
geth --datadir ethereum init genesis.json
Ethereum will automatically generate a folder, there are two folders geth and keystore
Geth into the console
Command line input geth --datadir ethereum --nodiscover --dev.period 1 console
Chinese version of the console [command options] [argument ...]
Here will be successful
New command line, enter account
personal.newAccount ( "12345") code is 12345, account files are stored in keystore
Check account
eth.accounts