You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for AnyStruct as arg in transactions and scripts
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 and getting some errors.
I have passed AnyStruct as dictionary as: transaction(data:{String:AnyStruct})
than I got following error:
Also I have passed AnyStruct as an argument directly as: transaction(data:AnyStruct)
than I got this error:
After debugging the my code and node_modules libraries, I got that flow-js-testing is using flow-cadut.
flow-cadut has a resolveArguments method at args.js file which resolve and validate arguments, but it doesn't seem to support AnyStruct for now.
Issue To Be Solved
To solve this issue, we need to support AnyStruct as an argument of transaction and script.
Suggest A Solution
In type-checker.js we can add a new type-checker method for AnyStruct than we can use that method in args.js and relevant files to support AnyStruct. It is not complete solution but we can work on that and add support to AnyStruct as an argument.
Let me know if it is supported already or work in progress to support it.
Thanks
The text was updated successfully, but these errors were encountered:
Support for AnyStruct as arg in transactions and scripts
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 and getting some errors.I have passed
AnyStruct
as dictionary as:transaction(data:{String:AnyStruct})
than I got following error:
Also I have passed
AnyStruct
as an argument directly as:transaction(data:AnyStruct)
than I got this error:
After debugging the my code and node_modules libraries, I got that flow-js-testing is using flow-cadut.
flow-cadut has a
resolveArguments
method atargs.js
file which resolve and validate arguments, but it doesn't seem to supportAnyStruct
for now.Issue To Be Solved
To solve this issue, we need to support
AnyStruct
as an argument of transaction and script.Suggest A Solution
In
type-checker.js
we can add a new type-checker method forAnyStruct
than we can use that method inargs.js
and relevant files to supportAnyStruct
. It is not complete solution but we can work on that and add support toAnyStruct
as an argument.Let me know if it is supported already or work in progress to support it.
Thanks
The text was updated successfully, but these errors were encountered: