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

InvalidOutputType("Expected single element, got an empty list") #655

Open
sergeyT2 opened this issue Jul 4, 2022 · 5 comments
Open

InvalidOutputType("Expected single element, got an empty list") #655

sergeyT2 opened this issue Jul 4, 2022 · 5 comments

Comments

@sergeyT2
Copy link

sergeyT2 commented Jul 4, 2022

Hey everyone,

referencing this, obiously #115

The contract I'm querying doesn't have explicit return value. Therefore I'm getting an error of
InvalidOutputType("Expected single element, got a list: []")

How do I type it correctly? web3::contract::Result of something?

@sergeyT2
Copy link
Author

sergeyT2 commented Jul 6, 2022

Provide a PR for this: #656

@tomusdrw
Copy link
Owner

tomusdrw commented Jul 6, 2022

The no-value return type is (), have you tried that?

@sergeyT2
Copy link
Author

sergeyT2 commented Jul 6, 2022

The no-value return type is (), have you tried that?

Yeah, it says trait web3::contract::tokens::Tokenizable not implemented for ()

@sergeyT2
Copy link
Author

@tomusdrw anything happening?

@tomusdrw
Copy link
Owner

tomusdrw commented Jun 2, 2023

Do you mind providing a full example? I don't think parsing an empty value into an empty list as proposed in #656 is the correct behavior.

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