我正在尝试使用 Ethereum Wallet client (mist) 在专用网络中部署智能合约。虽然我有足够的资金,但应用程序抱怨我没有足够的资金来支付 * gas price+value。
智能合约代码:
pragma solidity ^0.4.18;
contract HelloWorld {
uint256 counter = 0;
/* Constructor */
function Increase() public {
counter++;
}
function Decrease() public {
counter--;
}
function GetCounter() public constant returns(uint256){
return counter;
}
}
** Genesis.json **
{
"config": {
"chainId": 0,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc" : {},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x20000",
"extraData" : "",
"gasLimit" : "0x2fefd8",
"nonce" : "0x0000000000000041",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00"
}
Geth 命令:
geth --datadir=./chaindata
注意:我是以太坊区块链开发的新手,所以试图通过创建私人网络来获得经验