diff --git a/proto/ojo/oracle/v1/genesis.proto b/proto/ojo/oracle/v1/genesis.proto index 36b27191..d476d3c7 100644 --- a/proto/ojo/oracle/v1/genesis.proto +++ b/proto/ojo/oracle/v1/genesis.proto @@ -3,6 +3,7 @@ package ojo.oracle.v1; import "gogoproto/gogo.proto"; import "ojo/oracle/v1/oracle.proto"; +import "ojo/oracle/v1/elys.proto"; import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/ojo-network/ojo/x/oracle/types"; @@ -26,6 +27,9 @@ message GenesisState { repeated PriceStamp medians = 7 [ (gogoproto.nullable) = false ]; repeated PriceStamp historic_prices = 8 [ (gogoproto.nullable) = false ]; repeated PriceStamp median_deviations = 9 [ (gogoproto.nullable) = false ]; + repeated AssetInfo asset_infos = 10 [ (gogoproto.nullable) = false ]; + repeated Price prices = 11 [ (gogoproto.nullable) = false ]; + repeated PriceFeeder price_feeders = 12 [ (gogoproto.nullable) = false ]; } // FeederDelegation is the address for where oracle feeder authority are diff --git a/x/oracle/types/errors.go b/x/oracle/types/errors.go index 9a7d0062..e85e0b28 100644 --- a/x/oracle/types/errors.go +++ b/x/oracle/types/errors.go @@ -38,4 +38,6 @@ var ( ErrNonEqualInjVotesLen = errors.Register(ModuleName, 28, "number of exchange rate votes in vote extension and extended commit info are not equal") //nolint: lll ErrNonEqualInjVotesRates = errors.Register(ModuleName, 29, "injected exchange rate votes and generated exchange votes are not equal") //nolint: lll ErrNoCommitInfo = errors.Register(ModuleName, 30, "no commit info in process proposal request") + ErrNotAPriceFeeder = errors.Register(ModuleName, 31, "not a price feeder") + ErrPriceFeederNotActive = errors.Register(ModuleName, 32, "price feeder is not active") ) diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go index 6091fc17..4d8e05a5 100644 --- a/x/oracle/types/genesis.pb.go +++ b/x/oracle/types/genesis.pb.go @@ -36,6 +36,9 @@ type GenesisState struct { Medians []PriceStamp `protobuf:"bytes,7,rep,name=medians,proto3" json:"medians"` HistoricPrices []PriceStamp `protobuf:"bytes,8,rep,name=historic_prices,json=historicPrices,proto3" json:"historic_prices"` MedianDeviations []PriceStamp `protobuf:"bytes,9,rep,name=median_deviations,json=medianDeviations,proto3" json:"median_deviations"` + AssetInfos []AssetInfo `protobuf:"bytes,10,rep,name=asset_infos,json=assetInfos,proto3" json:"asset_infos"` + Prices []Price `protobuf:"bytes,11,rep,name=prices,proto3" json:"prices"` + PriceFeeders []PriceFeeder `protobuf:"bytes,12,rep,name=price_feeders,json=priceFeeders,proto3" json:"price_feeders"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -161,43 +164,48 @@ func init() { func init() { proto.RegisterFile("ojo/oracle/v1/genesis.proto", fileDescriptor_88726d9a54067831) } var fileDescriptor_88726d9a54067831 = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x6e, 0xd3, 0x30, - 0x1c, 0x6f, 0xb6, 0xd1, 0x31, 0x77, 0x1d, 0x9b, 0x05, 0x52, 0x28, 0x2c, 0x1b, 0x93, 0x90, 0x86, - 0xaa, 0x25, 0xea, 0x7a, 0xe2, 0xb8, 0xae, 0x63, 0x1c, 0x40, 0x9a, 0x3a, 0xc4, 0x01, 0x09, 0x45, - 0x6e, 0xe2, 0xa6, 0xee, 0x9a, 0x38, 0xf8, 0xef, 0x95, 0xc2, 0x53, 0xf0, 0x00, 0x3c, 0x01, 0x4f, - 0xd2, 0xe3, 0x8e, 0x9c, 0xf8, 0x68, 0x5f, 0x04, 0xc5, 0x4e, 0xfa, 0x11, 0x6d, 0xa8, 0xa7, 0x46, - 0xff, 0xdf, 0x97, 0x7f, 0xd5, 0xdf, 0x46, 0x4f, 0x78, 0x8f, 0x3b, 0x5c, 0x10, 0xaf, 0x4f, 0x9d, - 0x41, 0xcd, 0x09, 0x68, 0x44, 0x81, 0x81, 0x1d, 0x0b, 0x2e, 0x39, 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xf4, 0x99, 0x4f, 0x24, 0x9f, 0x31, 0x57, 0x14, - 0x73, 0x7b, 0x0a, 0xa4, 0xe4, 0x83, 0x8f, 0xa8, 0x34, 0xb7, 0x4c, 0xb7, 0x6b, 0x8d, 0xdb, 0xb5, - 0xf8, 0x19, 0xda, 0x9c, 0x5f, 0x56, 0x95, 0xb1, 0xd6, 0x2a, 0xcd, 0x6d, 0x62, 0xe3, 0x7c, 0xf4, - 0xd7, 0x2a, 0x8c, 0xc6, 0x96, 0x71, 0x33, 0xb6, 0x8c, 0x3f, 0x63, 0xcb, 0xf8, 0x36, 0xb1, 0x0a, - 0x37, 0x13, 0xab, 0xf0, 0x73, 0x62, 0x15, 0x3e, 0xbc, 0x98, 0xbb, 0x29, 0xbc, 0xc7, 0x8f, 0x22, - 0x2a, 0x3f, 0x73, 0x71, 0x95, 0x7c, 0x3b, 0xc3, 0xec, 0x61, 0x51, 0x17, 0xa6, 0x5d, 0x54, 0xaf, - 0x46, 0xfd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x47, 0x32, 0x61, 0xa8, 0xb5, 0x04, 0x00, 0x00, + // 644 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xdb, 0x4e, 0xd4, 0x40, + 0x18, 0xde, 0x05, 0x5c, 0x64, 0x76, 0x17, 0x61, 0x82, 0x49, 0xad, 0x52, 0x90, 0xc4, 0x04, 0x43, + 0x68, 0x03, 0x5c, 0x79, 0x65, 0x38, 0x89, 0x26, 0x9a, 0x90, 0xc5, 0x78, 0x61, 0x62, 0x9a, 0xd9, + 0xf6, 0xdf, 0x32, 0xb0, 0xed, 0xd4, 0xfe, 0xc3, 0x0a, 0x3e, 0x85, 0xcf, 0xe1, 0x93, 0x70, 0xc9, + 0x25, 0x57, 0x1e, 0xe0, 0x45, 0x4c, 0x67, 0xa6, 0x7b, 0x68, 0x16, 0xc3, 0xd5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, 0x24, 0xaa, + 0xb2, 0xb7, 0x6b, 0xea, 0x8b, 0xb7, 0xf5, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x21, 0xd8, 0xec, 0x79, + 0x8b, 0x05, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -220,6 +228,48 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.PriceFeeders) > 0 { + for iNdEx := len(m.PriceFeeders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PriceFeeders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } + if len(m.Prices) > 0 { + for iNdEx := len(m.Prices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Prices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } + if len(m.AssetInfos) > 0 { + for iNdEx := len(m.AssetInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AssetInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } if len(m.MedianDeviations) > 0 { for iNdEx := len(m.MedianDeviations) - 1; iNdEx >= 0; iNdEx-- { { @@ -484,6 +534,24 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.AssetInfos) > 0 { + for _, e := range m.AssetInfos { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Prices) > 0 { + for _, e := range m.Prices { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.PriceFeeders) > 0 { + for _, e := range m.PriceFeeders { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -860,6 +928,108 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssetInfos = append(m.AssetInfos, AssetInfo{}) + if err := m.AssetInfos[len(m.AssetInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Prices = append(m.Prices, Price{}) + if err := m.Prices[len(m.Prices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceFeeders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceFeeders = append(m.PriceFeeders, PriceFeeder{}) + if err := m.PriceFeeders[len(m.PriceFeeders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index f3d9c9f6..b8800e93 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -56,9 +56,9 @@ type Params struct { // Currency Deviation Thresholds defines the deviation thresholds // for each base currency the price feeder uses upon start up. CurrencyDeviationThresholds CurrencyDeviationThresholdList `protobuf:"bytes,15,rep,name=currency_deviation_thresholds,json=currencyDeviationThresholds,proto3,castrepeated=CurrencyDeviationThresholdList" json:"currency_deviation_thresholds" yaml:"currency_deviation_thresholds"` - // Price expiry of in unix time for elys prices + // Price expiry in unix time for elys prices PriceExpiryTime uint64 `protobuf:"varint,16,opt,name=price_expiry_time,json=priceExpiryTime,proto3" json:"price_expiry_time,omitempty"` - // Lifetime of elys price in blocks + // Lifetime of an elys price in blocks LifeTimeInBlocks uint64 `protobuf:"varint,17,opt,name=life_time_in_blocks,json=lifeTimeInBlocks,proto3" json:"life_time_in_blocks,omitempty"` }