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

Code generation does not work with abigen 1.9.18-stable #45

Open
pdyraga opened this issue Aug 6, 2020 · 1 comment
Open

Code generation does not work with abigen 1.9.18-stable #45

pdyraga opened this issue Aug 6, 2020 · 1 comment

Comments

@pdyraga
Copy link
Member

pdyraga commented Aug 6, 2020

After upgrading abigen from 1.9.10-stable to 1.9.18-stable I can no longer generate contracts code:

/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/tools/generators/ethereum/contract_parsing.go:154:12: method.Const undefined (type abi.Method has no field or method Const)
/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/tools/generators/ethereum/contract_parsing.go:167:24: param.Type.Type undefined (type abi.Type has no field or method Type)
/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/tools/generators/ethereum/contract_parsing.go:202:26: output.Type.Type undefined (type abi.Type has no field or method Type)
/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/tools/generators/ethereum/contract_parsing.go:215:42: method.Outputs[0].Type.Type undefined (type abi.Type has no field or method Type)
/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/tools/generators/ethereum/contract_parsing.go:232:12: method.Const undefined (type abi.Method has no field or method Const)
/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/tools/generators/ethereum/contract_parsing.go:251:24: param.Type.Type undefined (type abi.Type has no field or method Type)
make: *** [contract/TokenStaking.go] Error 2
pkg/chain/gen/contract.go:3: running "sh": exit status 2
pdyraga added a commit to keep-network/keep-ecdsa that referenced this issue Aug 6, 2020
Repair lcl-initialize script

The sortition pool creation logic in lcl-initialize.js script, didn't consider a case when getSortitionPool 
method returned a zero address. 

It is a workaround for ethereum/go-ethereum#21083 - instead of failing,
contract call returns address 0x0. Once we are able to update to the most recent abigen 
see keep-network/keep-common#45), the additional case for 0x0 address 
should be removed.
@Shadowfiend
Copy link
Contributor

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

2 participants