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

rpc-v2/archive: Rename archive call method result to value #7885

Merged
merged 6 commits into from
Mar 21, 2025

Conversation

lexnv
Copy link
Contributor

@lexnv lexnv commented Mar 11, 2025

This PR modifies the archive_call method result to align with the rpc-v2 spec:

Previously, the method result was encoded to a json containing a "result" field, however the spec specifies a "value" field. This aims to rectify that.

cc @paritytech/subxt-team

@lexnv lexnv added the T3-RPC_API This PR/Issue is related to RPC APIs. label Mar 11, 2025
@lexnv lexnv self-assigned this Mar 11, 2025
@lexnv lexnv changed the title rpc-v2/archive: Rename archive call' method result to value rpc-v2/archive: Rename archive call method result to value Mar 11, 2025
Signed-off-by: Alexandru Vasile <[email protected]>
@@ -49,7 +49,7 @@ pub enum MethodResult {
impl MethodResult {
/// Constructs a successful result.
pub fn ok(result: impl Into<String>) -> MethodResult {
MethodResult::Ok(MethodResultOk { success: true, result: result.into() })
MethodResult::Ok(MethodResultOk { success: true, value: result.into() })
Copy link
Member

Choose a reason for hiding this comment

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

is this only used by the archive API?
why not move it to the archive module so it doesn't get used by something else?

Copy link
Member

Choose a reason for hiding this comment

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

yes, these are only used by the archive APIs

Copy link
Member

Choose a reason for hiding this comment

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

@Polkadot-Forum
Copy link

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/stabilizing-the-archive-rpc-v2-methods/12058/1

@niklasad1 niklasad1 enabled auto-merge March 19, 2025 15:44
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/13974913011
Failed job name: test-linux-stable-no-try-runtime

@niklasad1 niklasad1 added this pull request to the merge queue Mar 21, 2025
Merged via the queue into master with commit e1a1e4d Mar 21, 2025
251 of 256 checks passed
@niklasad1 niklasad1 deleted the lexnv/align-archive-call-w-spec branch March 21, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T3-RPC_API This PR/Issue is related to RPC APIs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants