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

accounts/abi: fix method constant flag for solidity 6.0 #20482

Merged
merged 2 commits into from
Jan 6, 2020

Conversation

Magicking
Copy link
Contributor

This patch fix abigen that no longer works with the recent change in solidity 6.0 (e.g: removing constant from the ABI in favor of "StateMutability" (nonpayable, view, pure), see https://github.com/ethereum/solidity/releases).

The patch conserves the internal constant representation and doesn't allow the new more verbose state to be exposed which worries me a bit.

@Magicking Magicking changed the title Fix abigen with new StateMutability ABI parameter cmd/abigen: Fix the new StateMutability ABI parameter Dec 25, 2019
Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Could you please also add a corresponding unit test in accounts/abi/bind/bind_test.go?

@Magicking
Copy link
Contributor Author

I added some test to check the presence of free retrieval functions, tests falling on MacOS that doesn't seem related to the code I pushed though, weird.

--- FAIL: TestTimerFunc (0.19s)
    timer_test.go:51: tm.Max(): 35e6 > 188812018 || 188812018 > 145e6
FAIL

Copy link
Member

@gballet gballet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fjl fjl changed the title cmd/abigen: Fix the new StateMutability ABI parameter accounts/abi: fix method constant Jan 6, 2020
@fjl fjl changed the title accounts/abi: fix method constant accounts/abi: fix method constant flag for solidity 6.0 Jan 6, 2020
@fjl fjl merged commit b7cf41e into ethereum:master Jan 6, 2020
enriquefynn pushed a commit to enriquefynn/go-ethereum that referenced this pull request Mar 10, 2021
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

Successfully merging this pull request may close these issues.

4 participants