Open JulianToledano opened 1 month ago
This looks like an issue, but made me realize we shouldn't be exposing that command at all, given that it's meant to be used only through gov proposals
This looks like an issue, but made me realize we shouldn't be exposing that command at all, given that it's meant to be used only through gov proposals
We should expose the command, it will create a gov proposal thanks to https://github.com/cosmos/cosmos-sdk/blob/03d70aa/x/protocolpool/autocli.go#L73
Is there an existing issue for this?
What happened?
When calling create-continuous-fund with a percentage expressed as a float, the command panics.
As I understand, auto-cli generates dynamicpb messages using protoreflect message Descriptor() and Interface(). In the case of MsgCreateContinuousFund, the percentage is set as a human-readable number.
Thus, it fails when decoding, as the unmarshalling of LegacyDec expects a machine representation of the floating-point number.
https://github.com/cosmos/cosmos-sdk/blob/ab6400fbfd4e6310214c19a9e536d56dc6e30c38/x/protocolpool/types/tx.pb.go#L2885-L2887
Cosmos SDK Version
main
How to reproduce?
./simd tx protocolpool create-continuous-fund cosmos18mfx85veapt3xs0vdr2cx9skeregs9sqawku8f 0.1 --summary test --title test --deposit 100000stake