diff --git a/proto/umee/oracle/v1/oracle.proto b/proto/umee/oracle/v1/oracle.proto index 4be9638810..8cecd4a33b 100644 --- a/proto/umee/oracle/v1/oracle.proto +++ b/proto/umee/oracle/v1/oracle.proto @@ -147,7 +147,8 @@ message AvgCounter { // ExchangeRate stores exchange rate with timestamp message ExchangeRate { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; string rate = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 3d4e34f595..4d51ad8e5b 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -336,9 +336,8 @@ type ExchangeRate struct { Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` } -func (m *ExchangeRate) Reset() { *m = ExchangeRate{} } -func (m *ExchangeRate) String() string { return proto.CompactTextString(m) } -func (*ExchangeRate) ProtoMessage() {} +func (m *ExchangeRate) Reset() { *m = ExchangeRate{} } +func (*ExchangeRate) ProtoMessage() {} func (*ExchangeRate) Descriptor() ([]byte, []int) { return fileDescriptor_8893c9e0e94ceb54, []int{7} } @@ -383,75 +382,75 @@ func init() { func init() { proto.RegisterFile("umee/oracle/v1/oracle.proto", fileDescriptor_8893c9e0e94ceb54) } var fileDescriptor_8893c9e0e94ceb54 = []byte{ - // 1077 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xbd, 0x6f, 0x1c, 0x45, - 0x14, 0xbf, 0xc5, 0x1f, 0xb9, 0x9b, 0xb3, 0x13, 0x7b, 0x7d, 0x86, 0x8b, 0x8d, 0x6e, 0x9d, 0x45, - 0x04, 0x17, 0x64, 0x8f, 0x38, 0x7c, 0x88, 0xab, 0xc8, 0x62, 0x42, 0x93, 0x48, 0xd6, 0xc6, 0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96, 0xe5, 0xc1, - 0x03, 0x6d, 0xdb, 0x3d, 0xb0, 0xa4, 0x6e, 0xe8, 0x3a, 0x5d, 0x93, 0x75, 0x7a, 0x6b, 0x5c, 0x3a, - 0x6b, 0x26, 0xbf, 0xaa, 0x4c, 0x53, 0x9a, 0xba, 0x18, 0xdf, 0x80, 0x56, 0x86, 0xf3, 0x70, 0x04, - 0x53, 0x1c, 0x8b, 0x4e, 0xab, 0x7c, 0xd4, 0xa5, 0xe2, 0x47, 0x57, 0x56, 0xbc, 0xa9, 0x22, 0x5e, - 0xe6, 0xd3, 0x0d, 0x56, 0x33, 0x9c, 0x3f, 0x11, 0xa7, 0x7b, 0x88, 0xea, 0xf8, 0x3b, 0x60, 0x7d, - 0x80, 0x19, 0x27, 0x14, 0x47, 0xa1, 0x1c, 0xa2, 0x6a, 0x16, 0x1a, 0x22, 0x89, 0x60, 0xad, 0x02, - 0x1f, 0x0b, 0x4c, 0x37, 0xbf, 0x07, 0xd6, 0x32, 0x14, 0x63, 0x98, 0xcf, 0x32, 0x80, 0x64, 0xac, - 0x2a, 0xc8, 0xbc, 0xff, 0x01, 0x68, 0x65, 0xf0, 0x18, 0x67, 0x45, 0x16, 0x0e, 0x29, 0x8e, 0x90, - 0xa2, 0xb1, 0x76, 0x53, 0x12, 0x6c, 0x8d, 0xed, 0x09, 0x48, 0xd2, 0x98, 0x50, 0x55, 0x31, 0xcc, - 0x48, 0xac, 0xbd, 0xa4, 0x54, 0x69, 0xf0, 0xd1, 0x34, 0x14, 0xeb, 0xd5, 0x9f, 0x3d, 0x77, 0x6a, - 0x7f, 0x3e, 0x77, 0x2c, 0xf7, 0x6f, 0x0b, 0xac, 0xdc, 0x1f, 0x25, 0x9f, 0x93, 0x22, 0xe7, 0x88, - 0xea, 0x51, 0x27, 0x00, 0xc0, 0x51, 0x62, 0x4e, 0x7a, 0x73, 0xe7, 0xa6, 0xa7, 0x56, 0x85, 0x57, - 0xad, 0x0a, 0x6f, 0x57, 0xaf, 0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, 0x88, 0x5f, 0x17, 0x11, 0x9f, 0x8a, 0x11, 0x55, 0x94, 0x5e, 0xfd, 0xdb, 0x4a, - 0xe8, 0xf7, 0x16, 0x58, 0x32, 0xab, 0x6b, 0xfb, 0x60, 0x5e, 0xd6, 0xe9, 0xff, 0x69, 0x95, 0x5c, - 0xdb, 0x07, 0x8d, 0xc9, 0xbf, 0xa0, 0x2b, 0xc9, 0x9b, 0xd2, 0x7a, 0xf3, 0x42, 0x9e, 0xff, 0xf0, - 0xf4, 0x8f, 0x4e, 0xed, 0xf4, 0xac, 0x63, 0xbd, 0x38, 0xeb, 0x58, 0xbf, 0x9f, 0x75, 0xac, 0xa7, - 0xe7, 0x9d, 0xda, 0x8b, 0xf3, 0x4e, 0xed, 0xd7, 0xf3, 0x4e, 0xed, 0x6b, 0xcf, 0x50, 0x25, 0x1a, - 0xf9, 0x4e, 0x8e, 0xf8, 0x11, 0xa1, 0x87, 0xd2, 0xe8, 0x8e, 0x3e, 0xee, 0x1e, 0x57, 0xff, 0xed, - 0xa4, 0xc2, 0xfe, 0xa2, 0x0c, 0x7e, 0xef, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x09, 0x83, - 0x48, 0xf7, 0x09, 0x00, 0x00, + // 1074 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0x92, 0x8f, 0xda, 0xe3, 0xa4, 0x4d, 0x36, 0x0e, 0xb8, 0x09, 0xf2, 0xa6, 0x8b, 0x28, + 0x39, 0xd0, 0x35, 0x4d, 0xf9, 0x10, 0x39, 0xd1, 0x25, 0x94, 0x4b, 0x2b, 0x45, 0xdb, 0xa8, 0x48, + 0x5c, 0x56, 0xe3, 0xdd, 0xc9, 0x7a, 0x14, 0xef, 0x8e, 0x35, 0x33, 0xeb, 0x24, 0x17, 0xce, 0x9c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, 0x96, 0xcc, 0xea, 0xda, 0x3e, 0x98, 0x97, 0x75, 0xfa, 0x6f, 0x5a, 0x25, 0xd7, 0xf6, + 0x41, 0x63, 0xf2, 0x2f, 0x68, 0x26, 0x79, 0x15, 0xad, 0xaa, 0xa5, 0xff, 0xf8, 0xfc, 0xf7, 0x4e, + 0xed, 0xfc, 0xa2, 0x63, 0xbd, 0xbc, 0xe8, 0x58, 0xbf, 0x5d, 0x74, 0xac, 0xe7, 0x97, 0x9d, 0xda, + 0xcb, 0xcb, 0x4e, 0xed, 0x97, 0xcb, 0x4e, 0xed, 0x6b, 0xcf, 0x50, 0x26, 0x9a, 0xf9, 0x5e, 0x86, + 0xf8, 0x31, 0xa1, 0x47, 0xd2, 0xe8, 0x8e, 0x3e, 0xee, 0x9e, 0x94, 0xff, 0xef, 0xa4, 0xca, 0xde, + 0xa2, 0x14, 0xf0, 0xe0, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xed, 0xc7, 0x26, 0x38, 0xfb, 0x09, + 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/oracle/types/vote.go b/x/oracle/types/vote.go index f7e1e028e4..98991c1d56 100644 --- a/x/oracle/types/vote.go +++ b/x/oracle/types/vote.go @@ -108,3 +108,8 @@ func ParseExchangeRateTuples(tuplesStr string) (ExchangeRateTuples, error) { return tuples, nil } + +func (v ExchangeRate) String() string { + bz, _ := json.Marshal(v) + return string(bz) +} diff --git a/x/oracle/types/vote_test.go b/x/oracle/types/vote_test.go index 82b06d01b6..97b968b572 100644 --- a/x/oracle/types/vote_test.go +++ b/x/oracle/types/vote_test.go @@ -2,9 +2,10 @@ package types import ( "testing" + "time" sdk "github.com/cosmos/cosmos-sdk/types" - "gotest.tools/v3/assert" + "github.com/stretchr/testify/assert" ) func TestAggregateExchangeRatePrevoteString(t *testing.T) { @@ -45,7 +46,7 @@ func TestExchangeRateTuplesString(t *testing.T) { func TestParseExchangeRateTuples(t *testing.T) { valid := "uumee:123.0,uatom:123.123" _, err := ParseExchangeRateTuples(valid) - assert.NilError(t, err) + assert.NoError(t, err) duplicatedDenom := "uumee:100.0,uatom:123.123,uatom:121233.123" _, err = ParseExchangeRateTuples(duplicatedDenom) @@ -72,5 +73,11 @@ func TestParseExchangeRateTuples(t *testing.T) { assert.ErrorContains(t, err, "invalid exchange rate") _, err = ParseExchangeRateTuples("") - assert.NilError(t, err) + assert.NoError(t, err) +} + +func TestExchangeRateString(t *testing.T) { + t1 := time.Date(2022, 9, 18, 15, 55, 01, 0, time.UTC) + er := ExchangeRate{Rate: sdk.MustNewDecFromStr("1.5"), Timestamp: t1} + assert.Equal(t, `{"rate":"1.500000000000000000","timestamp":"2022-09-18T15:55:01Z"}`, er.String()) }