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

feat(PXE): Querying contract public information form an app #2904

Open
Tracked by #5070
spalladino opened this issue Oct 18, 2023 · 4 comments
Open
Tracked by #5070

feat(PXE): Querying contract public information form an app #2904

spalladino opened this issue Oct 18, 2023 · 4 comments
Assignees
Labels
C-aztec.js Component: aztec.js client library T-feedback Type: recording user feedback

Comments

@spalladino
Copy link
Collaborator

While we have a decodeReturnValues helper that can be used for converting the return values of a view call, this requires an ABI definition, which we don't have when reading directly from storage via a getPublicStorageAt call.

We should expose helper functions that make it easy to go from a flattened array of fields to a type defined by the user without having an ABI definition for it. Perhaphs it's as simple as requiring only an ABIType instead of a FunctionArtifact as input to decodeReturnValues..?

Requested by Wonderland

@spalladino spalladino added T-feedback Type: recording user feedback C-aztec.js Component: aztec.js client library labels Oct 18, 2023
@github-project-automation github-project-automation bot moved this to Todo in A3 Oct 18, 2023
@rahul-kothari
Copy link
Contributor

so perhaps storage and user defined structs in the ABI? is there any downside to that?

@rahul-kothari
Copy link
Contributor

@spalladino would it be fair for me to re-title this issue to "make storage declarative in the ABI"?

@spalladino
Copy link
Collaborator Author

@rahul-kothari I think making storage declarative is half of it. The other half is having a nice API (in aztecjs?) that uses the raw getStorageAts exposed by the node/pxe, and then uses the declarative storage info to properly decode it.

@LHerskind LHerskind changed the title Expose helpers for converting data read directly from storage via node API feat(PXE): Querying contract public information form an app Mar 9, 2024
@LHerskind
Copy link
Contributor

This issue seems very related to #2806 and both benefit from #5079.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-aztec.js Component: aztec.js client library T-feedback Type: recording user feedback
Projects
Status: Todo
Development

No branches or pull requests

4 participants