Skip to content

Commit

Permalink
MATIC_AMOY support (#412)
Browse files Browse the repository at this point in the history
* MATIC_AMOY support
  • Loading branch information
andrewkw1122 authored Mar 7, 2024
1 parent 2593cff commit 761d184
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Major Changes

- Added support for Polygon Amoy network via the `Network.MATIC_AMOY` enum.

### Minor Changes

## 3.1.2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The SDK leverages Alchemy's hardened node infrastructure, guaranteeing best-in-c
The SDK currently supports the following chains:

- **Ethereum**: Mainnet, Goerli, Sepolia
- **Polygon**: Mainnet, Mumbai
- **Polygon**: Mainnet, Mumbai, Amoy
- **Optimism**: Mainnet, Goerli, Kovan, Sepolia
- **Arbitrum**: Mainnet, Goerli, Rinkeby, Sepolia
- **Astar**: Mainnet
Expand Down
1 change: 1 addition & 0 deletions src/api/notify-namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ const WEBHOOK_NETWORK_TO_NETWORK: { [key: string]: Network } = {
ETH_SEPOLIA: Network.ETH_SEPOLIA,
MATIC_MAINNET: Network.MATIC_MAINNET,
MATIC_MUMBAI: Network.MATIC_MUMBAI,
MATIC_AMOY: Network.MATIC_AMOY,
ARB_MAINNET: Network.ARB_MAINNET,
ARB_GOERLI: Network.ARB_GOERLI,
OPT_MAINNET: Network.OPT_MAINNET,
Expand Down
1 change: 1 addition & 0 deletions src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export enum Network {
ARB_SEPOLIA = 'arb-sepolia',
MATIC_MAINNET = 'polygon-mainnet',
MATIC_MUMBAI = 'polygon-mumbai',
MATIC_AMOY = 'polygon-amoy',
ASTAR_MAINNET = 'astar-mainnet',
POLYGONZKEVM_MAINNET = 'polygonzkevm-mainnet',
POLYGONZKEVM_TESTNET = 'polygonzkevm-testnet',
Expand Down
5 changes: 5 additions & 0 deletions src/util/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const EthersNetwork = {
[Network.ARB_SEPOLIA]: 'arbitrum-sepolia',
[Network.MATIC_MAINNET]: 'matic',
[Network.MATIC_MUMBAI]: 'maticmum',
[Network.MATIC_AMOY]: 'maticamoy',
[Network.ASTAR_MAINNET]: 'astar-mainnet',
[Network.POLYGONZKEVM_MAINNET]: 'polygonzkevm-mainnet',
[Network.POLYGONZKEVM_TESTNET]: 'polygonzkevm-testnet',
Expand Down Expand Up @@ -104,6 +105,10 @@ export const CustomNetworks: { [key: string]: NetworkFromEthers } = {
'base-sepolia': {
chainId: 84532,
name: 'base-sepolia'
},
maticamoy: {
chainId: 80002,
name: 'maticamoy'
}
};

Expand Down

0 comments on commit 761d184

Please sign in to comment.