Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deepanshutr/master #450

Merged
merged 65 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
cbabd03
fix(go mod): cometbft vuln fix upgrade
deepanshutr Jul 15, 2024
881bcd9
chore(module manager): code cleanup
deepanshutr Jul 15, 2024
8690a2d
refactor(prams): removing hasProposalContents impl
deepanshutr Jul 17, 2024
a93ca62
refactor(prams): removing hasProposalContents impl
deepanshutr Jul 17, 2024
b09835c
refactor(service): cosmos.msg.v1.service
deepanshutr Jul 22, 2024
4a21234
refactor(service): cosmos.msg.v1.service
deepanshutr Jul 22, 2024
0ea7f7a
chore: code cleanup
deepanshutr Jul 23, 2024
3b5a29e
refactor(baseReq): retiring sdkTypes.BaseReq in favor of common_trans…
deepanshutr Jul 26, 2024
3768a43
refactor: readBaserRew
deepanshutr Jul 26, 2024
be93842
refactor: making Kafka state constructor private
deepanshutr Jul 26, 2024
ae21781
refactor: making Kafka state constructor private
deepanshutr Jul 26, 2024
540f92d
refactor: making Kafka constructors private
deepanshutr Jul 26, 2024
cc8232e
feat(moduleManager): defining RegisterRESTRoutes method
deepanshutr Jul 26, 2024
c4a22af
feat(moduleManager): defining RegisterRESTRoutes method
deepanshutr Jul 26, 2024
5415e44
refactor(utilities): removing unused baseReq field and getter
deepanshutr Jul 26, 2024
d152590
refactor: baseReq to commonTransactionRequest
deepanshutr Jul 26, 2024
bdb9bd8
refactor: baseReq to commonTransactionRequest
deepanshutr Jul 29, 2024
99bc7b4
code cleanup
deepanshutr Jul 29, 2024
eca7608
feat: defining common transaction request and registering codec
deepanshutr Jul 29, 2024
913a4f0
code cleanup
deepanshutr Aug 13, 2024
9824a4b
minor fix
deepanshutr Aug 13, 2024
1cdb772
minor fix
deepanshutr Aug 13, 2024
3222efd
feat(query): adding custom handling logic
deepanshutr Aug 19, 2024
5535619
refactor(moduleManager): making Set methods pure
deepanshutr Aug 19, 2024
20c49dd
refactor(upgrade): empty keys not allowed anymore
deepanshutr Aug 19, 2024
3419b81
retiring: proto gateway
deepanshutr Aug 19, 2024
da291de
code cleanup
deepanshutr Aug 19, 2024
17f8f1e
refactor: simplifying service routing
deepanshutr Aug 19, 2024
56a0938
code cleanup
deepanshutr Aug 21, 2024
5a9c76d
feat(parameters): adding parameters query service proto
deepanshutr Aug 26, 2024
b7b4b75
feat(parameters): adding parameters query service proto
deepanshutr Aug 26, 2024
c494245
feat(parameters): adding parameters query
deepanshutr Aug 26, 2024
4d78e4b
refactor(parameterManager): removing rest&cli query handling logic
deepanshutr Aug 26, 2024
e0f81fd
code cleanup
deepanshutr Aug 26, 2024
1658367
refactor(parameterManager): removing rest&cli query handling logic
deepanshutr Aug 26, 2024
36dda91
feat: defining GRPCRequest interface
deepanshutr Aug 27, 2024
171f143
feat: defining GRPCRequest interface
deepanshutr Aug 27, 2024
f788d43
refactor(common transaction request): replacing complex types with st…
deepanshutr Aug 29, 2024
2505e43
refactor(common transaction request): following naming convention
deepanshutr Aug 29, 2024
c6a5f77
refactor(common transaction request): from interface to struct
deepanshutr Aug 29, 2024
3a2833b
chore: import formatting
deepanshutr Sep 2, 2024
6b30a6b
refactor: making common transaction request public
deepanshutr Sep 2, 2024
362514f
feat(transaction_request): adding fromHTTPRequest method
deepanshutr Sep 2, 2024
a4142b7
merge changes
deepanshutr Sep 2, 2024
69a4402
chore: import formatting
deepanshutr Sep 2, 2024
12d52ea
retiring(transaction): decode transaction request, used for wasm
deepanshutr Sep 2, 2024
06cfae9
chore: import formatting
deepanshutr Sep 2, 2024
ea6f6e9
retiring(query_request): encode decode methods
deepanshutr Sep 2, 2024
e320725
retiring(query_request): encode decode methods
deepanshutr Sep 2, 2024
685bb1c
retiring(module): decode module transaction request, used for wasm
deepanshutr Sep 2, 2024
e763e34
retiring(module): decode module transaction request, used for wasm
deepanshutr Sep 2, 2024
83bd43a
retiring(utility): ReadRESTReq
deepanshutr Sep 2, 2024
baf847a
retiring(utility): custom wasm encoder
deepanshutr Sep 2, 2024
d22f8d7
refactor(commonTransactionRequest): making common transaction request…
deepanshutr Sep 2, 2024
4afe294
code cleanup
deepanshutr Sep 2, 2024
3ef86fa
refactor(define): making NewAuxiliaryRequest public
deepanshutr Sep 2, 2024
c0fcb53
refactor(define): making NewAuxiliaryRequest public
deepanshutr Sep 2, 2024
fb0a177
refactor(commonTransactionRequest): making common transaction request…
deepanshutr Sep 2, 2024
25c3c95
refactor(utilities): encoding decoding simplification
deepanshutr Sep 2, 2024
7d6ca42
retiring(transaction request): legacy amino codec
deepanshutr Sep 2, 2024
8a05d9c
retiring(transaction): legacy amino codec
deepanshutr Sep 2, 2024
bcc56b2
retiring(transaction): legacy amino codec
deepanshutr Sep 2, 2024
24b314d
retiring:legacy amino
deepanshutr Sep 2, 2024
17b2dc7
retiring:legacy amino
deepanshutr Sep 2, 2024
51cdf2e
retiring:legacy amino
deepanshutr Sep 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/AssetMantle/schema v0.0.0-20240206102051-27352b802163
github.com/CosmWasm/wasmd v0.45.0
github.com/Shopify/sarama v1.19.0
github.com/cometbft/cometbft v0.37.5
github.com/cometbft/cometbft v0.37.7
github.com/cometbft/cometbft-db v0.8.0
github.com/cosmos/cosmos-sdk v0.47.11
github.com/cosmos/gogoproto v1.4.10
Expand All @@ -22,7 +22,7 @@ require (
google.golang.org/grpc v1.62.1
)

replace github.com/AssetMantle/schema => ../schema
//replace github.com/AssetMantle/schema => ../schema

require (
cloud.google.com/go v0.112.0 // indirect
Expand Down Expand Up @@ -115,6 +115,7 @@ require (
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
github.com/huandu/skiplist v1.2.0 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE
github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI=
github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA=
github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M=
github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0=
github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY=
github.com/cometbft/cometbft v0.37.7 h1:pwC0PNfGcbKbAKyK/sWm+LwuiYmT00C3bF2nEnnjJ/k=
github.com/cometbft/cometbft v0.37.7/go.mod h1:gFGCFXNGDci6tMLemANPGTfU+j4+oH63PjeLe0iIjJk=
github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo=
github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0=
github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4=
Expand Down Expand Up @@ -774,6 +774,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
Expand Down
11 changes: 2 additions & 9 deletions helpers/base/cli_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ package base

import (
"fmt"
"github.com/AssetMantle/modules/utilities/rest"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"

"github.com/spf13/cobra"

"github.com/AssetMantle/modules/helpers"
Expand Down Expand Up @@ -85,12 +82,8 @@ func (cliCommand cliCommand) ReadString(cliFlag helpers.CLIFlag) string {
panic(fmt.Errorf("uregistered flag %v type %T", cliFlag.GetName(), cliFlag.GetValue()))
}

func (cliCommand cliCommand) ReadBaseReq(context client.Context) rest.BaseReq {
return rest.BaseReq{
From: context.GetFromAddress().String(),
ChainID: context.ChainID,
Simulate: context.Simulate,
}
func (cliCommand cliCommand) ReadCommonTransactionRequest(context client.Context) helpers.CommonTransactionRequest {
return helpers.NewCommonTransactionRequestFromContext(context)
}
func (cliCommand cliCommand) CreateCommand(runE func(command *cobra.Command, args []string) error) *cobra.Command {
command := &cobra.Command{
Expand Down
11 changes: 5 additions & 6 deletions helpers/base/cli_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package base

import (
"github.com/AssetMantle/modules/utilities/rest"
"reflect"
"testing"

Expand Down Expand Up @@ -103,11 +102,11 @@ func Test_cliCommand_ReadBaseReq(t *testing.T) {
name string
fields fields
args args
want rest.BaseReq
want helpers.CommonTransactionRequest
}{

{"+ve", fields{"", "", "", testCliFlagList}, args{client.Context{ChainID: "chainID"}}, rest.BaseReq{ChainID: "chainID"}},
{"-ve for nil", fields{"", "", "", nil}, args{client.Context{ChainID: ""}}, rest.BaseReq{ChainID: ""}},
{"+ve", fields{"", "", "", testCliFlagList}, args{client.Context{ChainID: "chainID"}}, helpers.PrototypeCommonTransactionRequest()},
{"-ve for nil", fields{"", "", "", nil}, args{client.Context{ChainID: ""}}, helpers.PrototypeCommonTransactionRequest()},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand All @@ -117,8 +116,8 @@ func Test_cliCommand_ReadBaseReq(t *testing.T) {
long: tt.fields.long,
cliFlagList: tt.fields.cliFlagList,
}
if got := cliCommand.ReadBaseReq(tt.args.context); !reflect.DeepEqual(got, tt.want) {
t.Errorf("ReadBaseReq() = %v, want %v", got, tt.want)
if got := cliCommand.ReadCommonTransactionRequest(tt.args.context); !reflect.DeepEqual(got, tt.want) {
t.Errorf("ReadCommonTransactionRequest() = %v, want %v", got, tt.want)
}
})
}
Expand Down
1 change: 0 additions & 1 deletion helpers/base/cli_flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package base

import (
"fmt"

"github.com/spf13/cobra"
"github.com/spf13/viper"

Expand Down
5 changes: 0 additions & 5 deletions helpers/base/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package base

import (
"github.com/AssetMantle/modules/helpers"
"github.com/AssetMantle/modules/utilities/rest/id_getters/docs"
schemaCodec "github.com/AssetMantle/schema/codec"
sdkClient "github.com/cosmos/cosmos-sdk/client"
sdkCodec "github.com/cosmos/cosmos-sdk/codec"
sdkCodecTypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand Down Expand Up @@ -33,9 +31,6 @@ func (codec codec) InterfaceRegistry() sdkCodecTypes.InterfaceRegistry {
func (codec codec) Initialize(moduleManager helpers.ModuleManager) helpers.Codec {
std.RegisterLegacyAminoCodec(codec.legacyAmino)
std.RegisterInterfaces(codec.interfaceRegistry)
helpers.RegisterLegacyAminoCodec(codec.legacyAmino)
schemaCodec.RegisterLegacyAminoCodec(codec.legacyAmino)
docs.RegisterLegacyAminoCodec(codec.legacyAmino)
moduleManager.RegisterLegacyAminoCodec(codec.legacyAmino)
moduleManager.RegisterInterfaces(codec.interfaceRegistry)
return codec
Expand Down
1 change: 0 additions & 1 deletion helpers/base/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package base

import (
"context"

"github.com/AssetMantle/modules/helpers"
)

Expand Down
3 changes: 1 addition & 2 deletions helpers/base/invariants.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package base

import (
sdkTypes "github.com/cosmos/cosmos-sdk/types"

"github.com/AssetMantle/modules/helpers"
sdkTypes "github.com/cosmos/cosmos-sdk/types"
)

type invariants struct {
Expand Down
3 changes: 1 addition & 2 deletions helpers/base/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (
"bytes"
"context"
"fmt"
sdkTypes "github.com/cosmos/cosmos-sdk/types"

prefixStore "github.com/cosmos/cosmos-sdk/store/prefix"
storeTypes "github.com/cosmos/cosmos-sdk/store/types"
sdkTypes "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/kv"

"github.com/AssetMantle/modules/helpers"
Expand Down
94 changes: 12 additions & 82 deletions helpers/base/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ package base
import (
"encoding/json"
"fmt"
storeTypes "github.com/cosmos/cosmos-sdk/store/types"
"math/rand"

abciTypes "github.com/cometbft/cometbft/abci/types"
"github.com/cosmos/cosmos-sdk/client"
sdkCodec "github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
storeTypes "github.com/cosmos/cosmos-sdk/store/types"
sdkTypes "github.com/cosmos/cosmos-sdk/types"
sdkModuleTypes "github.com/cosmos/cosmos-sdk/types/module"
simulationTypes "github.com/cosmos/cosmos-sdk/types/simulation"
paramsTypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
"math/rand"

"github.com/AssetMantle/modules/helpers"
)
Expand Down Expand Up @@ -49,26 +48,13 @@ type module struct {

var _ helpers.Module = (*module)(nil)

func (module module) IsOnePerModuleType() {
//TODO implement me
panic("implement me")
}

func (module module) IsAppModule() {
//TODO implement me
panic("implement me")
}
func (module module) Name() string {
return module.name
}
func (module module) GetTransactions() helpers.Transactions {
return module.transactions
}
func (module module) RegisterLegacyAminoCodec(legacyAmino *sdkCodec.LegacyAmino) {
for _, transaction := range module.transactionsPrototype().Get() {
transaction.RegisterLegacyAminoCodec(legacyAmino)
}
}
func (module module) RegisterLegacyAminoCodec(_ *sdkCodec.LegacyAmino) {}
func (module module) RegisterInterfaces(interfaceRegistry types.InterfaceRegistry) {
for _, transaction := range module.transactionsPrototype().Get() {
transaction.RegisterInterfaces(interfaceRegistry)
Expand All @@ -82,29 +68,19 @@ func (module module) ValidateGenesis(jsonCodec sdkCodec.JSONCodec, _ client.TxEn
return genesisState.ValidateBasic(module.parameterManagerPrototype())
}
func (module module) RegisterRESTRoutes(context client.Context, router *mux.Router) {
router.HandleFunc("/"+module.Name()+"/parameters", module.parameterManagerPrototype().RESTQueryHandler(context)).Methods("GET")

for _, query := range module.queriesPrototype().Get() {
router.HandleFunc("/"+module.Name()+"/"+query.GetName(), query.RESTQueryHandler(context)).Methods("GET")
}

for _, transaction := range module.transactionsPrototype().Get() {
router.HandleFunc("/"+module.Name()+"/"+transaction.GetName(), transaction.RESTRequestHandler(context)).Methods("POST")
}
}
func (module module) RegisterGRPCGatewayRoutes(context client.Context, serveMux *runtime.ServeMux) {
for _, query := range module.queriesPrototype().Get() {
query.RegisterGRPCGatewayRoute(context, serveMux)
router.HandleFunc(query.GetServicePath(), query.RESTQueryHandler(context)).Methods("GET")
}

for _, transaction := range module.transactionsPrototype().Get() {
transaction.RegisterGRPCGatewayRoute(context, serveMux)
router.HandleFunc(transaction.GetServicePath(), transaction.RESTRequestHandler(context)).Methods("POST")
}
}
func (module module) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {}
func (module module) GetTxCmd() *cobra.Command {
rootTransactionCommand := &cobra.Command{
Use: module.name,
Short: "GetProperty root transaction command.",
Short: module.name + " root transaction command.",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
Expand All @@ -124,7 +100,7 @@ func (module module) GetTxCmd() *cobra.Command {
func (module module) GetQueryCmd() *cobra.Command {
rootQueryCommand := &cobra.Command{
Use: module.name,
Short: "GetProperty root query command.",
Short: module.Name() + " root query command.",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
Expand All @@ -145,62 +121,23 @@ func (module module) GenerateGenesisState(simulationState *sdkModuleTypes.Simula
module.simulatorPrototype().RandomizedGenesisState(simulationState)
}
func (module module) ProposalMsgs(simulationState sdkModuleTypes.SimulationState) []simulationTypes.WeightedProposalMsg {
//TODO implement me
panic("implement me")
}
func (module module) ProposalContents(simulationState sdkModuleTypes.SimulationState) []simulationTypes.WeightedProposalContent {
return module.simulatorPrototype().WeightedProposalContentList(simulationState)
return module.simulatorPrototype().ProposalMessages(simulationState)
}
func (module module) RandomizedParams(r *rand.Rand) []simulationTypes.LegacyParamChange {
return module.simulatorPrototype().ParamChangeList(r)
}
func (module module) RegisterStoreDecoder(storeDecoderRegistry sdkTypes.StoreDecoderRegistry) {
storeDecoderRegistry[module.name] = module.mapperPrototype().StoreDecoder
}
func (module module) WeightedOperations(simulationState sdkModuleTypes.SimulationState) []simulationTypes.WeightedOperation {
return module.simulatorPrototype().WeightedOperations(simulationState, module)
}
func (module module) RegisterStoreDecoder(storeDecoderRegistry sdkTypes.StoreDecoderRegistry) {
storeDecoderRegistry[module.name] = module.mapperPrototype().StoreDecoder
}
func (module module) RegisterInvariants(invariantRegistry sdkTypes.InvariantRegistry) {
module.invariantsPrototype().Register(invariantRegistry)
}

// TODO remove if unnecessary
//
// func (module module) Route() sdkTypes.Route {
// return sdkTypes.NewRoute(module.Name(), func(context sdkTypes.Context, msg sdkTypes.Msg) (*sdkTypes.Result, error) {
// if module.transactions == nil {
// panic(fmt.Errorf("transactions for module %s not initialized", module.Name()))
// }
//
// if message, ok := msg.(helpers.Message); ok {
// if transaction := module.transactions.GetTransaction(message.Type()); transaction != nil {
// return transaction.HandleMessage(sdkTypes.WrapSDKContext(context.WithEventManager(sdkTypes.NewEventManager())), message)
// }
// }
// return nil, fmt.Errorf("message type %T is not supported by module %s", msg, module.Name())
// })
// }
func (module module) QuerierRoute() string {
return module.name
}

// func (module module) LegacyQuerierHandler(_ *sdkCodec.LegacyAmino) sdkTypes.Querier {
// return func(context sdkTypes.Context, path []string, requestQuery abciTypes.RequestQuery) ([]byte, error) {
// if module.queries == nil {
// panic(fmt.Errorf("queries for module %s not initialized", module.Name()))
// }
//
// if query := module.queries.GetQuery(path[0]); query != nil {
// return query.HandleQuery(sdkTypes.WrapSDKContext(context), requestQuery)
// }
//
// if path[0] == "parameters" {
// return CodecPrototype().MarshalJSON(module.parameterManager.Fetch(sdkTypes.WrapSDKContext(context)).Get())
// }
//
// return nil, fmt.Errorf("unknown query path, %v for module %v", path[0], module.Name())
// }
// }
func (module module) RegisterServices(configurator sdkModuleTypes.Configurator) {
for _, query := range module.queries.Get() {
query.RegisterService(configurator)
Expand Down Expand Up @@ -247,13 +184,6 @@ func (module module) GetAuxiliary(auxiliaryName string) helpers.Auxiliary {

panic(fmt.Errorf("auxiliary %v not found/initialized", auxiliaryName))
}
func (module module) DecodeModuleTransactionRequest(transactionName string, rawMessage json.RawMessage) (sdkTypes.Msg, error) {
if transaction := module.transactionsPrototype().GetTransaction(transactionName); transaction != nil {
return transaction.DecodeTransactionRequest(rawMessage)
}

return nil, fmt.Errorf("transaction %s is not supported by module %s", transactionName, module.Name())
}
func (module module) Initialize(kvStoreKey *storeTypes.KVStoreKey, paramsSubspace paramsTypes.Subspace, auxiliaryKeepers ...interface{}) helpers.Module {
module.mapper = module.mapperPrototype().Initialize(kvStoreKey)

Expand Down
Loading
Loading