Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kit 191 4 hours get the upstream solana explorer working manually #3

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
b2c7910
feat: set clusters using explorer.config.ts while still keeping uniqu…
kespinola Jul 23, 2024
2e32a9c
chore: swap theme to zuma
kespinola Jul 25, 2024
457d465
Merge pull request #1 from abk-labs/explorer-config
kespinola Jul 25, 2024
748a6f1
chore: change zumanet cluster
kespinola Jul 28, 2024
838259b
Handle division by zero in percentage function
FarinM Aug 3, 2024
5c9c536
Merge pull request #2 from FarinM/fix-division-by-zero
kespinola Aug 3, 2024
f99560d
Add anchor details to instruction card on tx inspector (#341)
brittcyr Aug 6, 2024
1e4125d
Fix anchor program usage in Inspector (#358)
ngundotra Aug 6, 2024
5235404
Fix writable badge color for ix cards (#359)
ngundotra Aug 6, 2024
4defa12
Add Finternet program on devnet (#363)
dhruvsol Aug 26, 2024
832ef85
Add support for showing self-cpi (#364)
ngundotra Aug 26, 2024
bb50fc9
added finternet program ids mainnet (#365)
dhruvsol Aug 27, 2024
7a9c150
fix: add logo support for PYUSD & USDP (#347)
catalinred Aug 28, 2024
e54adfb
Fix T22 Metadata Loadinng (#366)
ngundotra Aug 29, 2024
04376fd
Add fix for viewing stake accounts due to rpc method changes (#367)
ngundotra Aug 29, 2024
3e4713b
ANS Support (#368)
ngundotra Aug 29, 2024
8229ee3
Add ORE program (#360)
HardhatChad Aug 30, 2024
8e2c735
Add verified builds support (#371)
ngundotra Sep 10, 2024
61083ea
Add support for anchor 0.30.1 (#374)
ngundotra Sep 11, 2024
4cefa8b
Prune unused anchor types so layouts can be constructed from legacy I…
ngundotra Sep 13, 2024
af5130d
Create .env.example
ngundotra Sep 14, 2024
b46e0e4
Update README.md
ngundotra Sep 14, 2024
253496f
Add squads program auth integration (#379)
ngundotra Oct 1, 2024
7a5b9c8
IDL Fixes (#384)
ngundotra Oct 9, 2024
a358543
Add token state back to token account sections (#387)
ngundotra Oct 10, 2024
8e4589e
Added ZK Compression program names (#389)
KoenRijpstra Oct 15, 2024
7a1ba29
Stop parsing idls from program binaries when loading anchor programs …
ngundotra Oct 16, 2024
341465e
Address icon consistency (#398)
catalinred Oct 29, 2024
d5568ef
Fix conversion of legacy idl seeds (#399)
ngundotra Oct 29, 2024
c10c8ff
Add verify command to verified build tab (#396)
Woody4618 Oct 30, 2024
58019ed
nit: add warning of ping api issues (#401)
pkxro Nov 10, 2024
44cd9d9
Revert "nit: add warning of ping api issues" (#405)
ngundotra Nov 11, 2024
b9af433
Add source code url and fix --commit-hash bug (#406)
Woody4618 Nov 14, 2024
b00cc9a
Add warning label for ping data (#410)
ngundotra Nov 16, 2024
eb206db
Add support for new compute budget instruction (#411)
ngundotra Nov 18, 2024
4ad54dd
fix verification badge
ngundotra Nov 19, 2024
d3ef00b
nit: temporarily pull verified build info until API registry permissi…
ngundotra Nov 20, 2024
8a6f977
Use validators.app info for mainnet ping chart (#414)
ngundotra Nov 20, 2024
1abc54f
Cache ping data (#417)
ngundotra Nov 20, 2024
a39fbe9
Remove ping info (#418)
ngundotra Nov 22, 2024
c8b8d7b
Flag web3.js hacker accounts (#424)
ngundotra Dec 4, 2024
5a320b2
add: react scan for refresh watching (#420)
pkxro Dec 17, 2024
4f11244
Only show Trusted Verified Build information (#426)
ngundotra Dec 19, 2024
f9a7787
add instructions to install dependencies before running pnpm dev (#427)
gitteri Dec 20, 2024
9c350e5
Fix verified builds pda loading (#428)
ngundotra Dec 20, 2024
96704a8
Add commit hash to Verified Build repo url when available from PDA (#…
ngundotra Dec 20, 2024
130544c
Merge branch 'master' of https://github.com/solana-labs/explorer into…
monological Dec 19, 2024
8e18c17
Merge remote-tracking branch 'upstream/master' into kit-191-4-hours-g…
monological Dec 20, 2024
bb0728f
Use SolanaCluster enums instead of Cluster enums for program deployme…
monological Dec 20, 2024
5e56864
Create a Viewport object separately from Metadata
monological Dec 20, 2024
c9a3cd5
Use the cluster URI string directly for RPC creation.
monological Dec 20, 2024
115a5a7
Point cluster uri to localhost on port 8899 by default
monological Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Fill these out with a custom RPC url to test the explorer locally without getting rate-limited
NEXT_PUBLIC_MAINNET_RPC_URL=
NEXT_PUBLIC_DEVNET_RPC_URL=
NEXT_PUBLIC_TESTNET_RPC_URL=
48 changes: 48 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//@ts-check

// https://pnpm.io/pnpmfile
// https://github.com/pnpm/pnpm/issues/4214
// https://github.com/pnpm/pnpm/issues/5391

const rootPkg = require('./package.json');

console.log (`Checking for package peerDependency overrides`);

const remapPeerDependencies = [
{ package: '@solana-program/compute-budget', packageVersion: '0.6.1', peerDependency: '@solana/web3.js', newVersion: '2.0.0' },
];

function overridesPeerDependencies(pkg) {
if (pkg.peerDependencies) {
remapPeerDependencies.map(dep => {
if (pkg.name === dep.package && pkg.version.startsWith(dep.packageVersion)) {
console.log(` - Checking ${pkg.name}@${pkg.version}`); // , pkg.peerDependencies);

if (dep.peerDependency in pkg.peerDependencies) {
try {
console.log(` - Overriding ${pkg.name}@${pkg.version} peerDependency ${dep.peerDependency}@${pkg.peerDependencies[dep.peerDependency]}`);

// First add a new dependency to the package and then remove the peer dependency.
// This approach has the added advantage that scoped overrides should now work, too.
pkg.dependencies[dep.peerDependency] = dep.newVersion;
delete pkg.peerDependencies[dep.peerDependency];

console.log(` - Overrode ${pkg.name}@${pkg.version} peerDependency ${dep.peerDependency}@${pkg.dependencies[dep.peerDependency]}`);
} catch (err) {
console.error(err);
}
}
}
});
}
}

module.exports = {
hooks: {
readPackage(pkg, _context) {
// skipDeps(pkg);
overridesPeerDependencies(pkg);
return pkg;
},
},
};
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,39 @@

## Development

Contributing to the Explorer requires `pnpm` version `9.10.0`.
Once you have this version of `pnpm`, you can continue with the following steps.


- Copy `.env.example` into `.env` & fill out the fields with custom RPC urls \
from a Solana RPC provider. You should not use `https://api.mainnet-beta.solana.com` \
or `https://api.devnet.solana.com` or else you will get rate-limited. These are public \
endpoints not suitable for application development. You must set these URLs with \
endpoints from your own provider.

- `pnpm i` \
Installs all project dependencies using pnpm package manager. This will create a \
`node_modules` directory and install all packages specified in `package.json`, \
including both dependencies and devDependencies.

- `pnpm dev` \
Runs the app in the development mode. \
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. \
\
The page will reload if you make edits. \
You will also see any lint errors in the console.

- `pnpm test` \
- (Optional) `pnpm test` \
Launches the test runner in the interactive watch mode.<br />

## Troubleshooting

Still can't run the explorer with `pnpm dev`?
Seeing sass dependency errors?
Make sure you have `pnpm` version `9.10.0`, `git stash` your changes, then blow reset to master with `rm -rf node_modules && git reset --hard HEAD`.
Now running `pnpm i` followed by `pnpm dev` should work. If it is working, don't forget to reapply your changes with `git stash pop`.


# Disclaimer

All claims, content, designs, algorithms, estimates, roadmaps,
Expand Down
4 changes: 2 additions & 2 deletions app/address/[address]/anchor-account/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type Props = Readonly<{

export async function generateMetadata(props: AddressPageMetadataProps): Promise<Metadata> {
return {
description: `Contents of the Anchor Account at address ${props.params.address} on Solana`,
title: `Anchor Account Data | ${await getReadableTitleFromAddress(props)} | Solana`,
description: `Contents of the Anchor Account at address ${props.params.address}`,
title: `Anchor Account Data | ${await getReadableTitleFromAddress(props)} | Zuma`,
};
}

Expand Down
4 changes: 2 additions & 2 deletions app/address/[address]/anchor-program/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ type Props = Readonly<{

export async function generateMetadata(props: AddressPageMetadataProps): Promise<Metadata> {
return {
description: `The Interface Definition Language (IDL) file for the Anchor program at address ${props.params.address} on Solana`,
title: `Anchor Program IDL | ${await getReadableTitleFromAddress(props)} | Solana`,
description: `The Interface Definition Language (IDL) file for the Anchor program at address ${props.params.address}`,
title: `Anchor Program IDL | ${await getReadableTitleFromAddress(props)} | Zuma`,
};
}

Expand Down
4 changes: 2 additions & 2 deletions app/address/[address]/attributes/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type Props = Readonly<{

export async function generateMetadata(props: AddressPageMetadataProps): Promise<Metadata> {
return {
description: `Attributes of the Metaplex NFT with address ${props.params.address} on Solana`,
title: `Metaplex NFT Attributes | ${await getReadableTitleFromAddress(props)} | Solana`,
description: `Attributes of the Metaplex NFT with address ${props.params.address}`,
title: `Metaplex NFT Attributes | ${await getReadableTitleFromAddress(props)} | Zuma`,
};
}

Expand Down
4 changes: 2 additions & 2 deletions app/address/[address]/blockhashes/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ type Props = Readonly<{
}>;

export const metadata = {
description: `Recent blockhashes on Solana`,
title: `Recent Blockhashes | Solana`,
description: `Recent blockhashes`,
title: `Recent Blockhashes | Zuma`,
};

export default function RecentBlockhashesPage(props: Props) {
Expand Down
4 changes: 2 additions & 2 deletions app/address/[address]/compression/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type Props = Readonly<{

export async function generateMetadata(props: AddressPageMetadataProps): Promise<Metadata> {
return {
description: `Information about the Compressed NFT with address ${props.params.address} on Solana`,
title: `Compression Information | ${await getReadableTitleFromAddress(props)} | Solana`,
description: `Information about the Compressed NFT with address ${props.params.address}`,
title: `Compression Information | ${await getReadableTitleFromAddress(props)} | Zuma`,
};
}

Expand Down
4 changes: 2 additions & 2 deletions app/address/[address]/concurrent-merkle-tree/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type Props = Readonly<{

export async function generateMetadata(props: AddressPageMetadataProps): Promise<Metadata> {
return {
description: `Contents of the SPL Concurrent Merkle Tree at address ${props.params.address} on Solana`,
title: `Concurrent Merkle Tree | ${await getReadableTitleFromAddress(props)} | Solana`,
description: `Contents of the SPL Concurrent Merkle Tree at address ${props.params.address}`,
title: `Concurrent Merkle Tree | ${await getReadableTitleFromAddress(props)} | Zuma`,
};
}

Expand Down
4 changes: 2 additions & 2 deletions app/address/[address]/domains/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ type Props = Readonly<{

export async function generateMetadata(props: AddressPageMetadataProps): Promise<Metadata> {
return {
description: `Domain names owned by the address ${props.params.address} on Solana`,
title: `Domains | ${await getReadableTitleFromAddress(props)} | Solana`,
description: `Domain names owned by the address ${props.params.address}`,
title: `Domains | ${await getReadableTitleFromAddress(props)} | Zuma`,
};
}

Expand Down
4 changes: 2 additions & 2 deletions app/address/[address]/entries/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type Props = Readonly<{

export async function generateMetadata(props: AddressPageMetadataProps): Promise<Metadata> {
return {
description: `Entries of the address lookup table at ${props.params.address} on Solana`,
title: `Address Lookup Table Entries | ${await getReadableTitleFromAddress(props)} | Solana`,
description: `Entries of the address lookup table at ${props.params.address}`,
title: `Address Lookup Table Entries | ${await getReadableTitleFromAddress(props)} | Zuma`,
};
}

Expand Down
4 changes: 2 additions & 2 deletions app/address/[address]/instructions/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ type Props = Readonly<{

export async function generateMetadata(props: AddressPageMetadataProps): Promise<Metadata> {
return {
description: `A list of transactions that include an instruction involving the token with address ${props.params.address} on Solana`,
title: `Token Instructions | ${await getReadableTitleFromAddress(props)} | Solana`,
description: `A list of transactions that include an instruction involving the token with address ${props.params.address}`,
title: `Token Instructions | ${await getReadableTitleFromAddress(props)} | Zuma`,
};
}

Expand Down
Loading