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

Add support for type AnyStruct #1237

Closed
ObjectPlayer opened this issue Jun 8, 2022 · 3 comments
Closed

Add support for type AnyStruct #1237

ObjectPlayer opened this issue Jun 8, 2022 · 3 comments
Assignees

Comments

@ObjectPlayer
Copy link

Add support for type AnyStruct

Hey Team, I am working on flow testcases in js using flow-js-testing library. I am trying to pass AnyStruct as an argument for my transactions and scripts but I am unable to pass it.
I have already create an issue on flow-cadut you can see more details on that link. After more debugging I found that issue is occurring from @onflow/types as there is no any support for AnyStruct in flow types.

Issue To Be Solved

To resolve that issue, we need to add support for AnyStruct in flow types.

@JeffreyDoyle
Copy link
Member

Hey @ObjectPlayer ,

AnyStruct is only a super-type of all non-resource types in Cadence. it is not possible to construct a value from AnyStruct type, and not possible to use AnyStruct as an argument for a script or transaction.

Happy building!

@ObjectPlayer
Copy link
Author

ObjectPlayer commented Jun 14, 2022

Hi @JeffreyDoyle ,

Yes I am agree with you that AnyStruct is the super-type of all non-resource types in Cadence, but I didn't understand your statement that

it is not possible to construct a value from AnyStruct type, and not possible to use AnyStruct as an argument for a script or transaction

I think fcl has the issue because of flow-types. I am working on that part and soon will complete it and create a PR. Once we have support for AnyStruct in flow/types than we can easily work flow-cadut to support it as an argument for transaction/scripts

@justinbarry
Copy link
Contributor

Closed see: #1253 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants