From 249af6229f090ce00bd9081b4aac559a4fdf0cce Mon Sep 17 00:00:00 2001 From: hongkuang Date: Tue, 3 Dec 2024 15:47:02 +0800 Subject: [PATCH 1/7] chore: fix some function names in comment Signed-off-by: hongkuang --- app/params/encoding.go | 2 +- testutil/apptesting/test_suite.go | 2 +- x/dex/keeper/pool.go | 2 +- x/tokenfactory/types/keys.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/params/encoding.go b/app/params/encoding.go index 066043d42..32fcf34ae 100644 --- a/app/params/encoding.go +++ b/app/params/encoding.go @@ -20,7 +20,7 @@ type EncodingConfig struct { Amino *codec.LegacyAmino } -// makeEncodingConfig creates an EncodingConfig for an amino based test configuration. +// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration. func MakeEncodingConfig() EncodingConfig { amino := codec.NewLegacyAmino() reg, err := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{ diff --git a/testutil/apptesting/test_suite.go b/testutil/apptesting/test_suite.go index ba9b4e3b3..187d0dd6c 100644 --- a/testutil/apptesting/test_suite.go +++ b/testutil/apptesting/test_suite.go @@ -49,7 +49,7 @@ func (s *KeeperTestHelper) Setup() { } } -// setupAddr takes a balance, prefix, and address number. Then returns the respective account address byte array. +// SetupAddr takes a balance, prefix, and address number. Then returns the respective account address byte array. // If prefix is left blank, it will be replaced with a random prefix. func SetupAddr(index int) sdk.AccAddress { prefixBz := make([]byte, 8) diff --git a/x/dex/keeper/pool.go b/x/dex/keeper/pool.go index 8da8a1850..f4c13f6b2 100644 --- a/x/dex/keeper/pool.go +++ b/x/dex/keeper/pool.go @@ -56,7 +56,7 @@ func (k Keeper) incrementPoolCount(ctx sdk.Context) { k.SetPoolCount(ctx, currentCount+1) } -// GetNextPoolId get ID for the next pool to be created +// GetNextPoolID get ID for the next pool to be created func (k Keeper) GetNextPoolID(ctx sdk.Context) uint64 { return k.GetPoolCount(ctx) } diff --git a/x/tokenfactory/types/keys.go b/x/tokenfactory/types/keys.go index 8bfeb012c..2eebccf88 100644 --- a/x/tokenfactory/types/keys.go +++ b/x/tokenfactory/types/keys.go @@ -42,7 +42,7 @@ func GetDenomPrefixStore(denom string) []byte { return []byte(strings.Join([]string{DenomsPrefixKey, denom, ""}, KeySeparator)) } -// GetCreatorsPrefix returns the store prefix where the list of the denoms created by a specific +// GetCreatorPrefix returns the store prefix where the list of the denoms created by a specific // creator are stored func GetCreatorPrefix(creator string) []byte { return []byte(strings.Join([]string{CreatorPrefixKey, creator, ""}, KeySeparator)) From c88d83932f237505f71d8287224e13b01b62f1ae Mon Sep 17 00:00:00 2001 From: planetBoy <140164174+Guayaba221@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:01:53 +0100 Subject: [PATCH 2/7] Update README.md --- x/tokenfactory/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/tokenfactory/README.md b/x/tokenfactory/README.md index f7bc55489..523edcd09 100644 --- a/x/tokenfactory/README.md +++ b/x/tokenfactory/README.md @@ -1,6 +1,6 @@ # Token Factory (by Osmosis Labs) -> This module was taken from Osmosis chain codebase (commit: https://github.com/osmosis-labs/osmosis/commit/9e178a631f91ffc91c51f3665ed915c9f15e1807). The reason of this action was to adopt module and tests to our codebase because it was not possible to import it without code modification +> This module was taken from Osmosis chain codebase (commit: https://github.com/osmosis-labs/osmosis/commit/9e178a631f91ffc91c51f3665ed915c9f15e1807). The reason of this action was to adapt module and tests to our codebase because it was not possible to import it without code modification > that was made by Osmosis team to the original Cosmos SDK. These changes made it not possible (without deep modifications of the whole code) to import module to our code. > Also support of the creation fee was removed at the moment because we do not have community pool in the Neutron. @@ -73,7 +73,7 @@ message MsgBurn { ``` **State Modifications:** -- Saftey check the following +- Safety check the following - Check that the denom minting is created via `tokenfactory` module - Check that the sender of the message is the admin of the denom - Burn designated amount of tokens for the denom via `bank` module @@ -119,4 +119,4 @@ The choice between how we standardized the split these 60 bytes between maxes fr For explicitness, its currently set to `len(longest_subdenom) = 44` and `len(longest_chain_addr_prefix) = 16`. Please note, if the SDK increases the maximum length of a denom from 128 bytes, these caps should increase. -So please don't make code rely on these max lengths for parsing. \ No newline at end of file +So please don't make code rely on these max lengths for parsing. From 85d887b8ce9c139195e599c7ce35ee64c5d33b98 Mon Sep 17 00:00:00 2001 From: Tristav <124001124+Pricstas@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:24:47 +0100 Subject: [PATCH 3/7] typos README.md --- x/ibc-rate-limit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/ibc-rate-limit/README.md b/x/ibc-rate-limit/README.md index 34165427e..7a7cd54d1 100644 --- a/x/ibc-rate-limit/README.md +++ b/x/ibc-rate-limit/README.md @@ -216,7 +216,7 @@ is built on the `relay.SendTransfer()` in the transfer module and then passed to ##### Receives -This behaves slightly different if the asset is an Neutron asset that was sent to the counterparty and is being +This behaves slightly different if the asset is a Neutron asset that was sent to the counterparty and is being returned to the chain, or if the asset is being received by the chain and originates on the counterparty. In ibc this is called being a "source" or a "sink" respectively. From 0c4ea2b34cdd6f549fb38179ec8983ef9fc91f0b Mon Sep 17 00:00:00 2001 From: Tristav <124001124+Pricstas@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:25:23 +0100 Subject: [PATCH 4/7] typos genesis.go --- app/genesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/genesis.go b/app/genesis.go index 128ac7806..8dfdb68ba 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -13,7 +13,7 @@ import ( var FeeDenom = "untrn" // GenesisState is the genesis state of the blockchain represented here as a map of raw json -// messages key'd by a identifier string. +// messages key'd by an identifier string. // The identifier is used to determine which module genesis information belongs // to so it may be appropriately routed during init chain. // Within this application default genesis information is retrieved from From 74dc4eeb536bcb2e86a65008497fded2120cd52a Mon Sep 17 00:00:00 2001 From: Andrei Zavgorodnii Date: Tue, 14 Jan 2025 01:56:28 +0000 Subject: [PATCH 5/7] chore: stargate --- wasmbinding/stargate_allowlist.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wasmbinding/stargate_allowlist.go b/wasmbinding/stargate_allowlist.go index 915fc3b90..471749b14 100644 --- a/wasmbinding/stargate_allowlist.go +++ b/wasmbinding/stargate_allowlist.go @@ -104,10 +104,10 @@ func AcceptedStargateQueries() wasmkeeper.AcceptedQueries { // oracle "/slinky.oracle.v1.Query/GetAllCurrencyPairs": &oracletypes.GetAllCurrencyPairsResponse{}, "/slinky.oracle.v1.Query/GetPrice": &oracletypes.GetPriceResponse{}, - "/slinky.oracle.v1.Query/GetPrices": &oracletypes.GetPricesResponse{}, + //"/slinky.oracle.v1.Query/GetPrices": &oracletypes.GetPricesResponse{}, // marketmap - "/slinky.marketmap.v1.Query/MarketMap": &marketmaptypes.MarketMapResponse{}, + //"/slinky.marketmap.v1.Query/MarketMap": &marketmaptypes.MarketMapResponse{}, "/slinky.marketmap.v1.Query/LastUpdated": &marketmaptypes.LastUpdatedResponse{}, "/slinky.marketmap.v1.Query/Params": &marketmaptypes.ParamsResponse{}, "/slinky.marketmap.v1.Query/Market": &marketmaptypes.MarketResponse{}, From 3a8305d65ecd20839ba86775faf5292d919c995c Mon Sep 17 00:00:00 2001 From: Andrei Zavgorodnii Date: Tue, 14 Jan 2025 02:11:47 +0000 Subject: [PATCH 6/7] chore: stargate --- wasmbinding/stargate_allowlist.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wasmbinding/stargate_allowlist.go b/wasmbinding/stargate_allowlist.go index 471749b14..0a2a3d3ef 100644 --- a/wasmbinding/stargate_allowlist.go +++ b/wasmbinding/stargate_allowlist.go @@ -104,10 +104,10 @@ func AcceptedStargateQueries() wasmkeeper.AcceptedQueries { // oracle "/slinky.oracle.v1.Query/GetAllCurrencyPairs": &oracletypes.GetAllCurrencyPairsResponse{}, "/slinky.oracle.v1.Query/GetPrice": &oracletypes.GetPriceResponse{}, - //"/slinky.oracle.v1.Query/GetPrices": &oracletypes.GetPricesResponse{}, + // "/slinky.oracle.v1.Query/GetPrices": &oracletypes.GetPricesResponse{}, // marketmap - //"/slinky.marketmap.v1.Query/MarketMap": &marketmaptypes.MarketMapResponse{}, + // "/slinky.marketmap.v1.Query/MarketMap": &marketmaptypes.MarketMapResponse{}, "/slinky.marketmap.v1.Query/LastUpdated": &marketmaptypes.LastUpdatedResponse{}, "/slinky.marketmap.v1.Query/Params": &marketmaptypes.ParamsResponse{}, "/slinky.marketmap.v1.Query/Market": &marketmaptypes.MarketResponse{}, From c992b853f246d039186cb7d598de56527be20033 Mon Sep 17 00:00:00 2001 From: pr0n00gler Date: Tue, 14 Jan 2025 04:28:14 +0200 Subject: [PATCH 7/7] remove marketmap and oracle prices bindings --- wasmbinding/bindings/query.go | 2 -- wasmbinding/queries.go | 4 ---- 2 files changed, 6 deletions(-) diff --git a/wasmbinding/bindings/query.go b/wasmbinding/bindings/query.go index 884f0d273..93f19bc93 100644 --- a/wasmbinding/bindings/query.go +++ b/wasmbinding/bindings/query.go @@ -63,11 +63,9 @@ type QueryRegisteredQueryResultRequest struct { type OracleQuery struct { GetAllCurrencyPairs *oracletypes.GetAllCurrencyPairsRequest `json:"get_all_currency_pairs,omitempty"` GetPrice *oracletypes.GetPriceRequest `json:"get_price,omitempty"` - GetPrices *oracletypes.GetPricesRequest `json:"get_prices,omitempty"` } type MarketMapQuery struct { - MarketMap *marketmaptypes.MarketMapRequest `json:"market_map,omitempty"` LastUpdated *marketmaptypes.LastUpdatedRequest `json:"last_updated,omitempty"` Params *marketmaptypes.ParamsRequest `json:"params,omitempty"` Market *marketmaptypes.MarketRequest `json:"market,omitempty"` diff --git a/wasmbinding/queries.go b/wasmbinding/queries.go index 9dcee9b2e..3fcec1985 100644 --- a/wasmbinding/queries.go +++ b/wasmbinding/queries.go @@ -216,8 +216,6 @@ func (qp *QueryPlugin) OracleQuery(ctx sdk.Context, query bindings.OracleQuery) return processResponse(oracleQueryServer.GetAllCurrencyPairs(ctx, query.GetAllCurrencyPairs)) case query.GetPrice != nil: return processResponse(oracleQueryServer.GetPrice(ctx, query.GetPrice)) - case query.GetPrices != nil: - return processResponse(oracleQueryServer.GetPrices(ctx, query.GetPrices)) default: return nil, wasmvmtypes.UnsupportedRequest{Kind: "unknown neutron.oracle query type"} } @@ -231,8 +229,6 @@ func (qp *QueryPlugin) MarketMapQuery(ctx sdk.Context, query bindings.MarketMapQ return processResponse(marketMapQueryServer.Params(ctx, query.Params)) case query.LastUpdated != nil: return processResponse(marketMapQueryServer.LastUpdated(ctx, query.LastUpdated)) - case query.MarketMap != nil: - return processResponse(marketMapQueryServer.MarketMap(ctx, query.MarketMap)) case query.Market != nil: return processResponse(marketMapQueryServer.Market(ctx, query.Market)) default: