Skip to content

Commit 53a9a64

Browse files
committed
feat(chains): add Core testnet and mainnet chains
1 parent c5f9921 commit 53a9a64

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

.changeset/afraid-rats-open.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": minor
3+
---
4+
5+
add core chains
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { defineChain } from "../utils.js";
2+
3+
/**
4+
* @chain
5+
*/
6+
export const coreMainnet = /* @__PURE__ */ defineChain({
7+
blockExplorers: [
8+
{
9+
name: "Core Scan",
10+
url: "https://scan.coredao.org/",
11+
},
12+
],
13+
id: 1116,
14+
name: "Core",
15+
nativeCurrency: {
16+
decimals: 18,
17+
name: "Ether",
18+
symbol: "ETH",
19+
},
20+
});
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { defineChain } from "../utils.js";
2+
3+
/**
4+
* @chain
5+
*/
6+
export const coreTestnet = /* @__PURE__ */ defineChain({
7+
blockExplorers: [
8+
{
9+
name: "Core Testnet Scan",
10+
url: "https://scan.test2.btcs.network/",
11+
},
12+
],
13+
id: 1114,
14+
name: "Core Testnet",
15+
nativeCurrency: {
16+
decimals: 18,
17+
name: "Ether",
18+
symbol: "ETH",
19+
},
20+
testnet: true,
21+
});

packages/thirdweb/src/exports/chains.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export { bsc } from "../chains/chain-definitions/bsc.js";
2424
export { bscTestnet } from "../chains/chain-definitions/bsc-testnet.js";
2525
export { celo } from "../chains/chain-definitions/celo.js";
2626
export { celoAlfajoresTestnet } from "../chains/chain-definitions/celo-alfajores-testnet.js";
27+
export { coreMainnet } from "../chains/chain-definitions/core-mainnet.js";
28+
export { coreTestnet } from "../chains/chain-definitions/core-testnet.js";
2729
export { cronos } from "../chains/chain-definitions/cronos.js";
2830
export { degen } from "../chains/chain-definitions/degen.js";
2931
// mainnet = alias for ethereum

0 commit comments

Comments
 (0)