Skip to content

Commit

Permalink
feat: Add Worldchain (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyjones authored Oct 18, 2024
1 parent c4440cb commit f3a3010
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

### Minor Changes

## 3.4.4

### Minor Changes

- Added networks for `WORLDCHAIN`.

## 3.4.3

### Minor Changes
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The SDK currently supports the following chains (chains with '(d)' after are dep
- **OpBNB**: Mainnet, Testnet
**Berachain**: Bartio
**Soneium**: Minato
**Worldchain**: Mainnet, Sepolia

You can find per-method documentation of the Alchemy SDK endpoints at the [Alchemy Docs linked in the sidebar](https://docs.alchemy.com/reference/alchemy-sdk-quickstart).

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alchemy-sdk",
"version": "3.4.3",
"version": "3.4.4",
"description": "Extended Ethers.js SDK for Alchemy APIs",
"author": "Alchemy",
"license": "MIT",
Expand Down
4 changes: 3 additions & 1 deletion src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ export enum Network {
OPBNB_MAINNET = 'opbnb-mainnet',
OPBNB_TESTNET = 'opbnb-testnet',
BERACHAIN_BARTIO = 'berachain-bartio',
SONEIUM_MINATO = 'soneium-minato'
SONEIUM_MINATO = 'soneium-minato',
WORLDCHAIN_MAINNET = 'worldchain-mainnet',
WORLDCHAIN_SEPOLIA = 'worldchain-sepolia'
}

/** Token Types for the `getTokenBalances()` endpoint. */
Expand Down
12 changes: 11 additions & 1 deletion src/util/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ export const EthersNetwork = {
[Network.OPBNB_MAINNET]: 'opbnb-mainnet',
[Network.OPBNB_TESTNET]: 'opbnb-testnet',
[Network.BERACHAIN_BARTIO]: 'berachain-bartio',
[Network.SONEIUM_MINATO]: 'soneium-minato'
[Network.SONEIUM_MINATO]: 'soneium-minato',
[Network.WORLDCHAIN_MAINNET]: 'worldchain-mainnet',
[Network.WORLDCHAIN_SEPOLIA]: 'worldchain-sepolia'
};

/**
Expand Down Expand Up @@ -264,6 +266,14 @@ export const CustomNetworks: { [key: string]: NetworkFromEthers } = {
'soneium-minato': {
chainId: 0x79a,
name: 'soneium-minato'
},
'worldchain-mainnet': {
chainId: 0x1e0,
name: 'worldchain-mainnet'
},
'worldchain-sepolia': {
chainId: 0x12c1,
name: 'worldchain-sepolia'
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by injectVersion.js. Any changes will be
// overwritten on commit!
export const VERSION = '3.4.3';
export const VERSION = '3.4.4';

0 comments on commit f3a3010

Please sign in to comment.