diff --git a/docs/api.md b/docs/api.md
index ec81bd168..61630dcef 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -5,6 +5,9 @@
## Table of Contents
+- [coreum/asset/ft/v1/authz.proto](#coreum/asset/ft/v1/authz.proto)
+ - [MintAuthorization](#coreum.asset.ft.v1.MintAuthorization)
+
- [coreum/asset/ft/v1/event.proto](#coreum/asset/ft/v1/event.proto)
- [EventFrozenAmountChanged](#coreum.asset.ft.v1.EventFrozenAmountChanged)
- [EventIssued](#coreum.asset.ft.v1.EventIssued)
@@ -319,6 +322,38 @@
+
+
Top
+
+## coreum/asset/ft/v1/authz.proto
+
+
+
+
+
+### MintAuthorization
+MintAuthorization allows the grantee to mint up to mint_limit coin from
+the granter's account.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `mint_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Top
diff --git a/integration-tests/chain.go b/integration-tests/chain.go
index 8080b8c98..934e1948c 100644
--- a/integration-tests/chain.go
+++ b/integration-tests/chain.go
@@ -261,7 +261,7 @@ func NewChain(grpcClient *grpc.ClientConn, rpcClient *rpchttp.HTTP, chainSetting
WithKeyring(newConcurrentSafeKeyring(keyring.NewInMemory(encodingConfig.Codec))).
WithBroadcastMode(flags.BroadcastSync).
WithGRPCClient(grpcClient).
- WithRPCClient(rpcClient).
+ WithClient(rpcClient).
WithAwaitTx(true)
chainCtx := NewChainContext(encodingConfig, clientCtx, chainSettings)
diff --git a/integration-tests/contracts/modules/nft.go b/integration-tests/contracts/modules/nft.go
index f6f45c107..cc58ecef6 100644
--- a/integration-tests/contracts/modules/nft.go
+++ b/integration-tests/contracts/modules/nft.go
@@ -35,6 +35,13 @@ type NftIDRequest struct {
ID string `json:"id"`
}
+// BurntNftIDRequest is used to query burnt nfts with nft_id.
+//
+//nolint:tagliatelle
+type BurntNftIDRequest struct {
+ NftID string `json:"nft_id"`
+}
+
// NftIssuerRequest is used to query NFT with issuer.
type NftIssuerRequest struct {
Issuer string `json:"issuer"`
@@ -77,6 +84,8 @@ const (
NftMethodFrozen NftMethod = "frozen"
NftMethodWhitelisted NftMethod = "whitelisted"
NftMethodWhitelistedAccountsForNft NftMethod = "whitelisted_accounts_for_nft"
+ NftMethodBurntNft NftMethod = "burnt_nft"
+ NftMethodBurntNftInClass NftMethod = "burnt_nfts_in_class"
NftMethodBalance NftMethod = "balance"
NftMethodOwner NftMethod = "owner"
NftMethodSupply NftMethod = "supply"
diff --git a/integration-tests/contracts/modules/nft/Cargo.lock b/integration-tests/contracts/modules/nft/Cargo.lock
index 8f6b338ef..55dc67ef5 100644
--- a/integration-tests/contracts/modules/nft/Cargo.lock
+++ b/integration-tests/contracts/modules/nft/Cargo.lock
@@ -13,17 +13,29 @@ dependencies = [
"version_check",
]
+[[package]]
+name = "anyhow"
+version = "1.0.75"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
[[package]]
name = "base16ct"
-version = "0.1.1"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce"
+checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
[[package]]
name = "base64"
-version = "0.13.1"
+version = "0.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2"
[[package]]
name = "base64ct"
@@ -49,41 +61,67 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "bnum"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350"
+
[[package]]
name = "byteorder"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+[[package]]
+name = "bytes"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
+
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+[[package]]
+name = "chrono"
+version = "0.4.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
+dependencies = [
+ "num-traits",
+]
+
[[package]]
name = "const-oid"
-version = "0.9.2"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913"
+checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"
[[package]]
name = "coreum-wasm-sdk"
-version = "0.1.3"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32e2dde879a9eb95331315156449a5b9e4e4dee642fe2c357ae3ac0f164b2bc6"
+checksum = "be523a53d7cd0efa94c790bcda6f3e960f816c5db9272e008e9b2fa58ee4f9ad"
dependencies = [
+ "chrono",
"cosmwasm-schema",
"cosmwasm-std",
+ "osmosis-std-derive",
+ "prost 0.11.9",
+ "prost-types 0.12.1",
"schemars",
"serde",
+ "serde-cw-value",
]
[[package]]
name = "cosmwasm-crypto"
-version = "1.2.7"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb64554a91d6a9231127f4355d351130a0b94e663d5d9dc8b3a54ca17d83de49"
+checksum = "1ca101fbf2f76723711a30ea3771ef312ec3ec254ad021b237871ed802f9f175"
dependencies = [
"digest 0.10.7",
"ed25519-zebra",
@@ -94,18 +132,18 @@ dependencies = [
[[package]]
name = "cosmwasm-derive"
-version = "1.2.7"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0fb2ce09f41a3dae1a234d56a9988f9aff4c76441cd50ef1ee9a4f20415b028"
+checksum = "c73d2dd292f60e42849d2b07c03d809cf31e128a4299a805abd6d24553bcaaf5"
dependencies = [
"syn 1.0.109",
]
[[package]]
name = "cosmwasm-schema"
-version = "1.2.7"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "230e5d1cefae5331db8934763c81b9c871db6a2cd899056a5694fa71d292c815"
+checksum = "6ce34a08020433989af5cc470104f6bd22134320fe0221bd8aeb919fd5ec92d5"
dependencies = [
"cosmwasm-schema-derive",
"schemars",
@@ -116,9 +154,9 @@ dependencies = [
[[package]]
name = "cosmwasm-schema-derive"
-version = "1.2.7"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43dadf7c23406cb28079d69e6cb922c9c29b9157b0fe887e3b79c783b7d4bcb8"
+checksum = "96694ec781a7dd6dea1f968a2529ade009c21ad999c88b5f53d6cc495b3b96f7"
dependencies = [
"proc-macro2",
"quote",
@@ -127,11 +165,12 @@ dependencies = [
[[package]]
name = "cosmwasm-std"
-version = "1.2.7"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4337eef8dfaf8572fe6b6b415d6ec25f9308c7bb09f2da63789209fb131363be"
+checksum = "2a44d3f9c25b2f864737c6605a98f2e4675d53fd8bbc7cf4d7c02475661a793d"
dependencies = [
"base64",
+ "bnum",
"cosmwasm-crypto",
"cosmwasm-derive",
"derivative",
@@ -142,14 +181,13 @@ dependencies = [
"serde-json-wasm",
"sha2 0.10.7",
"thiserror",
- "uint",
]
[[package]]
name = "cosmwasm-storage"
-version = "1.2.7"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8601d284db8776e39fe99b3416516c5636ca73cef14666b7bb9648ca32c4b89"
+checksum = "ab544dfcad7c9e971933d522d99ec75cc8ddfa338854bb992b092e11bcd7e818"
dependencies = [
"cosmwasm-std",
"serde",
@@ -157,24 +195,18 @@ dependencies = [
[[package]]
name = "cpufeatures"
-version = "0.2.8"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c"
+checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1"
dependencies = [
"libc",
]
-[[package]]
-name = "crunchy"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
-
[[package]]
name = "crypto-bigint"
-version = "0.4.9"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef"
+checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124"
dependencies = [
"generic-array",
"rand_core 0.6.4",
@@ -282,9 +314,9 @@ dependencies = [
[[package]]
name = "der"
-version = "0.6.1"
+version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de"
+checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c"
dependencies = [
"const-oid",
"zeroize",
@@ -317,26 +349,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer 0.10.4",
+ "const-oid",
"crypto-common",
"subtle",
]
[[package]]
name = "dyn-clone"
-version = "1.0.11"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30"
+checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd"
[[package]]
name = "ecdsa"
-version = "0.14.8"
+version = "0.16.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c"
+checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4"
dependencies = [
"der",
+ "digest 0.10.7",
"elliptic-curve",
"rfc6979",
"signature",
+ "spki",
]
[[package]]
@@ -354,15 +389,20 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "either"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
+
[[package]]
name = "elliptic-curve"
-version = "0.12.3"
+version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3"
+checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b"
dependencies = [
"base16ct",
"crypto-bigint",
- "der",
"digest 0.10.7",
"ff",
"generic-array",
@@ -376,9 +416,9 @@ dependencies = [
[[package]]
name = "ff"
-version = "0.12.1"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160"
+checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
dependencies = [
"rand_core 0.6.4",
"subtle",
@@ -398,6 +438,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
+ "zeroize",
]
[[package]]
@@ -413,9 +454,9 @@ dependencies = [
[[package]]
name = "group"
-version = "0.12.1"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7"
+checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
dependencies = [
"ff",
"rand_core 0.6.4",
@@ -446,29 +487,49 @@ dependencies = [
"digest 0.10.7",
]
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itertools"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itoa"
-version = "1.0.6"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "k256"
-version = "0.11.6"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b"
+checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc"
dependencies = [
"cfg-if",
"ecdsa",
"elliptic-curve",
+ "once_cell",
"sha2 0.10.7",
+ "signature",
]
[[package]]
name = "libc"
-version = "0.2.147"
+version = "0.2.148"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
+checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"
[[package]]
name = "nft"
@@ -484,6 +545,15 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "num-traits"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
+dependencies = [
+ "autocfg",
+]
+
[[package]]
name = "once_cell"
version = "1.18.0"
@@ -496,11 +566,24 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+[[package]]
+name = "osmosis-std-derive"
+version = "0.16.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f47f0b2f22adb341bb59e5a3a1b464dde033181954bd055b9ae86d6511ba465b"
+dependencies = [
+ "itertools 0.10.5",
+ "proc-macro2",
+ "prost-types 0.11.9",
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "pkcs8"
-version = "0.9.0"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba"
+checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
dependencies = [
"der",
"spki",
@@ -508,18 +591,82 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.63"
+version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb"
+checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328"
dependencies = [
"unicode-ident",
]
+[[package]]
+name = "prost"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd"
+dependencies = [
+ "bytes",
+ "prost-derive 0.11.9",
+]
+
+[[package]]
+name = "prost"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d"
+dependencies = [
+ "bytes",
+ "prost-derive 0.12.1",
+]
+
+[[package]]
+name = "prost-derive"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
+dependencies = [
+ "anyhow",
+ "itertools 0.10.5",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "prost-derive"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32"
+dependencies = [
+ "anyhow",
+ "itertools 0.11.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.37",
+]
+
+[[package]]
+name = "prost-types"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13"
+dependencies = [
+ "prost 0.11.9",
+]
+
+[[package]]
+name = "prost-types"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf"
+dependencies = [
+ "prost 0.12.1",
+]
+
[[package]]
name = "quote"
-version = "1.0.28"
+version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
+checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
"proc-macro2",
]
@@ -541,26 +688,25 @@ dependencies = [
[[package]]
name = "rfc6979"
-version = "0.3.1"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
+checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
dependencies = [
- "crypto-bigint",
"hmac",
- "zeroize",
+ "subtle",
]
[[package]]
name = "ryu"
-version = "1.0.13"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
[[package]]
name = "schemars"
-version = "0.8.12"
+version = "0.8.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f"
+checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c"
dependencies = [
"dyn-clone",
"schemars_derive",
@@ -570,9 +716,9 @@ dependencies = [
[[package]]
name = "schemars_derive"
-version = "0.8.12"
+version = "0.8.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c"
+checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c"
dependencies = [
"proc-macro2",
"quote",
@@ -582,9 +728,9 @@ dependencies = [
[[package]]
name = "sec1"
-version = "0.3.0"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
+checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
dependencies = [
"base16ct",
"der",
@@ -596,19 +742,28 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.17"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed"
+checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918"
[[package]]
name = "serde"
-version = "1.0.164"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d"
+checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
dependencies = [
"serde_derive",
]
+[[package]]
+name = "serde-cw-value"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4"
+dependencies = [
+ "serde",
+]
+
[[package]]
name = "serde-json-wasm"
version = "0.5.1"
@@ -620,13 +775,13 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.164"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
+checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.22",
+ "syn 2.0.37",
]
[[package]]
@@ -642,9 +797,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.99"
+version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3"
+checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
dependencies = [
"itoa",
"ryu",
@@ -677,9 +832,9 @@ dependencies = [
[[package]]
name = "signature"
-version = "1.6.4"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
+checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500"
dependencies = [
"digest 0.10.7",
"rand_core 0.6.4",
@@ -687,20 +842,14 @@ dependencies = [
[[package]]
name = "spki"
-version = "0.6.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b"
+checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a"
dependencies = [
"base64ct",
"der",
]
-[[package]]
-name = "static_assertions"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-
[[package]]
name = "subtle"
version = "2.5.0"
@@ -720,9 +869,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.22"
+version = "2.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616"
+checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8"
dependencies = [
"proc-macro2",
"quote",
@@ -731,47 +880,35 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "1.0.40"
+version = "1.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
+checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.40"
+version = "1.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
+checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.22",
+ "syn 2.0.37",
]
[[package]]
name = "typenum"
-version = "1.16.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
-
-[[package]]
-name = "uint"
-version = "0.9.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52"
-dependencies = [
- "byteorder",
- "crunchy",
- "hex",
- "static_assertions",
-]
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "unicode-ident"
-version = "1.0.9"
+version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "version_check"
diff --git a/integration-tests/contracts/modules/nft/Cargo.toml b/integration-tests/contracts/modules/nft/Cargo.toml
index 45c72089a..04e980e14 100644
--- a/integration-tests/contracts/modules/nft/Cargo.toml
+++ b/integration-tests/contracts/modules/nft/Cargo.toml
@@ -33,6 +33,6 @@ cosmwasm-storage = "1.2.5"
cw-storage-plus = "1.0.1"
cw2 = "1.0.1"
thiserror = { version = "1.0.40" }
-coreum-wasm-sdk = "0.1.3"
+coreum-wasm-sdk = "0.2.0"
cosmwasm-schema = "1.2.6"
cw-ownable = "0.5.1"
diff --git a/integration-tests/contracts/modules/nft/src/contract.rs b/integration-tests/contracts/modules/nft/src/contract.rs
index 49a0e04d7..d3ca7ec5e 100644
--- a/integration-tests/contracts/modules/nft/src/contract.rs
+++ b/integration-tests/contracts/modules/nft/src/contract.rs
@@ -1,6 +1,6 @@
use coreum_wasm_sdk::assetnft::{
- self, ClassResponse, ClassesResponse, FrozenResponse, ParamsResponse,
- WhitelistedAccountsForNFTResponse, WhitelistedResponse,
+ self, BurntNFTResponse, BurntNFTsInClassResponse, ClassResponse, ClassesResponse,
+ FrozenResponse, ParamsResponse, WhitelistedAccountsForNFTResponse, WhitelistedResponse,
};
use coreum_wasm_sdk::core::{CoreumMsg, CoreumQueries, CoreumResult};
use coreum_wasm_sdk::nft;
@@ -241,6 +241,8 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult to_binary(&query_nfts(deps, owner)?),
QueryMsg::ClassNft {} => to_binary(&query_nft_class(deps)?),
QueryMsg::ClassesNft {} => to_binary(&query_nft_classes(deps)?),
+ QueryMsg::BurntNft { nft_id } => to_binary(&query_burnt_nft(deps, nft_id)?),
+ QueryMsg::BurntNftsInClass {} => to_binary(&query_burnt_nfts_in_class(deps)?),
}
}
@@ -351,6 +353,46 @@ fn query_whitelisted_accounts_for_nft(
Ok(res)
}
+fn query_burnt_nft(deps: Deps, nft_id: String) -> StdResult {
+ let class_id = CLASS_ID.load(deps.storage)?;
+ let request: QueryRequest =
+ CoreumQueries::AssetNFT(assetnft::Query::BurntNFT { class_id, nft_id }).into();
+ let res = deps.querier.query(&request)?;
+ Ok(res)
+}
+
+fn query_burnt_nfts_in_class(deps: Deps) -> StdResult {
+ let class_id = CLASS_ID.load(deps.storage)?;
+ let mut pagination = None;
+ let mut nft_ids = vec![];
+ let mut res: BurntNFTsInClassResponse;
+ loop {
+ let request = CoreumQueries::AssetNFT(assetnft::Query::BurntNFTsInClass {
+ pagination,
+ class_id: class_id.clone(),
+ })
+ .into();
+ res = deps.querier.query(&request)?;
+ nft_ids.append(&mut res.nft_ids);
+ if res.pagination.next_key.is_none() {
+ break;
+ } else {
+ pagination = Some(PageRequest {
+ key: res.pagination.next_key,
+ offset: None,
+ limit: None,
+ count_total: None,
+ reverse: None,
+ })
+ }
+ }
+ let res = BurntNFTsInClassResponse {
+ pagination: res.pagination,
+ nft_ids,
+ };
+ Ok(res)
+}
+
// ********** NFT **********
fn query_balance(deps: Deps, owner: String) -> StdResult {
diff --git a/integration-tests/contracts/modules/nft/src/msg.rs b/integration-tests/contracts/modules/nft/src/msg.rs
index 91e5f5241..5d1f4cb47 100644
--- a/integration-tests/contracts/modules/nft/src/msg.rs
+++ b/integration-tests/contracts/modules/nft/src/msg.rs
@@ -59,4 +59,6 @@ pub enum QueryMsg {
Nfts { owner: Option }, // we use Nfts not NFTs since NFTs is decoded as n_f_ts
ClassNft {}, // we use ClassNft instead of Class because there is already a Class query being used
ClassesNft {}, // we use ClassesNft instead of Class because there is already a Classes query being used
+ BurntNft { nft_id: String },
+ BurntNftsInClass {},
}
diff --git a/integration-tests/modules/assetft_test.go b/integration-tests/modules/assetft_test.go
index aae17f4eb..c53f7f312 100644
--- a/integration-tests/modules/assetft_test.go
+++ b/integration-tests/modules/assetft_test.go
@@ -2580,6 +2580,246 @@ func TestAuthzWithAssetFT(t *testing.T) {
requireT.EqualValues("921", whitelistingRes.GetBalance().Amount.String())
}
+// TestAuthzMintAuthorizationLimit tests the authz MintLimitAuthorization msg works as expected.
+func TestAuthzMintAuthorizationLimit(t *testing.T) {
+ t.Parallel()
+
+ ctx, chain := integrationtests.NewCoreumTestingContext(t)
+
+ requireT := require.New(t)
+
+ bankClient := banktypes.NewQueryClient(chain.ClientContext)
+ authzClient := authztypes.NewQueryClient(chain.ClientContext)
+
+ granter := chain.GenAccount()
+ grantee := chain.GenAccount()
+
+ chain.FundAccountWithOptions(ctx, t, granter, integrationtests.BalancesOptions{
+ Messages: []sdk.Msg{
+ &assetfttypes.MsgIssue{},
+ &authztypes.MsgGrant{},
+ &authztypes.MsgGrant{},
+ },
+ Amount: chain.QueryAssetFTParams(ctx, t).IssueFee.Amount,
+ })
+
+ // mint and grant authorization
+ issueMsg := &assetfttypes.MsgIssue{
+ Issuer: granter.String(),
+ Symbol: "symbol",
+ Subunit: "subunit",
+ Precision: 1,
+ InitialAmount: sdkmath.NewInt(0),
+ Features: []assetfttypes.Feature{
+ assetfttypes.Feature_minting,
+ },
+ }
+ denom := assetfttypes.BuildDenom(issueMsg.Subunit, granter)
+ grantMintMsg, err := authztypes.NewMsgGrant(
+ granter,
+ grantee,
+ assetfttypes.NewMintAuthorization(sdk.NewCoin(denom, sdk.NewInt(1000))),
+ lo.ToPtr(time.Now().Add(time.Minute)),
+ )
+ require.NoError(t, err)
+
+ _, err = client.BroadcastTx(
+ ctx,
+ chain.ClientContext.WithFromAddress(granter),
+ chain.TxFactory().WithGas(chain.GasLimitByMsgs(grantMintMsg, issueMsg)),
+ grantMintMsg, issueMsg,
+ )
+ requireT.NoError(err)
+
+ // assert granted
+ gransRes, err := authzClient.Grants(ctx, &authztypes.QueryGrantsRequest{
+ Granter: granter.String(),
+ Grantee: grantee.String(),
+ })
+ requireT.NoError(err)
+ requireT.Equal(1, len(gransRes.Grants))
+
+ // try to mint using the authz
+ msgMint := &assetfttypes.MsgMint{
+ Sender: granter.String(),
+ Coin: sdk.NewCoin(denom, sdkmath.NewInt(501)),
+ }
+
+ execMsg := authztypes.NewMsgExec(grantee, []sdk.Msg{msgMint})
+ chain.FundAccountWithOptions(ctx, t, grantee, integrationtests.BalancesOptions{
+ Messages: []sdk.Msg{
+ &execMsg,
+ },
+ })
+
+ _, err = client.BroadcastTx(
+ ctx,
+ chain.ClientContext.WithFromAddress(grantee),
+ chain.TxFactory().WithGas(chain.GasLimitByMsgs(&execMsg)),
+ &execMsg,
+ )
+ requireT.NoError(err)
+
+ supply, err := bankClient.SupplyOf(ctx, &banktypes.QuerySupplyOfRequest{Denom: denom})
+ requireT.NoError(err)
+ requireT.EqualValues("501", supply.Amount.Amount.String())
+
+ gransRes, err = authzClient.Grants(ctx, &authztypes.QueryGrantsRequest{
+ Granter: granter.String(),
+ Grantee: grantee.String(),
+ })
+ requireT.NoError(err)
+ requireT.Equal(1, len(gransRes.Grants))
+ updatedGrant := assetfttypes.MintAuthorization{}
+ chain.ClientContext.Codec().MustUnmarshal(gransRes.Grants[0].Authorization.Value, &updatedGrant)
+ requireT.EqualValues("499", updatedGrant.MintLimit.Amount.String())
+
+ // try to mint exceeding limit
+ msgMint = &assetfttypes.MsgMint{
+ Sender: granter.String(),
+ Coin: sdk.NewCoin(denom, sdkmath.NewInt(500)),
+ }
+
+ execMsg = authztypes.NewMsgExec(grantee, []sdk.Msg{msgMint})
+ chain.FundAccountWithOptions(ctx, t, grantee, integrationtests.BalancesOptions{
+ Messages: []sdk.Msg{
+ &execMsg,
+ },
+ })
+
+ _, err = client.BroadcastTx(
+ ctx,
+ chain.ClientContext.WithFromAddress(grantee),
+ chain.TxFactory().WithGas(chain.GasLimitByMsgs(&execMsg)),
+ &execMsg,
+ )
+ requireT.Error(err)
+ requireT.ErrorIs(err, cosmoserrors.ErrUnauthorized)
+
+ // minting the entire limit should remove the grant
+ msgMint = &assetfttypes.MsgMint{
+ Sender: granter.String(),
+ Coin: sdk.NewCoin(denom, sdkmath.NewInt(499)),
+ }
+
+ execMsg = authztypes.NewMsgExec(grantee, []sdk.Msg{msgMint})
+ chain.FundAccountWithOptions(ctx, t, grantee, integrationtests.BalancesOptions{
+ Messages: []sdk.Msg{
+ &execMsg,
+ },
+ })
+
+ _, err = client.BroadcastTx(
+ ctx,
+ chain.ClientContext.WithFromAddress(grantee),
+ chain.TxFactory().WithGas(chain.GasLimitByMsgs(&execMsg)),
+ &execMsg,
+ )
+ requireT.NoError(err)
+ gransRes, err = authzClient.Grants(ctx, &authztypes.QueryGrantsRequest{
+ Granter: granter.String(),
+ Grantee: grantee.String(),
+ })
+ requireT.NoError(err)
+ requireT.Equal(0, len(gransRes.Grants))
+}
+
+// TestAuthzMintAuthorizationLimit_GrantFromNonIssuer tests the authz MintLimitAuthorization msg works as expected if
+// the granter is non-issuer address.
+func TestAuthzMintAuthorizationLimit_GrantFromNonIssuer(t *testing.T) {
+ t.Parallel()
+
+ ctx, chain := integrationtests.NewCoreumTestingContext(t)
+
+ requireT := require.New(t)
+
+ authzClient := authztypes.NewQueryClient(chain.ClientContext)
+
+ issuer := chain.GenAccount()
+ granter := chain.GenAccount()
+ grantee := chain.GenAccount()
+
+ chain.FundAccountWithOptions(ctx, t, issuer, integrationtests.BalancesOptions{
+ Messages: []sdk.Msg{
+ &assetfttypes.MsgIssue{},
+ },
+ Amount: chain.QueryAssetFTParams(ctx, t).IssueFee.Amount,
+ })
+
+ chain.FundAccountWithOptions(ctx, t, granter, integrationtests.BalancesOptions{
+ Messages: []sdk.Msg{
+ &authztypes.MsgGrant{},
+ &authztypes.MsgGrant{},
+ },
+ })
+
+ // mint and grant authorization
+ issueMsg := &assetfttypes.MsgIssue{
+ Issuer: issuer.String(),
+ Symbol: "symbol",
+ Subunit: "subunit",
+ Precision: 1,
+ InitialAmount: sdkmath.NewInt(0),
+ Features: []assetfttypes.Feature{
+ assetfttypes.Feature_minting,
+ },
+ }
+ _, err := client.BroadcastTx(
+ ctx,
+ chain.ClientContext.WithFromAddress(issuer),
+ chain.TxFactory().WithGas(chain.GasLimitByMsgs(issueMsg)),
+ issueMsg,
+ )
+ requireT.NoError(err)
+
+ denom := assetfttypes.BuildDenom(issueMsg.Subunit, issuer)
+ grantMintMsg, err := authztypes.NewMsgGrant(
+ granter,
+ grantee,
+ assetfttypes.NewMintAuthorization(sdk.NewCoin(denom, sdk.NewInt(1000))),
+ lo.ToPtr(time.Now().Add(time.Minute)),
+ )
+ require.NoError(t, err)
+
+ _, err = client.BroadcastTx(
+ ctx,
+ chain.ClientContext.WithFromAddress(granter),
+ chain.TxFactory().WithGas(chain.GasLimitByMsgs(grantMintMsg)),
+ grantMintMsg,
+ )
+ requireT.NoError(err)
+
+ // assert granted
+ gransRes, err := authzClient.Grants(ctx, &authztypes.QueryGrantsRequest{
+ Granter: granter.String(),
+ Grantee: grantee.String(),
+ })
+ requireT.NoError(err)
+ requireT.Equal(1, len(gransRes.Grants))
+
+ // try to mint using the authz
+ msgMint := &assetfttypes.MsgMint{
+ Sender: granter.String(),
+ Coin: sdk.NewCoin(denom, sdkmath.NewInt(501)),
+ }
+
+ execMsg := authztypes.NewMsgExec(grantee, []sdk.Msg{msgMint})
+ chain.FundAccountWithOptions(ctx, t, grantee, integrationtests.BalancesOptions{
+ Messages: []sdk.Msg{
+ &execMsg,
+ },
+ })
+
+ _, err = client.BroadcastTx(
+ ctx,
+ chain.ClientContext.WithFromAddress(grantee),
+ chain.TxFactory().WithGas(chain.GasLimitByMsgs(&execMsg)),
+ &execMsg,
+ )
+ requireT.Error(err)
+ requireT.ErrorIs(err, cosmoserrors.ErrUnauthorized)
+}
+
// TestAssetFTBurnRate_OnMinting verifies both burn rate and send commission rate are not applied on received minted tokens.
func TestAssetFT_RatesAreNotApplied_OnMinting(t *testing.T) {
assertT := assert.New(t)
diff --git a/integration-tests/modules/wasm_test.go b/integration-tests/modules/wasm_test.go
index 535ddb994..1841ba995 100644
--- a/integration-tests/modules/wasm_test.go
+++ b/integration-tests/modules/wasm_test.go
@@ -1368,7 +1368,6 @@ func TestWASMNonFungibleTokenInContract(t *testing.T) {
requireT.NoError(json.Unmarshal(queryOut, &classQueryRes))
requireT.Equal(
moduleswasm.AssetnftClass{
- // TODO Artem: compare it with Class[0].
ID: expectedClass.Id,
Issuer: expectedClass.Issuer,
Name: expectedClass.Name,
@@ -1473,6 +1472,33 @@ func TestWASMNonFungibleTokenInContract(t *testing.T) {
requireT.NoError(json.Unmarshal(queryOut, &whitelistedAccountsForNFTQueryRes))
requireT.Equal(whitelistedAccountsForNFTQueryRes.Accounts[0], recipient.String())
+ // ********** BurntNFT **********
+
+ burntNFTPayload, err := json.Marshal(map[moduleswasm.NftMethod]moduleswasm.BurntNftIDRequest{
+ moduleswasm.NftMethodBurntNft: {
+ NftID: "id-1",
+ },
+ })
+ requireT.NoError(err)
+ queryOut, err = chain.Wasm.QueryWASMContract(ctx, contractAddr, burntNFTPayload)
+ requireT.NoError(err)
+ var burntNFTQueryRes assetnfttypes.QueryBurntNFTResponse
+ requireT.NoError(json.Unmarshal(queryOut, &burntNFTQueryRes))
+ requireT.Equal(burntNFTQueryRes.Burnt, true)
+
+ // ********** BurntNFTsInClass **********
+
+ burntNFTsInClassPayload, err := json.Marshal(map[moduleswasm.NftMethod]struct{}{
+ moduleswasm.NftMethodBurntNftInClass: {},
+ })
+
+ requireT.NoError(err)
+ queryOut, err = chain.Wasm.QueryWASMContract(ctx, contractAddr, burntNFTsInClassPayload)
+ requireT.NoError(err)
+ var burntNFTsInClassQueryRes assetnfttypes.QueryBurntNFTsInClassResponse
+ requireT.NoError(json.Unmarshal(queryOut, &burntNFTsInClassQueryRes))
+ requireT.Equal(burntNFTsInClassQueryRes.NftIds, []string{"id-1"})
+
// ********** Balance **********
balancePayload, err := json.Marshal(map[moduleswasm.NftMethod]moduleswasm.NftOwnerRequest{
diff --git a/integration-tests/upgrade/gov_migration_test.go b/integration-tests/upgrade/gov_migration_test.go
new file mode 100644
index 000000000..ac25e300d
--- /dev/null
+++ b/integration-tests/upgrade/gov_migration_test.go
@@ -0,0 +1,128 @@
+//go:build integrationtests
+
+package upgrade
+
+import (
+ "testing"
+
+ sdkmath "cosmossdk.io/math"
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
+ govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
+ govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
+ "github.com/stretchr/testify/require"
+
+ integrationtests "github.com/CoreumFoundation/coreum/v3/integration-tests"
+ "github.com/CoreumFoundation/coreum/v3/pkg/client"
+)
+
+var (
+ fundAmount = sdkmath.NewInt(1_000_000)
+ missingDepositAmount = sdkmath.NewInt(10)
+)
+
+type govMigrationTest struct {
+ onDepositProposalID uint64
+ proposer sdk.AccAddress
+ communityPoolRecipient sdk.AccAddress
+}
+
+func (gmt *govMigrationTest) Before(t *testing.T) {
+ ctx, chain := integrationtests.NewCoreumTestingContext(t)
+ requireT := require.New(t)
+
+ // Fund community pool.
+ communityPoolFunder := chain.GenAccount()
+ msgFundCommunityPool := &distributiontypes.MsgFundCommunityPool{
+ Amount: sdk.NewCoins(chain.NewCoin(fundAmount)),
+ Depositor: communityPoolFunder.String(),
+ }
+
+ chain.FundAccountWithOptions(ctx, t, communityPoolFunder,
+ integrationtests.BalancesOptions{
+ Messages: []sdk.Msg{
+ msgFundCommunityPool,
+ },
+ Amount: fundAmount,
+ })
+ _, err := client.BroadcastTx(
+ ctx,
+ chain.ClientContext.WithFromAddress(communityPoolFunder),
+ chain.TxFactory().WithGas(chain.GasLimitByMsgs(msgFundCommunityPool)),
+ msgFundCommunityPool,
+ )
+ requireT.NoError(err)
+
+ // Propose community pool spend but keep proposal in deposit status.
+ proposer := chain.GenAccount()
+ proposerBalance, err := chain.LegacyGovernance.ComputeProposerBalance(ctx)
+ requireT.NoError(err)
+ chain.Faucet.FundAccounts(ctx, t, integrationtests.NewFundedAccount(proposer, proposerBalance))
+
+ communityPoolRecipient := chain.GenAccount()
+ proposalMsg, err := chain.LegacyGovernance.NewMsgSubmitProposalV1Beta1(
+ ctx,
+ proposer,
+ &distributiontypes.CommunityPoolSpendProposal{ //nolint:staticcheck
+ Title: "Community pool spend created before upgrade",
+ Description: "Community pool spend created before upgrade",
+ Recipient: communityPoolRecipient.String(),
+ Amount: sdk.NewCoins(chain.NewCoin(fundAmount)),
+ },
+ )
+
+ // Subtract 10udevcore from initial deposit amount, so proposal stays on deposit status.
+ proposalMsg.InitialDeposit = proposalMsg.InitialDeposit.Sub(chain.NewCoin(missingDepositAmount))
+ requireT.NoError(err)
+ proposalID, err := chain.LegacyGovernance.Propose(ctx, t, proposalMsg)
+ requireT.NoError(err)
+
+ proposal, err := chain.LegacyGovernance.GetProposal(ctx, proposalID)
+ requireT.NoError(err)
+ requireT.Equal(govtypesv1beta1.StatusDepositPeriod, proposal.Status)
+
+ gmt.onDepositProposalID = proposalID
+ gmt.proposer = proposer
+ gmt.communityPoolRecipient = communityPoolRecipient
+}
+
+func (gmt *govMigrationTest) After(t *testing.T) {
+ ctx, chain := integrationtests.NewCoreumTestingContext(t)
+ requireT := require.New(t)
+
+ proposal, err := chain.Governance.GetProposal(ctx, gmt.onDepositProposalID)
+ requireT.NoError(err)
+ requireT.Equal(govtypesv1.StatusDepositPeriod, proposal.Status)
+ // Proposer could be set as optional step during the upgrade, but we decided to not implement it
+ // since proposal fails anyway.
+ requireT.Equal("", proposal.Proposer)
+
+ depositor := chain.GenAccount()
+ requireT.NoError(err)
+
+ chain.FundAccountWithOptions(ctx, t, depositor, integrationtests.BalancesOptions{
+ Messages: []sdk.Msg{&govtypesv1.MsgDeposit{}},
+ Amount: missingDepositAmount,
+ })
+
+ depositMsg := govtypesv1.NewMsgDeposit(depositor, gmt.onDepositProposalID, sdk.NewCoins(chain.NewCoin(missingDepositAmount)))
+ _, err = client.BroadcastTx(
+ ctx,
+ chain.ClientContext.WithFromAddress(depositor),
+ chain.TxFactory().WithGas(chain.GasLimitByMsgs(depositMsg)),
+ depositMsg,
+ )
+ requireT.NoError(err)
+
+ proposal, err = chain.Governance.GetProposal(ctx, gmt.onDepositProposalID)
+ requireT.NoError(err)
+ requireT.Equal(govtypesv1.StatusVotingPeriod, proposal.Status)
+
+ requireT.NoError(chain.Governance.VoteAll(ctx, govtypesv1.OptionYes, gmt.onDepositProposalID))
+
+ proposalStatus, err := chain.Governance.WaitForVotingToFinalize(ctx, gmt.onDepositProposalID)
+ requireT.NoError(err)
+ requireT.Equal(govtypesv1.StatusFailed, proposalStatus)
+ // Logs produced inside cored for such a proposal:
+ // "proposal tallied module=x/gov proposal=1 results="passed, but msg 0 (/cosmos.gov.v1.MsgExecLegacyContent) failed on execution: distribution: no handler exists for proposal type"
+}
diff --git a/integration-tests/upgrade/upgrade_test.go b/integration-tests/upgrade/upgrade_test.go
index a31161fab..c2ee077d1 100644
--- a/integration-tests/upgrade/upgrade_test.go
+++ b/integration-tests/upgrade/upgrade_test.go
@@ -46,6 +46,7 @@ func upgradeV3(t *testing.T) {
¶msMigrationTest{},
&wasmMigrationTest{},
&ibcUpgradeTest{},
+ &govMigrationTest{},
}
for _, test := range tests {
diff --git a/proto/coreum/asset/ft/v1/authz.proto b/proto/coreum/asset/ft/v1/authz.proto
new file mode 100644
index 000000000..154b60953
--- /dev/null
+++ b/proto/coreum/asset/ft/v1/authz.proto
@@ -0,0 +1,21 @@
+syntax = "proto3";
+package coreum.asset.ft.v1;
+
+import "amino/amino.proto";
+import "gogoproto/gogo.proto";
+import "cosmos_proto/cosmos.proto";
+import "cosmos/base/v1beta1/coin.proto";
+
+option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/ft/types";
+
+// MintAuthorization allows the grantee to mint up to mint_limit coin from
+// the granter's account.
+message MintAuthorization {
+ option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization";
+ option (amino.name) = "cosmos-sdk/MintAuthorization";
+
+ cosmos.base.v1beta1.Coin mint_limit = 1 [
+ (gogoproto.nullable) = false,
+ (amino.dont_omitempty) = false
+ ];
+}
diff --git a/x/asset/ft/types/authz.pb.go b/x/asset/ft/types/authz.pb.go
new file mode 100644
index 000000000..c0241fb71
--- /dev/null
+++ b/x/asset/ft/types/authz.pb.go
@@ -0,0 +1,332 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: coreum/asset/ft/v1/authz.proto
+
+package types
+
+import (
+ fmt "fmt"
+ _ "github.com/cosmos/cosmos-proto"
+ types "github.com/cosmos/cosmos-sdk/types"
+ _ "github.com/cosmos/cosmos-sdk/types/tx/amino"
+ _ "github.com/cosmos/gogoproto/gogoproto"
+ proto "github.com/cosmos/gogoproto/proto"
+ io "io"
+ math "math"
+ math_bits "math/bits"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+
+// MintAuthorization allows the grantee to mint up to mint_limit coin from
+// the granter's account.
+type MintAuthorization struct {
+ MintLimit types.Coin `protobuf:"bytes,1,opt,name=mint_limit,json=mintLimit,proto3" json:"mint_limit"`
+}
+
+func (m *MintAuthorization) Reset() { *m = MintAuthorization{} }
+func (m *MintAuthorization) String() string { return proto.CompactTextString(m) }
+func (*MintAuthorization) ProtoMessage() {}
+func (*MintAuthorization) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8e6a458149a08610, []int{0}
+}
+func (m *MintAuthorization) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MintAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MintAuthorization.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MintAuthorization) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MintAuthorization.Merge(m, src)
+}
+func (m *MintAuthorization) XXX_Size() int {
+ return m.Size()
+}
+func (m *MintAuthorization) XXX_DiscardUnknown() {
+ xxx_messageInfo_MintAuthorization.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MintAuthorization proto.InternalMessageInfo
+
+func (m *MintAuthorization) GetMintLimit() types.Coin {
+ if m != nil {
+ return m.MintLimit
+ }
+ return types.Coin{}
+}
+
+func init() {
+ proto.RegisterType((*MintAuthorization)(nil), "coreum.asset.ft.v1.MintAuthorization")
+}
+
+func init() { proto.RegisterFile("coreum/asset/ft/v1/authz.proto", fileDescriptor_8e6a458149a08610) }
+
+var fileDescriptor_8e6a458149a08610 = []byte{
+ // 305 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xce, 0x2f, 0x4a,
+ 0x2d, 0xcd, 0xd5, 0x4f, 0x2c, 0x2e, 0x4e, 0x2d, 0xd1, 0x4f, 0x2b, 0xd1, 0x2f, 0x33, 0xd4, 0x4f,
+ 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xc8, 0xeb, 0x81,
+ 0xe5, 0xf5, 0xd2, 0x4a, 0xf4, 0xca, 0x0c, 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1,
+ 0x24, 0x44, 0x99, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0x25,
+ 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xe3, 0x21, 0x12, 0x10, 0x0e, 0x54, 0x4a, 0x0e, 0xc2, 0xd3,
+ 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0xce, 0xcf,
+ 0xcc, 0x83, 0xc8, 0x2b, 0x2d, 0x64, 0xe4, 0x12, 0xf4, 0xcd, 0xcc, 0x2b, 0x71, 0x2c, 0x2d, 0xc9,
+ 0xc8, 0x2f, 0xca, 0xac, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x13, 0x72, 0xe6, 0xe2, 0xca, 0xcd, 0xcc,
+ 0x2b, 0x89, 0xcf, 0xc9, 0xcc, 0xcd, 0x2c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd4,
+ 0x83, 0x1a, 0x0c, 0x32, 0x4a, 0x0f, 0x6a, 0x94, 0x9e, 0x73, 0x7e, 0x66, 0x9e, 0x13, 0xe7, 0x89,
+ 0x7b, 0xf2, 0x0c, 0x2b, 0x9e, 0x6f, 0xd0, 0x62, 0x08, 0xe2, 0x04, 0xe9, 0xf3, 0x01, 0x69, 0xb3,
+ 0x72, 0x3f, 0xb5, 0x45, 0x57, 0x09, 0xaa, 0x07, 0xe2, 0x55, 0x98, 0x26, 0x14, 0xcb, 0xba, 0x9e,
+ 0x6f, 0xd0, 0x92, 0x81, 0x28, 0xd3, 0x2d, 0x4e, 0xc9, 0xd6, 0xc7, 0x70, 0x8d, 0x53, 0xc0, 0x89,
+ 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3,
+ 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x99, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26,
+ 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x3b, 0x83, 0x03, 0xd0, 0x2d, 0xbf, 0x34, 0x2f, 0x05, 0xac, 0x4d,
+ 0x1f, 0x1a, 0xe2, 0x65, 0xc6, 0xfa, 0x15, 0x88, 0x60, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62,
+ 0x03, 0x7b, 0xde, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x21, 0x39, 0x17, 0xc1, 0x96, 0x01, 0x00,
+ 0x00,
+}
+
+func (m *MintAuthorization) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MintAuthorization) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MintAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.MintLimit.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintAuthz(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int {
+ offset -= sovAuthz(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *MintAuthorization) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.MintLimit.Size()
+ n += 1 + l + sovAuthz(uint64(l))
+ return n
+}
+
+func sovAuthz(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
+}
+func sozAuthz(x uint64) (n int) {
+ return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (m *MintAuthorization) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowAuthz
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MintAuthorization: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MintAuthorization: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MintLimit", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowAuthz
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthAuthz
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthAuthz
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.MintLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipAuthz(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthAuthz
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipAuthz(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ depth := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowAuthz
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowAuthz
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ case 1:
+ iNdEx += 8
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowAuthz
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if length < 0 {
+ return 0, ErrInvalidLengthAuthz
+ }
+ iNdEx += length
+ case 3:
+ depth++
+ case 4:
+ if depth == 0 {
+ return 0, ErrUnexpectedEndOfGroupAuthz
+ }
+ depth--
+ case 5:
+ iNdEx += 4
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthAuthz
+ }
+ if depth == 0 {
+ return iNdEx, nil
+ }
+ }
+ return 0, io.ErrUnexpectedEOF
+}
+
+var (
+ ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow")
+ ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group")
+)
diff --git a/x/asset/ft/types/codec.go b/x/asset/ft/types/codec.go
index 99b197709..600000a0d 100644
--- a/x/asset/ft/types/codec.go
+++ b/x/asset/ft/types/codec.go
@@ -5,6 +5,7 @@ import (
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"
+ "github.com/cosmos/cosmos-sdk/x/authz"
)
// RegisterInterfaces registers the asset module tx interfaces.
@@ -23,5 +24,9 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*codec.ProtoMarshaler)(nil),
&DelayedTokenUpgradeV1{},
)
+ registry.RegisterImplementations(
+ (*authz.Authorization)(nil),
+ &MintAuthorization{},
+ )
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
diff --git a/x/asset/ft/types/mint_authorization.go b/x/asset/ft/types/mint_authorization.go
new file mode 100644
index 000000000..7cd9c6b78
--- /dev/null
+++ b/x/asset/ft/types/mint_authorization.go
@@ -0,0 +1,48 @@
+package types
+
+import (
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
+ "github.com/cosmos/cosmos-sdk/x/authz"
+)
+
+var _ authz.Authorization = &MintAuthorization{}
+
+// NewMintAuthorization returns a new MintAuthorization object.
+func NewMintAuthorization(mintLimit sdk.Coin) *MintAuthorization {
+ return &MintAuthorization{
+ MintLimit: mintLimit,
+ }
+}
+
+// MsgTypeURL implements Authorization.MsgTypeURL.
+func (a MintAuthorization) MsgTypeURL() string {
+ return sdk.MsgTypeURL(&MsgMint{})
+}
+
+// Accept implements Authorization.Accept.
+func (a MintAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (authz.AcceptResponse, error) {
+ mMint, ok := msg.(*MsgMint)
+ if !ok {
+ return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch")
+ }
+
+ limitLeft, err := a.MintLimit.SafeSub(mMint.Coin)
+ if err != nil {
+ return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested amount is more than mint limit")
+ }
+
+ return authz.AcceptResponse{
+ Accept: true,
+ Delete: limitLeft.IsZero(),
+ Updated: &MintAuthorization{MintLimit: limitLeft},
+ }, nil
+}
+
+// ValidateBasic implements Authorization.ValidateBasic.
+func (a MintAuthorization) ValidateBasic() error {
+ if !a.MintLimit.IsPositive() {
+ return sdkerrors.ErrInvalidCoins.Wrapf("spend limit must be positive")
+ }
+ return nil
+}
diff --git a/x/wasm/handler/query.go b/x/wasm/handler/query.go
index e71766bc5..cdf4804d9 100644
--- a/x/wasm/handler/query.go
+++ b/x/wasm/handler/query.go
@@ -75,6 +75,8 @@ type assetNFTQuery struct {
Frozen *assetnfttypes.QueryFrozenRequest `json:"Frozen"`
Whitelisted *assetnfttypes.QueryWhitelistedRequest `json:"Whitelisted"`
WhitelistedAccountsforNFT *assetnfttypes.QueryWhitelistedAccountsForNFTRequest `json:"WhitelistedAccountsforNft"`
+ BurntNFT *assetnfttypes.QueryBurntNFTRequest `json:"BurntNft"`
+ BurntNFTsInClass *assetnfttypes.QueryBurntNFTsInClassRequest `json:"BurntNftsInClass"`
}
// nft is the nft with string data.
@@ -328,6 +330,18 @@ func processAssetNFTQuery(ctx sdk.Context, assetNFTQuery *assetNFTQuery, assetNF
})
}
+ if assetNFTQuery.BurntNFT != nil {
+ return executeQuery(ctx, assetNFTQuery.BurntNFT, func(ctx context.Context, req *assetnfttypes.QueryBurntNFTRequest) (*assetnfttypes.QueryBurntNFTResponse, error) {
+ return assetNFTQueryServer.BurntNFT(ctx, req)
+ })
+ }
+
+ if assetNFTQuery.BurntNFTsInClass != nil {
+ return executeQuery(ctx, assetNFTQuery.BurntNFTsInClass, func(ctx context.Context, req *assetnfttypes.QueryBurntNFTsInClassRequest) (*assetnfttypes.QueryBurntNFTsInClassResponse, error) {
+ return assetNFTQueryServer.BurntNFTsInClass(ctx, req)
+ })
+ }
+
return nil, nil
}