Improve the cli state call command #6226
Merged
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.
./lotus state call
is currently unusable for most actor methods, as parameter parsing does not support many types.This PR changes the
call
command to accept parameters as base64 or hex strings, as these formats are used extensively in other CLI commands.Additionally,
call
has been changed to support multiple formats for message return:decoded
(default): Returns JSON based on the return type of the method calledraw
: Returns the raw[]byte
found in the receipthex
: Converts the returned data to hexbase64
Converts the returned data to base64Here's an example: