Skip to content

调用ecrecover方法,报out of gas问题的解决 #107

@bluecryolite

Description

@bluecryolite

这是合约编译的版本与以太坊的一次硬分叉后的版本不对应导致的。可以参看Chriseth的解释:
https://ethereum.stackexchange.com/questions/44028/ecrecover-throwing-out-of-gas-error-on-ropsten

解决的方法是:
编译合约的时候,增加编译参数:--evm-version homestead。该参数在solidity 0.4.21版本起,获得支持。

因此,建议修改tool/deploy.js,在合约编译的时候,增加如上参数。如:
execSync("~/github/solidity/build/solc/solc --evm-version homestead --abi --bin --overwrite -o "+config.Ouputpath+" "+filename+".sol");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions