Skip to content

Commit

Permalink
Merge pull request #12 from UptickNetwork/dev
Browse files Browse the repository at this point in the history
add the initial of the nft transfer genesis and change the params.
delete the log source and package the v0.2.6.
update the comment line example infomation.
  • Loading branch information
YangChuantongStarry committed Feb 22, 2023
2 parents 1771616 + be1edd6 commit 16a24a1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
COMMIT := $(shell git log -1 --format='%H')
VERSION := v0.2.5
VERSION := v0.2.6

# don't override user values
ifeq (,$(VERSION))
Expand Down
9 changes: 8 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1091,11 +1091,18 @@ func initParamsKeeper(
func (app *Uptick) registerUpgradeHandlers() {

app.UpgradeKeeper.SetUpgradeHandler(
"v0.2.5",
"v0.2.6",
func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
// Refs:
// - https://docs.cosmos.network/master/building-modules/upgrade.html#registering-migrations
// - https://docs.cosmos.network/master/migrations/chain-upgrade-guide-044.html#chain-upgrade
gs := ibcnfttransfertypes.DefaultGenesisState()
bz, err := ibcnfttransfertypes.ModuleCdc.MarshalJSON(gs)
if err != nil {
panic(fmt.Errorf("failed to ModuleCdc %s: %w", ibcnfttransfertypes.ModuleName, err))
}
_ = app.mm.Modules[ibcnfttransfertypes.ModuleName].InitGenesis(
ctx, ibcnfttransfertypes.ModuleCdc, bz)

return app.mm.RunMigrations(ctx, app.configurator, vm)
})
Expand Down
Binary file not shown.
12 changes: 6 additions & 6 deletions x/collection/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func GetCmdQuerySupply() *cobra.Command {
cmd := &cobra.Command{
Use: "supply [denom-id]",
Long: "total supply of a collection or owner of NFTs.",
Example: fmt.Sprintf("$ %s query nft supply <denom-id>", version.AppName),
Example: fmt.Sprintf("$ %s query collection supply <denom-id>", version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down Expand Up @@ -82,7 +82,7 @@ func GetCmdQueryOwner() *cobra.Command {
cmd := &cobra.Command{
Use: "owner [address]",
Long: "Get the NFTs owned by an account address.",
Example: fmt.Sprintf("$ %s query nft owner <address> --denom-id=<denom-id>", version.AppName),
Example: fmt.Sprintf("$ %s query collection owner <address> --denom-id=<denom-id>", version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down Expand Up @@ -125,7 +125,7 @@ func GetCmdQueryCollection() *cobra.Command {
cmd := &cobra.Command{
Use: "collection [denom-id]",
Long: "Get all the NFTs from a given collection.",
Example: fmt.Sprintf("$ %s query nft collection <denom-id>", version.AppName),
Example: fmt.Sprintf("$ %s query collection collection <denom-id>", version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down Expand Up @@ -162,7 +162,7 @@ func GetCmdQueryDenoms() *cobra.Command {
cmd := &cobra.Command{
Use: "denoms",
Long: "Query all denominations of all collections of NFTs.",
Example: fmt.Sprintf("$ %s query nft denoms", version.AppName),
Example: fmt.Sprintf("$ %s query collection denoms", version.AppName),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
Expand Down Expand Up @@ -191,7 +191,7 @@ func GetCmdQueryDenom() *cobra.Command {
cmd := &cobra.Command{
Use: "denom [denom-id]",
Long: "Query the denom by the specified denom id.",
Example: fmt.Sprintf("$ %s query nft denom <denom-id>", version.AppName),
Example: fmt.Sprintf("$ %s query collection denom <denom-id>", version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down Expand Up @@ -220,7 +220,7 @@ func GetCmdQueryNFT() *cobra.Command {
cmd := &cobra.Command{
Use: "token [denom-id] [nft-id]",
Long: "Query a single NFT from a collection.",
Example: fmt.Sprintf("$ %s query nft token <denom-id> <nft-id>", version.AppName),
Example: fmt.Sprintf("$ %s query collection token <denom-id> <nft-id>", version.AppName),
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down
12 changes: 6 additions & 6 deletions x/collection/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func GetCmdIssueDenom() *cobra.Command {
Use: "issue [denom-id]",
Long: "Issue a new denom.",
Example: fmt.Sprintf(
"$ %s tx nft issue <denom-id> "+
"$ %s tx collection issue <denom-id> "+
"--from=<key-name> "+
"--name=<denom-name> "+
"--symbol=<denom-symbol> "+
Expand Down Expand Up @@ -140,7 +140,7 @@ func GetCmdMintNFT() *cobra.Command {
Use: "mint [denom-id] [nft-id]",
Long: "Mint an NFT and set the owner to the recipient.",
Example: fmt.Sprintf(
"$ %s tx nft mint <denom-id> <nft-id> "+
"$ %s tx collection mint <denom-id> <nft-id> "+
"--uri=<uri> "+
"--uri-hash=<uri-hash> "+
"--recipient=<recipient> "+
Expand Down Expand Up @@ -217,7 +217,7 @@ func GetCmdEditNFT() *cobra.Command {
Use: "edit [denom-id] [nft-id]",
Long: "Edit the token data of an NFT.",
Example: fmt.Sprintf(
"$ %s tx nft edit <denom-id> <nft-id> "+
"$ %s tx collection edit <denom-id> <nft-id> "+
"--uri=<uri> "+
"--uri-hash=<uri-hash> "+
"--from=<key-name> "+
Expand Down Expand Up @@ -275,7 +275,7 @@ func GetCmdTransferNFT() *cobra.Command {
Use: "transfer [recipient] [denom-id] [nft-id]",
Long: "Transfer an NFT to a recipient.",
Example: fmt.Sprintf(
"$ %s tx nft transfer <recipient> <denom-id> <nft-id> "+
"$ %s tx collection transfer <recipient> <denom-id> <nft-id> "+
"--uri=<uri> "+
"--uri-hash=<uri-hash> "+
"--from=<key-name> "+
Expand Down Expand Up @@ -338,7 +338,7 @@ func GetCmdBurnNFT() *cobra.Command {
Use: "burn [denom-id] [nft-id]",
Long: "Burn an NFT.",
Example: fmt.Sprintf(
"$ %s tx nft burn <denom-id> <nft-id> "+
"$ %s tx collection burn <denom-id> <nft-id> "+
"--from=<key-name> "+
"--chain-id=<chain-id> "+
"--fees=<fee>",
Expand Down Expand Up @@ -373,7 +373,7 @@ func GetCmdTransferDenom() *cobra.Command {
Use: "transfer-denom [recipient] [denom-id]",
Long: "Transfer an Denom to a recipient.",
Example: fmt.Sprintf(
"$ %s tx nft transfer-denom <recipient> <denom-id> "+
"$ %s tx collection transfer-denom <recipient> <denom-id> "+
"--from=<key-name> "+
"--chain-id=<chain-id> "+
"--fees=<fee>",
Expand Down

0 comments on commit 16a24a1

Please sign in to comment.