无法通过 Remix 部署简单的 Solidity 合约

Fail to Deploy Simple Solidity Contract via Remix

为什么 Remix 无法部署简单合约(从 Mastering Ethereum 一书中简化而来 https://github.com/ethereumbook/ethereumbook/blob/develop/code/Solidity/Faucet2.sol )? --

pragma solidity ^0.4.19;

contract Faucet {
    function withdraw(uint withdraw_amount) public {
        require(withdraw_amount <= 100000000000000000);
        msg.sender.transfer(withdraw_amount);
    }

    function () external payable {}
}

不管我怎么提高 gasLimit and/or gasPrice

你的代码没问题(我自己也试过了)。从我上面看到的情况来看,您还在部署时发送了一个值。由于您没有自己定义构造函数,因此调用了默认的构造函数,这是不需支付的。如果你想在部署合约时发送以太币,你还应该定义一个 payable 构造函数。