Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bluecryolite opened this issue Jun 29, 2018 · 0 comments
Open

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

bluecryolite opened this issue Jun 29, 2018 · 0 comments

Comments

@bluecryolite
Copy link

这是合约编译的版本与以太坊的一次硬分叉后的版本不对应导致的。可以参看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");

Honglei-Cong pushed a commit to Honglei-Cong/bcos that referenced this issue Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant