test: add test for unpacking interface on validator request (#9391)
* test unpack on validator * *add line to docs about validator being encoded in any * add test to show how to unpack interfaces with validator object * Update docs/core/encoding.md Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> * sort imports * Update docs/core/encoding.md Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com> Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
This commit is contained in:
co-authored by
Amaury
Ryan Christoffersen
technicallyty
parent
44a41383f4
commit
a93ed22860
@@ -197,7 +197,8 @@ The above `Profile` example is a fictive example used for educational purposes.
|
||||
- the `sdk.Msg` interface for encoding different `Msg`s in a transaction,
|
||||
- the `AccountI` interface for encodinig different types of accounts (similar to the above example) in the x/auth query responses,
|
||||
- the `Evidencei` interface for encoding different types of evidences in the x/evidence module,
|
||||
- the `AuthorizationI` interface for encoding different types of x/authz authorizations.
|
||||
- the `AuthorizationI` interface for encoding different types of x/authz authorizations,
|
||||
- the [`Validator`](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/x/staking/types/staking.pb.go#L306-L337) struct that contains information about a validator.
|
||||
|
||||
A real-life example of encoding the pubkey as `Any` inside the Validator struct in x/staking is shown in the following example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user