mirror of
https://github.com/Instadapp/smart-lookup.git
synced 2024-07-29 22:38:20 +00:00
wip0
This commit is contained in:
parent
b0206a516b
commit
09087a50e8
23
app.vue
23
app.vue
|
|
@ -2,9 +2,26 @@
|
||||||
<Html class="h-full bg-gray-50">
|
<Html class="h-full bg-gray-50">
|
||||||
<Body class="h-full" />
|
<Body class="h-full" />
|
||||||
</Html>
|
</Html>
|
||||||
<div class="min-h-full flex flex-col items-center justify-center py-12 sm:px-6 lg:px-8">
|
<div
|
||||||
<NuxtPage />
|
class="min-h-full flex flex-col items-center justify-center py-12 sm:px-6 lg:px-8"
|
||||||
|
>
|
||||||
|
<NuxtLink to="/" class="mt-5 text-center text-3xl font-extrabold text-gray-900">
|
||||||
|
Smart Lookup
|
||||||
|
</NuxtLink>
|
||||||
|
|
||||||
<div class="mt-3">Made with ❤️ by <a href="https://instadapp.io" class="hover:underline font-medium" target="_blank" rel="noopener noreferrer">Instadapp</a></div>
|
<div class="w-full mt-5">
|
||||||
|
<NuxtPage />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-5">
|
||||||
|
Made with ❤️ by
|
||||||
|
<a
|
||||||
|
href="https://instadapp.io"
|
||||||
|
class="hover:underline font-medium"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>Instadapp</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,15 @@ const networks = {
|
||||||
arbitrum: "https://rpc.ankr.com/arbitrum",
|
arbitrum: "https://rpc.ankr.com/arbitrum",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const networkScanBaseUrl = {
|
||||||
|
mainnet: "https://etherscan.io/",
|
||||||
|
polygon: "https://polygonscan.com/",
|
||||||
|
avalanche: "https://snowtrace.io/",
|
||||||
|
fantom: "https://ftmscan.com/",
|
||||||
|
optimism: "https://optimistic.etherscan.io/",
|
||||||
|
arbitrum: "https://arbiscan.io/",
|
||||||
|
};
|
||||||
|
|
||||||
const networkProviderMap = Object.keys(networks).reduce((acc, curr) => {
|
const networkProviderMap = Object.keys(networks).reduce((acc, curr) => {
|
||||||
acc[curr] = new ethers.providers.JsonRpcProvider(networks[curr]);
|
acc[curr] = new ethers.providers.JsonRpcProvider(networks[curr]);
|
||||||
return acc;
|
return acc;
|
||||||
|
|
@ -241,7 +250,7 @@ onMounted(async () => {
|
||||||
<template>
|
<template>
|
||||||
<div class="sm:mx-auto sm:w-full sm:max-w-xl">
|
<div class="sm:mx-auto sm:w-full sm:max-w-xl">
|
||||||
<div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
|
<div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
|
||||||
<div class="flex flex-col items-center">
|
<div v-if="address" class="flex flex-col items-center">
|
||||||
<QrcodeVue
|
<QrcodeVue
|
||||||
:size="196"
|
:size="196"
|
||||||
:value="address"
|
:value="address"
|
||||||
|
|
@ -260,12 +269,15 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="mt-3 w-full px-20" v-if="detectedNetworks.length">
|
<div class="mt-3 w-full px-20" v-if="detectedNetworks.length">
|
||||||
<div class="text-center flex flex-wrap justify-center gap-2">
|
<div class="text-center flex flex-wrap justify-center gap-2">
|
||||||
<div
|
<a
|
||||||
v-for="network in detectedNetworks"
|
v-for="network in detectedNetworks"
|
||||||
class="capitalize bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm shadow-sm"
|
class="capitalize bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm shadow-sm"
|
||||||
|
:href="`${networkScanBaseUrl[network]}address/${address}`"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
{{ network }}
|
{{ network }}
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -366,6 +378,10 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-else class="flex items-center justify-center py-10">
|
||||||
|
<RefreshIcon class="w-10 h-10 animate-spin text-gray-600" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,9 @@ const lookup = () => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="sm:mx-auto sm:w-full sm:max-w-xl">
|
<div class="sm:mx-auto sm:w-full sm:max-w-xl">
|
||||||
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
|
|
||||||
Smart Lookup
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="mt-6 bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10 flex items-center gap-4"
|
class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10 flex items-center gap-4"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
v-model="address"
|
v-model="address"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user