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

abigen --sol no longer works #1625

Closed
chappjc opened this issue May 25, 2022 · 2 comments · Fixed by #1626
Closed

abigen --sol no longer works #1625

chappjc opened this issue May 25, 2022 · 2 comments · Fixed by #1626
Assignees

Comments

@chappjc
Copy link
Member

chappjc commented May 25, 2022

With abigen from go-ethereum 1.10.18, we can no longer do this:

abigen --sol ${SOLIDITY_FILE} --pkg ${PKG_NAME} --out ./${PKG_NAME}/contract.go

ethereum/go-ethereum#24936

@chappjc chappjc self-assigned this May 25, 2022
@chappjc chappjc linked a pull request May 25, 2022 that will close this issue
@jeffprestes
Copy link

Meanwhile an alternative might be https://github.com/jeffprestes/abigen-golang
I had to create it to avoid to break my project's scripts and might be useful here too. I hope it helps.

@chappjc
Copy link
Member Author

chappjc commented May 26, 2022

Thanks.

I've found that using the combined-json switch on both abigen and solc is helpful as it combines everything rather than having to force you to deal with multiple files (e.g. .bin .bin-runtime .abi etc.). e.g.

solc --combined-json abi,bin --optimize --overwrite contract.sol -o .
abigen --combined-json combined.json --pkg contract --out contract.go

(of course that is still a change to scripts and such, but it's relatively straightforward)

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 a pull request may close this issue.

2 participants