-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cudos-dev' into cudos-master
- Loading branch information
Showing
88 changed files
with
3,493 additions
and
1,254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/CosmWasm/wasmd/x/wasm" | ||
wasmKeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" | ||
nftCustomBindings "github.com/CudoVentures/cudos-node/x/nft/custom-bindings" | ||
nftKeeper "github.com/CudoVentures/cudos-node/x/nft/keeper" | ||
) | ||
|
||
func GetCustomMsgEncodersOptions() []wasmKeeper.Option { | ||
nftEncodingOptions := wasmKeeper.WithMessageEncoders(nftEncoders()) | ||
return []wasm.Option{nftEncodingOptions} | ||
} | ||
|
||
func GetCustomMsgQueryOptions(keeper nftKeeper.Keeper) []wasmKeeper.Option { | ||
nftQueryOptions := wasmKeeper.WithQueryPlugins(nftQueryPlugins(keeper)) | ||
return []wasm.Option{nftQueryOptions} | ||
} | ||
|
||
func nftEncoders() *wasmKeeper.MessageEncoders { | ||
return &wasmKeeper.MessageEncoders{ | ||
Custom: nftCustomBindings.EncodeNftMessage(), | ||
} | ||
} | ||
|
||
// nftQueryPlugins needs to be registered in test setup to handle custom query callbacks | ||
func nftQueryPlugins(keeper nftKeeper.Keeper) *wasmKeeper.QueryPlugins { | ||
return &wasmKeeper.QueryPlugins{ | ||
Custom: nftCustomBindings.PerformCustomNftQuery(keeper), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.