-
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
12 changed files
with
113 additions
and
68 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
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 |
---|---|---|
@@ -1,21 +1,99 @@ | ||
<script lang="ts"> | ||
import addressesAll from "../../../../contracts/addresses.json"; | ||
import { resolverGetExplorerUrl, resolverGetAddress } from "@kredeum/common/src/resolver/resolver-get"; | ||
import { factoryGetExplorerUrl, factoryGetAddress } from "@kredeum/common/src/common/factory-get"; | ||
import { networks } from "@kredeum/common/src/common/networks"; | ||
import { | ||
getShortAddress, | ||
getAddressOpenNFTsTemplate, | ||
getAddressOpenAutoMarket, | ||
explorerContractUrl | ||
} from "@kredeum/common/src/common/config"; | ||
type Addresses = { | ||
chainName: string; | ||
OpenNFTsResolver?: string; | ||
}; | ||
console.log("addressesAll:", addressesAll); | ||
const addressesMap = new Map(Object.entries(addressesAll)); | ||
console.log("addressesMap:", addressesMap); | ||
</script> | ||
|
||
<h1>Stats</h1> | ||
|
||
<ul> | ||
{#each addressesMap as [chainId, addresses]} | ||
<li>#{chainId} {addresses.chainName} {"OpenNFTsResolver" in addresses ? addresses.OpenNFTsResolver : ""}</li> | ||
<li>#{chainId} {addresses.chainName} {(addresses as Addresses).OpenNFTsResolver ?? ""}</li> | ||
{/each} | ||
</ul> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Chain ID</th> | ||
<th>Chain Name</th> | ||
<th>Collections<br />Count</th> | ||
<th>OpenNFTs<br />Resolver</th> | ||
<th>OpenNFTs<br />Factory</th> | ||
<th>OpenNFTsV4<br />Template</th> | ||
<th>OpenAutoMarket<br />Template</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{#each networks.getAllSameType(1) as network} | ||
<tr> | ||
<td>{network.chainId}</td> | ||
<td>{network.chainName}</td> | ||
<td>000</td> | ||
|
||
<td class="addr"> | ||
<a href={resolverGetExplorerUrl(network.chainId)} target="_blank"> | ||
{getShortAddress(resolverGetAddress(network.chainId))} | ||
</a> | ||
</td> | ||
<td class="addr"> | ||
<a href={factoryGetExplorerUrl(network.chainId)} target="_blank"> | ||
{getShortAddress(factoryGetAddress(network.chainId))} | ||
</a> | ||
</td> | ||
<td class="addr"> | ||
<a href={explorerContractUrl(network.chainId, getAddressOpenNFTsTemplate(network.chainId))} target="_blank"> | ||
{getShortAddress(getAddressOpenNFTsTemplate(network.chainId))} | ||
</a> | ||
</td> | ||
<td class="addr"> | ||
<a href={explorerContractUrl(network.chainId, getAddressOpenAutoMarket(network.chainId))} target="_blank"> | ||
{getShortAddress(getAddressOpenAutoMarket(network.chainId))} | ||
</a> | ||
</td> | ||
</tr> | ||
{/each} | ||
</tbody> | ||
</table> | ||
|
||
<style> | ||
table { | ||
border-collapse: collapse; | ||
margin-left: 20px; | ||
} | ||
th, | ||
td { | ||
padding: 8px; | ||
text-align: right; | ||
border-bottom: 1px solid #ddd; | ||
} | ||
th { | ||
background-color: #f2f2f2; | ||
} | ||
tr:hover { | ||
background-color: #f5f5f5; | ||
} | ||
.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> |