geth --datadir data init gensis.json
有很多可选参数
geth --datadir --verbosity 4 console 2>>detail.log
personal.newAccount("123456")
miner.start();admin.sleepBlocks(1);miner.stop()
eth.getBalance(myAddress)
myAddress = "地址"
solc --bin code.tol
solc --abi code.tol
然后用变量表示代码
到了这里还没有成功,部署智能合约的交易还没有得到确认,可以通过以下命令确认
txpool.status
pending表示交易还没确认
通过挖矿确认
miner.start();admin.sleepBlocks(1);miner.stop()
其中contract是合约遍历,multiply是合约函数
这是个交易,所以也需要挖矿确认