Finschia / finschia-sdk

A framework for building blockchains based Finschia Mainnet that is forked from cosmos-sdk
Apache License 2.0
63 stars 30 forks source link

Add UnpackInterfaces to MsgExecute #1269

Closed Mdaiki0730 closed 6 months ago

Mdaiki0730 commented 6 months ago

Description

The cachedValue of types.Any is accessed using m.GetCachedValue() of MsgExecution, but the value does not exist. GetCachedValue: https://github.com/Finschia/finschia-sdk/commit/ca6ca76ea1eb5d3aff74bb8fe8910445c3b456ed#diff-39e18d04623a49896a23eaa0d8f555e86d380907384bb93160bcbf7ac8c89e02R66

I implement UnpackInterfaces like txBody.

txBody.UnpackInterfaces: https://github.com/Finschia/finschia-sdk/blob/ca6ca76ea1eb5d3aff74bb8fe8910445c3b456ed/types/tx/types.go#L170-L180

A value is added to cachedValue by implementing UnpackInterfaces. https://github.com/Finschia/finschia-sdk/blob/ca6ca76ea1eb5d3aff74bb8fe8910445c3b456ed/codec/types/interface_registry.go#L249

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (feat/zkauth@ca6ca76). Click here to learn what that means.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1269/graphs/tree.svg?width=650&height=150&src=pr&token=m16qfzIPO7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) ```diff @@ Coverage Diff @@ ## feat/zkauth #1269 +/- ## ============================================== Coverage ? 69.62% ============================================== Files ? 659 Lines ? 68200 Branches ? 0 ============================================== Hits ? 47487 Misses ? 18476 Partials ? 2237 ``` | [Files](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | Coverage Δ | | |---|---|---| | [x/zkauth/types/msgs.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC96a2F1dGgvdHlwZXMvbXNncy5nbw==) | `32.89% <0.00%> (ø)` | |