diff --git a/src/@core/layouts/modules.js b/src/@core/layouts/modules.js index 633fd96b..d301339d 100644 --- a/src/@core/layouts/modules.js +++ b/src/@core/layouts/modules.js @@ -25,6 +25,11 @@ export default () => ([ title: 'dashboard.uptime', route: 'uptime', }, + { + scope: 'normal', + title: 'NFT', + route: 'nftdenom', + }, { scope: 'normal', title: 'dashboard.parameters', diff --git a/src/libs/fetch.js b/src/libs/fetch.js index 9ebd1dca..bf83e297 100644 --- a/src/libs/fetch.js +++ b/src/libs/fetch.js @@ -95,6 +95,28 @@ export default class ChainFetch { return this.get('/cosmos/slashing/v1beta1/signing_infos?pagination.limit=500', config) } + async getNFTsByOwner(address) { + return this.get(`/irismod/nft/nfts?owner=${address}`) + } + + async getNFTDenom(denom_id) { + return this.get(`/irismod/nft/denoms/${denom_id}`) + } + + async getWasmQuery(contract, query) { + const query_data = toBase64(Buffer.from(query)) + console.log(contract, query_data) + return this.get(`/cosmwasm/wasm/v1/contract/${contract}/smart/${query_data}`) + } + + async getNFTdetails(denom_id, token_id) { + return this.get(`/irismod/nft/nfts/${denom_id}/${token_id}`) + } + + async getWasmNFTsByOwner(address) { + return this.get(`/irismod/nft/nfts?owner=${address}`) + } + async getTxs(hash, config = null) { const conf = config || this.getSelectedConfig() const ver = conf.sdk_version || '0.41' diff --git a/src/router/index.js b/src/router/index.js index 83f4f029..6087713f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -343,6 +343,20 @@ const router = new VueRouter({ ], }, }, + { + path: '/:chain/nft/:denom', + name: 'nftdenom', + component: () => import('@/views/NFTDenom.vue'), + meta: { + pageTitle: 'NFT', + breadcrumb: [ + { + text: 'NFT', + active: true, + }, + ], + }, + }, // custom modules for specified chains // 1. cosmos { diff --git a/src/views/NFTDenom.vue b/src/views/NFTDenom.vue new file mode 100644 index 00000000..44d8b4c4 --- /dev/null +++ b/src/views/NFTDenom.vue @@ -0,0 +1,83 @@ + + + + + + + + + Search + + + + + + + No NFT found! + + + + + diff --git a/src/views/WalletAccountDetail.vue b/src/views/WalletAccountDetail.vue index 490c2b7c..1354a9ad 100644 --- a/src/views/WalletAccountDetail.vue +++ b/src/views/WalletAccountDetail.vue @@ -253,6 +253,25 @@ + + + + + {{ data.item.denom_id }} + + + + {{ data.item.token_ids.join(',') }} + + + + - - + + + + + + Close + + +