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 dev-inspect-txn to RPC and SDK #6998

Closed
wants to merge 1 commit into from

Conversation

gegaowp
Copy link
Contributor

@gegaowp gegaowp commented Dec 22, 2022

This PR is based on #6538 and exposes the dev-inspect endpoint to RPC and SDK.

Testing: WIP and will add in a bit.

@vercel
Copy link

vercel bot commented Dec 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
explorer 🔄 Building (Inspect) Dec 22, 2022 at 8:38PM (UTC)
wallet-adapter ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Dec 22, 2022 at 8:38PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
explorer-storybook ⬜️ Ignored (Inspect) Dec 22, 2022 at 8:38PM (UTC)

results: DevInspectResultsType;
};

export type ResultType = 'Ok' | 'Err;';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@666lcz is this the right way to handle Rust Result here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Result will deserialize to {'OK': [(),()]} and {'Err': ""}. The best way to figure out the schema is to write a ts e2e test

returnValues: ReturnValueType[];
};

export type MutableReferenceOutputType = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@666lcz This is a tuple in Rust, I saw codes around using structs like this to handle tuple in Rust as well, so presumably this should work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work. It will just deserialize to a list. Can we change the type of mutable_reference_outputs on the rust side to a struct instead of tuple?

Copy link
Contributor

@amnn amnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM so I'll accept to unblock, but noting that there are some questions for @666lcz on the TS SDK side.

@666lcz
Copy link
Contributor

666lcz commented Dec 22, 2022

Let's definitely add TS e2e test for this given so many newly added types since it's hard to verify by human eyes

@666lcz
Copy link
Contributor

666lcz commented Dec 23, 2022

Closing this in favor of #7008

@666lcz 666lcz closed this Dec 23, 2022
666lcz added a commit that referenced this pull request Dec 23, 2022
Same as #6998 but
- fixed typescript types
- Relax RPC restriction for calling non-entry functions

Co-authored-by: Ge Gao <106119108+gegaowp@users.noreply.github.com>
666lcz added a commit that referenced this pull request Dec 23, 2022
Same as #6998 but
- fixed typescript types
- Relax RPC restriction for calling non-entry functions

Co-authored-by: Ge Gao <106119108+gegaowp@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

None yet

3 participants