From de116c18b44c23dda273494ac5945fe206f13da3 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:11:19 +0900 Subject: [PATCH] use initia_nft --- go.mod | 2 +- go.sum | 6 +++--- images/private/Dockerfile | 2 +- x/ibc/nft-transfer/keeper/integration_test.go | 4 ++-- x/move/keeper/nft.go | 4 ++-- x/move/types/connector.go | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index a6a85421..68179779 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/hashicorp/go-metrics v0.5.2 github.com/initia-labs/OPinit v0.1.1-beta.1 // we also need to update `LIBINITIAVM_VERSION` of images/private/Dockerfile#5 - github.com/initia-labs/initiavm v0.1.2-beta.6 + github.com/initia-labs/initiavm v0.1.2-beta.7 github.com/novifinancial/serde-reflection/serde-generate/runtime/golang v0.0.0-20220519162058-e5cd3c3b3f3a github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 73baa11f..c330b6ed 100644 --- a/go.sum +++ b/go.sum @@ -709,12 +709,12 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/initia-labs/OPinit v0.1.1-beta.1 h1:3/qjPPHB5FsdUHmTOqvcuL+IAkfFENtF7fk+/eHSH1k= +github.com/initia-labs/OPinit v0.1.1-beta.1 h1:HSRw+enslOUzjiMklud+HfV7ObYOA7HOo4SMDWHDV4k= github.com/initia-labs/OPinit v0.1.1-beta.1/go.mod h1:1dn1iseG1S4wfXUtnb4mUkraJdL9/lWBQPpI+HbVzL0= github.com/initia-labs/cosmos-sdk v0.0.0-20240103092915-bf1e1bc520d0 h1:ZgI0FQvyUrpp3zKM0RuXU5hYdRw3u1/a50RG9l0G0Cw= github.com/initia-labs/cosmos-sdk v0.0.0-20240103092915-bf1e1bc520d0/go.mod h1:n/WQqDh73qdtBmY9Op3sYgiBgTujSfGSd6CNh6GfqvQ= -github.com/initia-labs/initiavm v0.1.2-beta.6 h1:U59NfxapDLcGnSuP5IC8szsHw300Er81kMHhre4Nr68= -github.com/initia-labs/initiavm v0.1.2-beta.6/go.mod h1:6LNXn8eRv2jBzvM1gyQMgA1GRzZJh65VGVKCYDtbh18= +github.com/initia-labs/initiavm v0.1.2-beta.7 h1:KiIy1GGrwa0ZbzkX3jzYtmMT15Tnk+WN8U3nBnu8xEE= +github.com/initia-labs/initiavm v0.1.2-beta.7/go.mod h1:6LNXn8eRv2jBzvM1gyQMgA1GRzZJh65VGVKCYDtbh18= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= diff --git a/images/private/Dockerfile b/images/private/Dockerfile index efba517e..be526e16 100644 --- a/images/private/Dockerfile +++ b/images/private/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.19.1-alpine3.16 AS go-builder #ARG arch=x86_64 # See https://github.com/initia-labs/initiavm/releases -ARG LIBINITIAVM_VERSION=v0.1.2-beta.6 +ARG LIBINITIAVM_VERSION=v0.1.2-beta.7 # this comes from standard alpine nightly file # https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile diff --git a/x/ibc/nft-transfer/keeper/integration_test.go b/x/ibc/nft-transfer/keeper/integration_test.go index e755d943..f5395b09 100644 --- a/x/ibc/nft-transfer/keeper/integration_test.go +++ b/x/ibc/nft-transfer/keeper/integration_test.go @@ -38,7 +38,7 @@ func (suite *KeeperTestSuite) CreateNftClass( movetypes.MoveModuleNameSimpleNft, movetypes.FunctionNameSimpleNftInitialize, []vmtypes.TypeTag{}, - [][]byte{descBz, {0}, nameBz, uriBz, {0}, {0}, {0}, {0}, {0}, {0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + [][]byte{descBz, {0}, nameBz, uriBz, {0}, {0}, {0}, {0}, {0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, ) suite.Require().NoError(err, "MakeCollection error on chain") @@ -78,7 +78,7 @@ func (suite *KeeperTestSuite) MintNft( movetypes.MoveModuleNameSimpleNft, movetypes.FunctionNameSimpleNftMint, []vmtypes.TypeTag{}, - [][]byte{classNameBz, dataBz, idBz, uriBz, {0}, {0}, {0}, append([]byte{1}, receiverAddr[:]...)}, + [][]byte{classNameBz, dataBz, idBz, uriBz, {1}, append([]byte{1}, receiverAddr[:]...)}, ) suite.Require().NoError(err, "MakeCollection error on chain") } diff --git a/x/move/keeper/nft.go b/x/move/keeper/nft.go index a54677e8..19a76b50 100644 --- a/x/move/keeper/nft.go +++ b/x/move/keeper/nft.go @@ -89,7 +89,7 @@ func (k NftKeeper) Mint( types.MoveModuleNameSimpleNft, types.FunctionNameSimpleNftMint, []vmtypes.TypeTag{}, - [][]byte{collectionNameBz, dataBz, idBz, uriBz, {0}, {0}, {0}, append([]byte{1}, recipientAddr[:]...)}, + [][]byte{collectionNameBz, dataBz, idBz, uriBz, {1}, append([]byte{1}, recipientAddr[:]...)}, ) } @@ -159,7 +159,7 @@ func (k NftKeeper) initializeCollection(ctx context.Context, collectionName, col types.MoveModuleNameSimpleNft, types.FunctionNameSimpleNftInitialize, []vmtypes.TypeTag{}, - [][]byte{descBz, {0}, nameBz, uriBz, {0}, {0}, {0}, {0}, {0}, {0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + [][]byte{descBz, {0}, nameBz, uriBz, {0}, {0}, {0}, {0}, {0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, ) } diff --git a/x/move/types/connector.go b/x/move/types/connector.go index 7231a4fa..728873fd 100644 --- a/x/move/types/connector.go +++ b/x/move/types/connector.go @@ -23,7 +23,7 @@ const ( MoveModuleNamePrimaryFungibleStore = "primary_fungible_store" MoveModuleNameManagedCoin = "managed_coin" MoveModuleNameObject = "object" - MoveModuleNameSimpleNft = "simple_nft" + MoveModuleNameSimpleNft = "initia_nft" MoveModuleNameCollection = "collection" // function names for managed_coin @@ -79,7 +79,7 @@ const ( ResourceNameIssuer = "Issuer" ResourceNameManagingRefs = "ManagingRefs" ResourceNameCollection = "Collection" - ResourceNameSimpleNft = "SimpleNft" + ResourceNameSimpleNft = "InitiaNft" ResourceNameNft = "Nft" )