以太坊DApp开发流程
1、搭建Geth(或者下载ganache使用图形化界面进行操作)
在官网上下载并且安装geth:https://geth.ethereum.org/downloads/
或者在国内镜像下载:https://ethfans.org/wikis/Ethereum-Geth-Mirror
2、加载创世区块
将创世文件放到geth的安装目录下,文件的内容为:
{
“coinbase”: “0x0000000000000000000000000000000000000000”,
“config”: {
“homesteadBlock”: 5
},
“difficulty”: “0x20000”,
“extraData”: “0x”,
“gasLimit”: “0x2FEFD8”,
“mixhash”: “0x00000000000000000000000000000000000000647572616c65787365646c6578”,
“nonce”: “0x0”,
“parentHash”: “0x0000000000000000000000000000000000000000000000000000000000000000”,
“timestamp”: “0x00”,
“alloc”: {
“dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6”:
{
“balance”:“100000000000000000000000000000”
}
}
}
注意:该文件的后缀为.json(大部分命名为genesis.json)
3、启