You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DecCoin from cosmos sdk is not properly encoded/decoded is marked as Dec via option (gogoproto.customtype) = "Dec" but telescope doesn't properly processes it because cosmos proto specifies (gogoproto.customtype) = "Dec" for DecCoin['amount'] field and go_package is specified in the same file at the top. BUT telescope generator expects this option to be fully qualified (i.e., expects (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec").
It means that protofiles parser doesn't take into account option go_package at file level and produces incorrect AST for DecCoin['amount'] field
Additional context
I did some debugging of source code and found out that indeed parser receives Dec (not github.com/cosmos/cosmos-sdk/types.Dec) in args.field.options?.['(gogoproto.customtype)'] that's why encode/decode functions are not properly generated for DecCoin['amount'] property
The text was updated successfully, but these errors were encountered:
Problem
DecCoin from cosmos sdk is not properly encoded/decoded is marked as Dec via option
(gogoproto.customtype) = "Dec"
but telescope doesn't properly processes it because cosmos proto specifies(gogoproto.customtype) = "Dec"
forDecCoin['amount']
field and go_package is specified in the same file at the top. BUT telescope generator expects this option to be fully qualified (i.e., expects(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"
).It means that protofiles parser doesn't take into account
option go_package
at file level and produces incorrect AST forDecCoin['amount']
fieldAdditional context
I did some debugging of source code and found out that indeed parser receives
Dec
(notgithub.com/cosmos/cosmos-sdk/types.Dec
) inargs.field.options?.['(gogoproto.customtype)']
that's why encode/decode functions are not properly generated forDecCoin['amount']
propertyThe text was updated successfully, but these errors were encountered: