Skip to content

Commit 3c7a834

Browse files
sraturiryanio
andauthored
Add sei mainnet and testnet chain (#1513)
* Add sei testnet chain * Add sei testnet chain * add sei mainnet * add sei mainnet * Update src/types.ts Co-authored-by: Ryan Ghods <[email protected]> * lint --------- Co-authored-by: Ryan Ghods <[email protected]>
1 parent eda9245 commit 3c7a834

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opensea-js",
3-
"version": "7.1.10",
3+
"version": "7.1.11",
44
"description": "TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data",
55
"license": "MIT",
66
"author": "OpenSea Developers",

src/types.ts

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ export enum Chain {
123123
Solana = "solana",
124124
/** Zora */
125125
Zora = "zora",
126+
/** Sei */
127+
Sei = "sei",
126128

127129
// Testnet Chains
128130
// ⚠️NOTE: When adding to this list, also add to the util function `isTestChain`
@@ -148,6 +150,8 @@ export enum Chain {
148150
SolanaDevnet = "soldev",
149151
/** Zora Sepolia */
150152
ZoraSepolia = "zora_sepolia",
153+
/** Sei Testnet */
154+
SeiTestnet = "sei_testnet",
151155
}
152156

153157
/**

src/utils/utils.ts

+9
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ export const getChainId = (chain: Chain) => {
212212
return "7777777";
213213
case Chain.ZoraSepolia:
214214
return "999999999";
215+
case Chain.Sei:
216+
return "1329";
217+
case Chain.SeiTestnet:
218+
return "1328";
215219
default:
216220
throw new Error(`Unknown chainId for ${chain}`);
217221
}
@@ -257,6 +261,10 @@ export const getWETHAddress = (chain: Chain) => {
257261
case Chain.Zora:
258262
case Chain.ZoraSepolia:
259263
return "0x4200000000000000000000000000000000000006";
264+
case Chain.Sei:
265+
return "0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7";
266+
case Chain.SeiTestnet:
267+
return "0x3921ea6cf927be80211bb57f19830700285b0ada";
260268
default:
261269
throw new Error(`Unknown WETH address for ${chain}`);
262270
}
@@ -321,6 +329,7 @@ export const isTestChain = (chain: Chain): boolean => {
321329
case Chain.OptimismSepolia:
322330
case Chain.SolanaDevnet:
323331
case Chain.ZoraSepolia:
332+
case Chain.SeiTestnet:
324333
return true;
325334
default:
326335
return false;

0 commit comments

Comments
 (0)