-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
281 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<script lang="ts"> | ||
import type { NetworkType } from "@kredeum/common/src/common/types"; | ||
import { networks } from "@kredeum/common/src/common/networks"; | ||
import HomeLayout from "@kredeum/svelte/src/components/Global/HomeLayout.svelte"; | ||
import Navigation from "@kredeum/svelte/src/components/Global/Navigation.svelte"; | ||
import { resolverGetCollectionsAddresses } from "@kredeum/common/src/resolver/resolver-get-collection"; | ||
import { explorerCollectionUrl, getShortAddress } from "@kredeum/common/src/common/config"; | ||
/////////////////////////////////////// | ||
// <StatsNetwork {chainId} /> | ||
/////////////////////////////////////// | ||
export let chainId: number; | ||
/////////////////////////////////////// | ||
</script> | ||
|
||
<HomeLayout> | ||
<span slot="nav"> | ||
<Navigation back="/stats" /> | ||
</span> | ||
|
||
<span slot="header"> | ||
<h1>Kredeum NFTs Factory - Statistics {networks.getChainLabel(chainId).toUpperCase()}</h1> | ||
</span> | ||
|
||
<span slot="content"> | ||
<h1> | ||
{chainId} | ||
</h1> | ||
|
||
{#await resolverGetCollectionsAddresses(chainId)} | ||
... | ||
{:then collections} | ||
{#each collections as collection} | ||
<div> | ||
<a href={explorerCollectionUrl(chainId, collection)} target="_blank">{collection}</a> | ||
</div> | ||
{/each} | ||
{:catch} | ||
--- | ||
{/await} | ||
</span> | ||
</HomeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<script lang="ts"> | ||
import type { NetworkType } from "@kredeum/common/src/common/types"; | ||
import { resolverGetExplorerUrl, resolverGetAddress } from "@kredeum/common/src/resolver/resolver-get"; | ||
import { factoryGetExplorerUrl, factoryGetAddress } from "@kredeum/common/src/common/factory-get"; | ||
import { | ||
getShortAddress, | ||
getAddressOpenNFTsTemplate, | ||
getAddressOpenAutoMarket, | ||
explorerContractUrl | ||
} from "@kredeum/common/src/common/config"; | ||
import { resolverCountCollections } from "@kredeum/common/src/resolver/resolver-get-collection"; | ||
import { networks } from "@kredeum/common/src/common/networks"; | ||
import { statsUpdate } from "../stores/statsCounts"; | ||
/////////////////////////////////////// | ||
// <Addresses networks={networks} /> | ||
/////////////////////////////////////// | ||
export let chainId: number; | ||
/////////////////////////////////////// | ||
const countCollections = async (chainId: number): Promise<number | undefined> => { | ||
const count = await resolverCountCollections(chainId); | ||
if (count !== undefined) statsUpdate(chainId, count); | ||
console.log("countCollections:", chainId, count); | ||
return count; | ||
}; | ||
</script> | ||
|
||
{#if chainId} | ||
<tr> | ||
<td>{chainId}</td> | ||
<td><a href="/stats/{chainId}">{networks.getChainName(chainId)}</a></td> | ||
<td> | ||
{#await countCollections(chainId)} | ||
... | ||
{:then value} | ||
{value} | ||
{:catch} | ||
--- | ||
{/await} | ||
</td> | ||
|
||
<td class="addr"> | ||
<a href={factoryGetExplorerUrl(chainId)} target="_blank"> | ||
{getShortAddress(factoryGetAddress(chainId))} | ||
</a> | ||
</td> | ||
<td class="addr"> | ||
<a href={resolverGetExplorerUrl(chainId)} target="_blank"> | ||
{getShortAddress(resolverGetAddress(chainId))} | ||
</a> | ||
</td> | ||
<td class="addr"> | ||
<a href={explorerContractUrl(chainId, getAddressOpenNFTsTemplate(chainId))} target="_blank"> | ||
{getShortAddress(getAddressOpenNFTsTemplate(chainId))} | ||
</a> | ||
</td> | ||
<td class="addr"> | ||
<a href={explorerContractUrl(chainId, getAddressOpenAutoMarket(chainId))} target="_blank"> | ||
{getShortAddress(getAddressOpenAutoMarket(chainId))} | ||
</a> | ||
</td> | ||
</tr> | ||
{/if} | ||
|
||
<style> | ||
tr:hover { | ||
background-color: #f5f5f5; | ||
} | ||
td { | ||
padding: 8px; | ||
text-align: right; | ||
border-bottom: 1px solid #ddd; | ||
width: 180px; | ||
} | ||
.addr { | ||
font-family: "Courier New", monospace; | ||
} | ||
.addr a { | ||
color: #007bff; | ||
text-decoration: none; | ||
transition: color 0.2s; | ||
} | ||
.addr a:hover { | ||
color: #0056b3; | ||
text-decoration: underline; | ||
} | ||
.addr { | ||
font-family: "Courier New", monospace; | ||
} | ||
.addr a { | ||
color: #007bff; | ||
text-decoration: none; | ||
transition: color 0.2s; | ||
} | ||
.addr a:hover { | ||
color: #0056b3; | ||
text-decoration: underline; | ||
} | ||
</style> |
Oops, something went wrong.