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 fails with complex type as argument #24572

Closed
infiloop2 opened this issue Mar 22, 2022 · 3 comments
Closed

Abigen fails with complex type as argument #24572

infiloop2 opened this issue Mar 22, 2022 · 3 comments

Comments

@infiloop2
Copy link

System information

Geth version: v1.10.16
OS & Version: OSX
Commit hash: -

Expected behaviour

abigen produces a go wrapper

Actual behaviour

abigen errors out

Steps to reproduce the behaviour

Save this as Example.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.6;

library Example {
  enum Field {
    F1
  }

  function example(Field x) public view {}
}

Run:

solc-select use 0.8.6
./abigen --pkg example --sol Example.sol

Backtrace

Fatal: Failed to generate ABI binding: unsupported arg type: Example.Field
@infiloop2
Copy link
Author

Interestingly this works if I change 'library' to 'contract'

@rjl493456442
Copy link
Member

I have opened an issue in solidity repo. Looks like Solidity compiler doesn't generate the expected abi for library. Let's see how it's responded there. ethereum/solidity#12867

@holiman
Copy link
Contributor

holiman commented Aug 20, 2024

This is stale, abigen no longer supports sol, instead it expects the solc-artefacts as input, and leaves it to the user to invoke solc.

@holiman holiman closed this as completed Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@ligi @holiman @rjl493456442 @infiloop2 and others