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 a StateDecodeParams method #4105

Merged
merged 1 commit into from
Oct 31, 2020
Merged

Add a StateDecodeParams method #4105

merged 1 commit into from
Oct 31, 2020

Conversation

arajasek
Copy link
Contributor

No description provided.


// TODO: ActorUpgrade: Support versioning
// TODO: Doesn't work well for methods that have params as params (Init's Exec, multisig Propose, etc.)
func DumpParams(code cid.Cid, method abi.MethodNum, b []byte) (interface{}, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -422,6 +422,29 @@ func (a *StateAPI) StateReadState(ctx context.Context, actor address.Address, ts
}, nil
}

func (a *StateAPI) StateDecodeParams(ctx context.Context, msgCid cid.Cid, tsk types.TipSetKey) (interface{}, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should just have this take a target actor, method ID and params bytes? That makes this quite a bit more flexible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

donesies

@magik6k magik6k merged commit a5c05f8 into master Oct 31, 2020
@magik6k magik6k deleted the asr/decode-params branch October 31, 2020 00:05
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.

3 participants