Skip to content

Commit

Permalink
Add sapphire localnet
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Nov 5, 2024
1 parent 1e8724a commit 49facdc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/nextjs/scaffold.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const scaffoldConfig = {
viemNextVersionChains.sapphireTestnet,
viemNextVersionChains.emerald,
viemNextVersionChains.emeraldTestnet,
viemNextVersionChains.sapphireLocalnet,
],

// The interval at which your front-end polls the RPC servers for new data
Expand Down
4 changes: 4 additions & 0 deletions packages/nextjs/utils/scaffold-eth/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export const NETWORKS_EXTRA_DATA: Record<string, ChainAttributes> = {
color: ["#0500e2", "#00a9ff"],
icon: "/oasis.svg",
},
[viemNextVersionChains.sapphireLocalnet.id]: {
color: ["#0500e2", "#00a9ff"],
icon: "/oasis.svg",
},
[viemNextVersionChains.emerald.id]: {
color: ["#0500e2", "#00a9ff"],
icon: "/oasis.svg",
Expand Down
19 changes: 19 additions & 0 deletions packages/nextjs/viemNextVersionChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,25 @@ export const sapphireTestnet = /*#__PURE__*/ defineChain({
testnet: true,
});

export const sapphireLocalnet = /*#__PURE__*/ defineChain({
id: 23293,
name: "Oasis Sapphire Localnet",
network: "sapphire-localnet",
nativeCurrency: { name: "Sapphire Local Rose", symbol: "TEST", decimals: 18 },
rpcUrls: {
default: {
http: ["http://localhost:8545"],
},
},
blockExplorers: {
default: {
name: "Oasis Explorer",
url: "http://localhost:3000/testnet/sapphire",
},
},
testnet: true,
});

export const emerald = /*#__PURE__*/ defineChain({
id: 42262,
name: "Oasis Emerald",
Expand Down

0 comments on commit 49facdc

Please sign in to comment.