@visualizevalue/mint-app-base 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,7 +15,11 @@ const loading = ref(true)
|
|
|
15
15
|
const load = async () => {
|
|
16
16
|
loading.value = true
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
try {
|
|
19
|
+
await store.fetchToken(collection.value.address, route.params.tokenId)
|
|
20
|
+
} catch (e) {
|
|
21
|
+
navigateTo({ name: 'id-collection' }, { replace: true })
|
|
22
|
+
}
|
|
19
23
|
|
|
20
24
|
loading.value = false
|
|
21
25
|
}
|
|
@@ -14,7 +14,11 @@ const collection = ref(null)
|
|
|
14
14
|
const load = async () => {
|
|
15
15
|
loading.value = true
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
try {
|
|
18
|
+
collection.value = await store.fetchCollection(address.value)
|
|
19
|
+
} catch (e) {
|
|
20
|
+
navigateTo({ name: 'id' }, { replace: true })
|
|
21
|
+
}
|
|
18
22
|
|
|
19
23
|
loading.value = false
|
|
20
24
|
}
|
|
@@ -126,7 +126,10 @@ const deployed = async (receipt) => {
|
|
|
126
126
|
|
|
127
127
|
const artist = store.artist(id.value)
|
|
128
128
|
await store.fetchCollections(id.value, config.public.factoryAddress, artist.collectionsFetchedUntilBlock)
|
|
129
|
-
await navigateTo(
|
|
129
|
+
await navigateTo({
|
|
130
|
+
name: 'id-collection',
|
|
131
|
+
params: { id: id.value, collection: createdEvent.args.contractAddress }
|
|
132
|
+
})
|
|
130
133
|
}
|
|
131
134
|
|
|
132
135
|
useMetaData({
|
package/app/plugins/2.wagmi.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VueQueryPlugin } from '@tanstack/vue-query'
|
|
2
|
-
import { http, cookieStorage, createConfig, createStorage, WagmiPlugin, fallback, type Config } from '@wagmi/vue'
|
|
2
|
+
import { http, cookieStorage, createConfig, createStorage, WagmiPlugin, fallback, type Config, type CreateConnectorFn } from '@wagmi/vue'
|
|
3
3
|
import { mainnet, sepolia, holesky, localhost } from '@wagmi/vue/chains'
|
|
4
4
|
import { coinbaseWallet, injected, metaMask, walletConnect } from '@wagmi/vue/connectors'
|
|
5
5
|
import type { CustomTransport, Transport } from 'viem'
|
|
@@ -7,6 +7,25 @@ import type { CustomTransport, Transport } from 'viem'
|
|
|
7
7
|
export default defineNuxtPlugin(nuxtApp => {
|
|
8
8
|
const title = nuxtApp.$config.public.title || 'Mint'
|
|
9
9
|
|
|
10
|
+
const connectors: CreateConnectorFn[] = [
|
|
11
|
+
injected(),
|
|
12
|
+
coinbaseWallet({
|
|
13
|
+
appName: title,
|
|
14
|
+
appLogoUrl: '',
|
|
15
|
+
}),
|
|
16
|
+
metaMask({
|
|
17
|
+
dappMetadata: {
|
|
18
|
+
name: title,
|
|
19
|
+
iconUrl: '',
|
|
20
|
+
url: '',
|
|
21
|
+
}
|
|
22
|
+
}),
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
if (nuxtApp.$config.public.walletConnectProjectId) connectors.push(walletConnect({
|
|
26
|
+
projectId: nuxtApp.$config.public.walletConnectProjectId,
|
|
27
|
+
}))
|
|
28
|
+
|
|
10
29
|
const transportDefinitions: CustomTransport|Transport[] = []
|
|
11
30
|
|
|
12
31
|
if (nuxtApp.$config.public.rpc1) transportDefinitions.push(http(nuxtApp.$config.public.rpc1 as string))
|
|
@@ -21,23 +40,7 @@ export default defineNuxtPlugin(nuxtApp => {
|
|
|
21
40
|
batch: {
|
|
22
41
|
multicall: true,
|
|
23
42
|
},
|
|
24
|
-
connectors
|
|
25
|
-
injected(),
|
|
26
|
-
walletConnect({
|
|
27
|
-
projectId: nuxtApp.$config.public.walletConnectProjectId,
|
|
28
|
-
}),
|
|
29
|
-
coinbaseWallet({
|
|
30
|
-
appName: title,
|
|
31
|
-
appLogoUrl: '',
|
|
32
|
-
}),
|
|
33
|
-
metaMask({
|
|
34
|
-
dappMetadata: {
|
|
35
|
-
name: title,
|
|
36
|
-
iconUrl: '',
|
|
37
|
-
url: '',
|
|
38
|
-
}
|
|
39
|
-
}),
|
|
40
|
-
],
|
|
43
|
+
connectors,
|
|
41
44
|
storage: createStorage({
|
|
42
45
|
storage: cookieStorage,
|
|
43
46
|
}),
|
package/nuxt.config.ts
CHANGED
|
@@ -12,15 +12,15 @@ export default defineNuxtConfig({
|
|
|
12
12
|
public: {
|
|
13
13
|
title: 'Mint',
|
|
14
14
|
description: 'To mint is a human right.',
|
|
15
|
-
blockExplorer: 'https://etherscan.io',
|
|
15
|
+
blockExplorer: 'https://sepolia.etherscan.io',
|
|
16
16
|
creatorAddress: '',
|
|
17
|
-
factoryAddress: '',
|
|
17
|
+
factoryAddress: '0x0Eb7fB145e697B7e82711BeEFff195F2d7b66cdd',
|
|
18
18
|
chainId: 1337,
|
|
19
19
|
walletConnectProjectId: '',
|
|
20
20
|
platformUrl: 'https://networked.art',
|
|
21
|
-
rpc1: '',
|
|
22
|
-
rpc2: '',
|
|
23
|
-
rpc3: '',
|
|
21
|
+
rpc1: 'https://ethereum-sepolia.rpc.subquery.network/public',
|
|
22
|
+
rpc2: 'https://ethereum-sepolia-rpc.publicnode.com',
|
|
23
|
+
rpc3: 'https://1rpc.io/sepolia',
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
|
package/package.json
CHANGED
package/app/pages/[id]/add.vue
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Authenticated>
|
|
3
|
-
<PageFrame :title="[
|
|
4
|
-
{
|
|
5
|
-
text: `Add existing`
|
|
6
|
-
}
|
|
7
|
-
]">
|
|
8
|
-
<form @submit.stop.prevent="add">
|
|
9
|
-
<FormInput v-model="address" placeholder="Contract Address (0x...)" />
|
|
10
|
-
|
|
11
|
-
<Button>Add</Button>
|
|
12
|
-
</form>
|
|
13
|
-
</PageFrame>
|
|
14
|
-
</Authenticated>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script setup>
|
|
18
|
-
const id = useArtistId()
|
|
19
|
-
|
|
20
|
-
const address = ref('')
|
|
21
|
-
|
|
22
|
-
const add = async () => {
|
|
23
|
-
if (! isAddress(address.value)) {
|
|
24
|
-
alert('Not an address')
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
await navigateTo(`/${id.value}/${address.value}`)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
useMetaData({
|
|
32
|
-
title: `Add Existing Collection`,
|
|
33
|
-
})
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<style scoped>
|
|
37
|
-
form {
|
|
38
|
-
width: 100%;
|
|
39
|
-
}
|
|
40
|
-
</style>
|