diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a7aa78832..2ec5ae2374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,7 +54,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/fbridge) [\#1369](https://github.com/Finschia/finschia-sdk/pull/1369) Add the event of `SetBridgeStatus` * (x/fswap) [\#1372](https://github.com/Finschia/finschia-sdk/pull/1372) support message based proposals * (x/fswap) [\#1387](https://github.com/Finschia/finschia-sdk/pull/1387) add new Swap query to get a single swap -* (x/fswap) [\#1382](https://github.com/Finschia/finschia-sdk/pull/1382) add validation & unit tests in fswap module +* (x/fswap) [\#1382](https://github.com/Finschia/finschia-sdk/pull/1382) add validation & unit tests in fswap module +* (x/fswap) [\#1396](https://github.com/Finschia/finschia-sdk/pull/1396) refactor to use snake_case in proto ### Bug Fixes * (x/auth) [#1281](https://github.com/Finschia/finschia-sdk/pull/1281) `ModuleAccount.Validate` now reports a nil `.BaseAccount` instead of panicking. (backport #1274) diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 571b868dbd..bb66382199 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -35356,11 +35356,11 @@ paths: type: string format: byte parameters: - - name: fromDenom + - name: from_denom in: query required: false type: string - - name: toDenom + - name: to_denom in: query required: false type: string @@ -35433,11 +35433,11 @@ paths: type: string format: byte parameters: - - name: fromDenom + - name: from_denom in: query required: false type: string - - name: toDenom + - name: to_denom in: query required: false type: string @@ -35626,11 +35626,11 @@ paths: type: string format: byte parameters: - - name: fromDenom + - name: from_denom in: query required: false type: string - - name: toDenom + - name: to_denom in: query required: false type: string diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 32205add25..29be19ce5c 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -14727,8 +14727,8 @@ GenesisState defines the fswap module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `fromDenom` | [string](#string) | | | -| `toDenom` | [string](#string) | | | +| `from_denom` | [string](#string) | | | +| `to_denom` | [string](#string) | | | @@ -14758,8 +14758,8 @@ GenesisState defines the fswap module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `fromDenom` | [string](#string) | | | -| `toDenom` | [string](#string) | | | +| `from_denom` | [string](#string) | | | +| `to_denom` | [string](#string) | | | @@ -14821,8 +14821,8 @@ GenesisState defines the fswap module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `fromDenom` | [string](#string) | | | -| `toDenom` | [string](#string) | | | +| `from_denom` | [string](#string) | | | +| `to_denom` | [string](#string) | | | diff --git a/proto/lbm/fswap/v1/query.proto b/proto/lbm/fswap/v1/query.proto index e5fa09168b..e6dad9fd14 100644 --- a/proto/lbm/fswap/v1/query.proto +++ b/proto/lbm/fswap/v1/query.proto @@ -31,8 +31,8 @@ service Query { } message QuerySwappedRequest { - string fromDenom = 1; - string toDenom = 2; + string from_denom = 1; + string to_denom = 2; } message QuerySwappedResponse { cosmos.base.v1beta1.Coin from_coin_amount = 1 @@ -42,8 +42,8 @@ message QuerySwappedResponse { } message QueryTotalSwappableToCoinAmountRequest { - string fromDenom = 1; - string toDenom = 2; + string from_denom = 1; + string to_denom = 2; } message QueryTotalSwappableToCoinAmountResponse { cosmos.base.v1beta1.Coin swappable_amount = 1 @@ -51,8 +51,8 @@ message QueryTotalSwappableToCoinAmountResponse { } message QuerySwapRequest { - string fromDenom = 1; - string toDenom = 2; + string from_denom = 1; + string to_denom = 2; } message QuerySwapResponse { Swap swap = 1 [(gogoproto.nullable) = false]; diff --git a/x/fswap/types/query.pb.go b/x/fswap/types/query.pb.go index 7f5685ac75..d72d3e70e8 100644 --- a/x/fswap/types/query.pb.go +++ b/x/fswap/types/query.pb.go @@ -32,8 +32,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type QuerySwappedRequest struct { - FromDenom string `protobuf:"bytes,1,opt,name=fromDenom,proto3" json:"fromDenom,omitempty"` - ToDenom string `protobuf:"bytes,2,opt,name=toDenom,proto3" json:"toDenom,omitempty"` + FromDenom string `protobuf:"bytes,1,opt,name=from_denom,json=fromDenom,proto3" json:"from_denom,omitempty"` + ToDenom string `protobuf:"bytes,2,opt,name=to_denom,json=toDenom,proto3" json:"to_denom,omitempty"` } func (m *QuerySwappedRequest) Reset() { *m = QuerySwappedRequest{} } @@ -136,8 +136,8 @@ func (m *QuerySwappedResponse) GetToCoinAmount() types.Coin { } type QueryTotalSwappableToCoinAmountRequest struct { - FromDenom string `protobuf:"bytes,1,opt,name=fromDenom,proto3" json:"fromDenom,omitempty"` - ToDenom string `protobuf:"bytes,2,opt,name=toDenom,proto3" json:"toDenom,omitempty"` + FromDenom string `protobuf:"bytes,1,opt,name=from_denom,json=fromDenom,proto3" json:"from_denom,omitempty"` + ToDenom string `protobuf:"bytes,2,opt,name=to_denom,json=toDenom,proto3" json:"to_denom,omitempty"` } func (m *QueryTotalSwappableToCoinAmountRequest) Reset() { @@ -236,8 +236,8 @@ func (m *QueryTotalSwappableToCoinAmountResponse) GetSwappableAmount() types.Coi } type QuerySwapRequest struct { - FromDenom string `protobuf:"bytes,1,opt,name=fromDenom,proto3" json:"fromDenom,omitempty"` - ToDenom string `protobuf:"bytes,2,opt,name=toDenom,proto3" json:"toDenom,omitempty"` + FromDenom string `protobuf:"bytes,1,opt,name=from_denom,json=fromDenom,proto3" json:"from_denom,omitempty"` + ToDenom string `protobuf:"bytes,2,opt,name=to_denom,json=toDenom,proto3" json:"to_denom,omitempty"` } func (m *QuerySwapRequest) Reset() { *m = QuerySwapRequest{} } @@ -441,47 +441,47 @@ func init() { func init() { proto.RegisterFile("lbm/fswap/v1/query.proto", fileDescriptor_01deae9da7816d6a) } var fileDescriptor_01deae9da7816d6a = []byte{ - // 630 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x41, 0x6f, 0xd3, 0x30, - 0x18, 0x6d, 0x4a, 0xcb, 0x34, 0x33, 0x8d, 0xe2, 0x75, 0xa2, 0x84, 0x91, 0x96, 0x1c, 0x36, 0x04, - 0xc3, 0x56, 0xb7, 0xf1, 0x03, 0x56, 0xd0, 0x40, 0x48, 0x48, 0x50, 0x76, 0x82, 0x43, 0x71, 0x3a, - 0x37, 0x8b, 0x68, 0xe2, 0xac, 0x76, 0xbb, 0xf5, 0xca, 0x01, 0x71, 0x41, 0x42, 0xe2, 0x2f, 0x70, - 0xe2, 0x4f, 0x70, 0xdd, 0x71, 0x12, 0x17, 0x4e, 0x80, 0x5a, 0x7e, 0x08, 0xb2, 0xe3, 0xac, 0x89, - 0xb6, 0xac, 0x9a, 0xa6, 0xdd, 0xdc, 0x7c, 0xef, 0x7b, 0xef, 0xf9, 0xe9, 0xfb, 0x5c, 0x50, 0xe9, - 0x3a, 0x3e, 0xee, 0xf0, 0x7d, 0x12, 0xe2, 0x41, 0x1d, 0xef, 0xf5, 0x69, 0x6f, 0x88, 0xc2, 0x1e, - 0x13, 0x0c, 0xce, 0x75, 0x1d, 0x1f, 0xa9, 0x0a, 0x1a, 0xd4, 0xcd, 0x25, 0x97, 0x31, 0xb7, 0x4b, - 0x31, 0x09, 0x3d, 0x4c, 0x82, 0x80, 0x09, 0x22, 0x3c, 0x16, 0xf0, 0x08, 0x6b, 0x96, 0x5d, 0xe6, - 0x32, 0x75, 0xc4, 0xf2, 0xa4, 0xbf, 0xde, 0x6f, 0x33, 0xee, 0x33, 0x8e, 0x1d, 0xc2, 0x69, 0x44, - 0x8d, 0x07, 0x75, 0x87, 0x0a, 0x52, 0xc7, 0x21, 0x71, 0xbd, 0x40, 0x51, 0x68, 0xac, 0x95, 0xc4, - 0xc6, 0xa8, 0x36, 0xf3, 0xe2, 0x7a, 0xda, 0x67, 0x64, 0x4b, 0x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x78, 0x0e, 0x4a, 0xc7, 0x03, 0x71, 0xd1, 0x2b, 0x6f, 0x82, 0x1b, 0x09, 0x2e, 0x7d, 0xb7, - 0x55, 0x50, 0x90, 0x9a, 0xfa, 0x3e, 0x10, 0x25, 0x17, 0x0f, 0x49, 0x64, 0xa3, 0x20, 0x2f, 0xd2, - 0x54, 0x28, 0xfb, 0x6d, 0x82, 0x82, 0xc7, 0x7e, 0xb6, 0x00, 0x98, 0xac, 0x94, 0x26, 0x5a, 0x4e, - 0x05, 0x13, 0xad, 0x76, 0x1c, 0xcf, 0x4b, 0xe2, 0x52, 0xdd, 0xdb, 0x4c, 0x74, 0xda, 0x9f, 0x0d, - 0x00, 0x93, 0xec, 0xda, 0x21, 0x02, 0x45, 0xa9, 0xcd, 0x2b, 0x46, 0xed, 0xca, 0x99, 0x16, 0x23, - 0x18, 0x7c, 0x9a, 0xb2, 0x13, 0x4d, 0xeb, 0xca, 0x54, 0x3b, 0x91, 0x58, 0xd2, 0xcf, 0xda, 0xa7, - 0x02, 0x28, 0x2a, 0x3f, 0x90, 0x81, 0x19, 0xbd, 0x91, 0xf0, 0x6e, 0x5a, 0xfe, 0x94, 0xed, 0x37, - 0xed, 0xb3, 0x20, 0x91, 0x8e, 0x7d, 0xe7, 0xc3, 0xcf, 0x7f, 0x5f, 0xf3, 0x37, 0xe1, 0x22, 0x4e, - 0xbd, 0x2d, 0x5c, 0xab, 0xfc, 0x30, 0x80, 0x99, 0x3d, 0x98, 0x70, 0xe3, 0x14, 0x85, 0xa9, 0xab, - 0x62, 0x3e, 0x3a, 0x67, 0x97, 0xb6, 0xba, 0xa1, 0xac, 0x22, 0xb8, 0x9a, 0xb6, 0x2a, 0x64, 0x67, - 0x6b, 0xb2, 0x17, 0xe9, 0x57, 0x02, 0xb6, 0x41, 0x41, 0xd2, 0x42, 0x2b, 0x23, 0x8c, 0xd8, 0x54, - 0x35, 0xb3, 0xae, 0xe5, 0x4d, 0x25, 0x5f, 0x86, 0xf0, 0x64, 0x52, 0xd0, 0x05, 0x45, 0x35, 0x2b, - 0x30, 0x8b, 0x25, 0x9e, 0x51, 0xb3, 0x96, 0x0d, 0xd0, 0x3a, 0xb7, 0x95, 0xce, 0x22, 0x5c, 0x38, - 0xa9, 0xc3, 0x1b, 0xcf, 0x0e, 0x47, 0x96, 0x71, 0x34, 0xb2, 0x8c, 0xbf, 0x23, 0xcb, 0xf8, 0x32, - 0xb6, 0x72, 0x47, 0x63, 0x2b, 0xf7, 0x6b, 0x6c, 0xe5, 0xde, 0xa0, 0xa9, 0xeb, 0x7d, 0xa0, 0xc9, - 0xd4, 0x9a, 0x3b, 0x57, 0xd5, 0x1f, 0xc7, 0xfa, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x92, 0x88, - 0x7c, 0xcc, 0xfc, 0x06, 0x00, 0x00, + // 634 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x41, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0xd6, 0x22, 0x32, 0x12, 0xc4, 0x01, 0x22, 0xac, 0xb2, 0xe0, 0x1e, 0xc0, 0x28, 0xce, + 0xa4, 0x80, 0x3f, 0x00, 0x34, 0xe8, 0xc1, 0x44, 0xad, 0x9c, 0xf4, 0xd0, 0xcc, 0xb6, 0xd3, 0x65, + 0x63, 0x77, 0xdf, 0xd2, 0x99, 0x16, 0x7a, 0xf5, 0x60, 0xbc, 0x98, 0x98, 0xf8, 0x17, 0x3c, 0xf9, + 0x27, 0xbc, 0x72, 0x24, 0xf1, 0xe2, 0x49, 0x4d, 0xeb, 0x0f, 0x31, 0x33, 0x3b, 0x4b, 0x77, 0x03, + 0xa5, 0x31, 0x84, 0xdb, 0x64, 0xdf, 0xf7, 0xbe, 0xef, 0x9b, 0x2f, 0xef, 0xcd, 0xa2, 0xf9, 0xa6, + 0x17, 0xd2, 0x86, 0x38, 0x60, 0x31, 0xed, 0x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, 0x3f, 0x18, 0xd0, 0xb8, 0xd9, 0x4a, 0x7c, 0x37, 0x2f, 0x7f, + 0xc6, 0x1b, 0x60, 0xbb, 0xe7, 0x41, 0x12, 0x1d, 0x77, 0xf1, 0xfd, 0x8f, 0xbf, 0x5f, 0x8a, 0xb7, + 0xf0, 0x1c, 0xcd, 0xbd, 0x30, 0xc2, 0xa8, 0x7c, 0xb7, 0x90, 0x3d, 0x7c, 0x34, 0xf1, 0xe6, 0x19, + 0x0a, 0x23, 0xd7, 0xc5, 0x7e, 0xf4, 0x9f, 0x5d, 0xc6, 0xea, 0xa6, 0xb6, 0x4a, 0xf0, 0x5a, 0xde, + 0xaa, 0x54, 0x9d, 0xd5, 0xc1, 0x66, 0xe4, 0x5f, 0x0a, 0x5c, 0x43, 0x25, 0x45, 0x8b, 0x9d, 0x21, + 0x61, 0xa4, 0xa6, 0x96, 0x86, 0xd6, 0x8d, 0xbc, 0xad, 0xe5, 0x67, 0x31, 0x3e, 0x9d, 0x14, 0xf6, + 0xd1, 0x98, 0x9e, 0x15, 0x3c, 0x8c, 0x25, 0x9d, 0x51, 0x7b, 0x79, 0x38, 0xc0, 0xe8, 0xdc, 0xd6, + 0x3a, 0x73, 0x78, 0xe6, 0xb4, 0x8e, 0xd8, 0x7e, 0x76, 0xd4, 0x73, 0xac, 0xe3, 0x9e, 0x63, 0xfd, + 0xe9, 0x39, 0xd6, 0xe7, 0xbe, 0x53, 0x38, 0xee, 0x3b, 0x85, 0x9f, 0x7d, 0xa7, 0xf0, 0x86, 0x8c, + 0x5c, 0xf0, 0x43, 0x43, 0xa6, 0x17, 0xdd, 0xbb, 0xaa, 0x7f, 0x1f, 0x1b, 0xff, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x24, 0x59, 0x9e, 0xa9, 0x02, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used.