-
Notifications
You must be signed in to change notification settings - Fork 116
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 #1253
Add support for type AnyStruct #1253
Conversation
…luesDeprecationNotice with Integer as type
…ndFix64NumberDeprecationNotice
🦋 Changeset detectedLatest commit: 4e07a86 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thank you @ObjectPlayer for your contribution! Would you be able to add a
|
Sure @justinbarry let me add |
Hey @ObjectPlayer ! Thank you for taking the time to prepare this PR, we sincerely appreciate your time and effort to help improve FCL! 🚀
Think of
Eg:
But the arguments passed for It is not possible to pass In FCL, our types library aims to strictly support all types that are permissible as arguments to a transaction or script. |
Hey @JeffreyDoyle , Thanks for your feedback. Yes I am agree with you that I have a use case, where I have a dictionary which have You can say it is very hard to achieve this, but it is possible. |
Hey @ObjectPlayer, It is not possible to submit arguments with For your use case, you'll need to check the type of the argument that is to be included in the transaction or script that you're submitting, and then use the correct FCL type binding for it. Eg: Check the value is a string, and use the |
@ObjectPlayer For this functionality to be added to FCL, it first has to be supported by Cadence, which it isn't at the moment, see https://docs.onflow.org/cadence/json-cadence-spec/. All values need to specify their concrete type, Cadence does not, and will not be able to infer, the concrete type based on the value (a string) alone. |
Thanks @turbolent , yeah it makes sense to me, If Cadence is not supporting this at the moment, than yes this functionality can't be added to FCL. Thanks @JeffreyDoyle for the alternative solutions, we are already using this solution but IMO there should be a way to send dynamic type values by using |
Hey @ObjectPlayer , I totally empathize with your need and can see why such a feature would be helpful! We'll take this feedback and be sure to think of any possible solutions going forward! I'm going to close this PR as this functionality shouldn't be added to FCL as it is unsupported by cadence. Thank you for taking the time to create this PR! We sincerely appreciate the time and effort it took, and look forward to any future contributions you may have! Happy building! 🚀 |
Hey Team,
This branch contains
AnyStruct
type support and having test-cases to test all non-resource types and values that are under theAnyStruct
This branch will resolve #1237