-
Notifications
You must be signed in to change notification settings - Fork 189
feat: add support for payment channel actor in state decode params API #5996
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
Merged
akaladarshi
merged 14 commits into
main
from
akaladarshi/add-paych-account-state-decode-params
Sep 2, 2025
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a0316a1
add support for the payment channel actor in state decode params api
akaladarshi 2d41366
add snapshot tests for payment channel actor
akaladarshi 9dab12b
Merge branch 'main' into akaladarshi/add-paych-account-state-decode-p…
akaladarshi c06d003
Merge branch 'main' into akaladarshi/add-paych-account-state-decode-p…
akaladarshi 6f90a71
Merge branch 'main' into akaladarshi/add-paych-account-state-decode-p…
akaladarshi 2eb9cf8
Merge branch 'main' into akaladarshi/add-paych-account-state-decode-p…
akaladarshi fd6f1f3
Merge branch 'main' into akaladarshi/add-paych-account-state-decode-p…
akaladarshi 1c77323
Merge branch 'main' into akaladarshi/add-paych-account-state-decode-p…
akaladarshi 2d11cb9
Merge branch 'main' into akaladarshi/add-paych-account-state-decode-p…
akaladarshi 9294ab7
Merge branch 'main' into akaladarshi/add-paych-account-state-decode-p…
akaladarshi 0cb47b0
Merge remote-tracking branch 'origin/main' into akaladarshi/add-paych…
akaladarshi a678163
fix formatting issue
akaladarshi 6553588
address comment
akaladarshi afb45bf
Merge branch 'main' into akaladarshi/add-paych-account-state-decode-p…
akaladarshi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| // Copyright 2019-2025 ChainSafe Systems | ||
| // SPDX-License-Identifier: Apache-2.0, MIT | ||
|
|
||
| use crate::rpc::registry::methods_reg::{MethodRegistry, register_actor_methods}; | ||
| use crate::shim::message::MethodNum; | ||
| use cid::Cid; | ||
|
|
||
| macro_rules! register_payment_channel_reg_versions { | ||
| ($registry:expr, $code_cid:expr, $version:literal) => {{ | ||
| paste::paste!{ | ||
| use fil_actor_paych_state::[<v $version>]::{ConstructorParams, Method, UpdateChannelStateParams}; | ||
| } | ||
|
|
||
| // Register methods with parameters | ||
| register_actor_methods!( | ||
| $registry, | ||
| $code_cid, | ||
| [ | ||
| (Method::Constructor, ConstructorParams), | ||
| (Method::UpdateChannelState, UpdateChannelStateParams), | ||
| ] | ||
| ); | ||
|
|
||
| // Register methods without parameters | ||
| register_actor_methods!( | ||
| $registry, | ||
| $code_cid, | ||
| [(Method::Settle, empty), (Method::Collect, empty),] | ||
| ); | ||
| }}; | ||
| } | ||
|
|
||
| pub(crate) fn register_actor_methods(registry: &mut MethodRegistry, cid: Cid, version: u64) { | ||
| macro_rules! register_versions { | ||
| ($($version:literal),+) => {{ | ||
| match version { | ||
| $( | ||
| $version => register_payment_channel_reg_versions!(registry, cid, $version), | ||
| )+ | ||
| _ => {} | ||
| } | ||
| }}; | ||
| } | ||
| register_versions!(8, 9, 10, 11, 12, 13, 14, 15, 16) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.