Skip to content

Commit

Permalink
ALL-6219 - Added AVAX to l1 (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel authored May 20, 2024
1 parent 24ea903 commit fe95d9c
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [4.2.28] - 2024.5.20

### Added

- Support for Avalanche Notifications


## [4.2.27] - 2024.5.6

### Added
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": "@tatumio/tatum",
"version": "4.2.27",
"version": "4.2.28",
"description": "Tatum JS SDK",
"author": "Tatum",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
1 change: 1 addition & 0 deletions src/dto/AddressEventNotificationChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ export enum AddressEventNotificationChain {
FLR = 'FLR',
CRO = 'CRO',
BASE = 'BASE',
AVAX = 'AVAX',
}
20 changes: 20 additions & 0 deletions src/e2e/e2e.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const AddressEventNetworks = [
Network.CRONOS_TESTNET,
Network.BASE,
Network.BASE_SEPOLIA,
Network.AVALANCHE_C,
Network.AVALANCHE_C_TESTNET,
]

export const IncomingNativeTxNetworks = [
Expand Down Expand Up @@ -77,6 +79,8 @@ export const IncomingNativeTxNetworks = [
Network.CRONOS_TESTNET,
Network.BASE,
Network.BASE_SEPOLIA,
Network.AVALANCHE_C,
Network.AVALANCHE_C_TESTNET,
]

export const OutgoingNativeTxNetworks = [
Expand Down Expand Up @@ -112,6 +116,8 @@ export const OutgoingNativeTxNetworks = [
Network.CRONOS_TESTNET,
Network.BASE,
Network.BASE_SEPOLIA,
Network.AVALANCHE_C,
Network.AVALANCHE_C_TESTNET,
]

export const OutgoingFailedNetworks = [
Expand All @@ -135,6 +141,8 @@ export const OutgoingFailedNetworks = [
Network.CRONOS_TESTNET,
Network.BASE,
Network.BASE_SEPOLIA,
Network.AVALANCHE_C,
Network.AVALANCHE_C_TESTNET,
]

export const PaidFeeNetworks = [
Expand Down Expand Up @@ -162,6 +170,8 @@ export const PaidFeeNetworks = [
Network.CRONOS_TESTNET,
Network.BASE,
Network.BASE_SEPOLIA,
Network.AVALANCHE_C,
Network.AVALANCHE_C_TESTNET,
]

export const FungibleTxNetworks = [
Expand Down Expand Up @@ -189,6 +199,8 @@ export const FungibleTxNetworks = [
Network.CRONOS_TESTNET,
Network.BASE,
Network.BASE_SEPOLIA,
Network.AVALANCHE_C,
Network.AVALANCHE_C_TESTNET,
]

export const NftNetworks = [
Expand Down Expand Up @@ -216,6 +228,8 @@ export const NftNetworks = [
Network.CRONOS_TESTNET,
Network.BASE,
Network.BASE_SEPOLIA,
Network.AVALANCHE_C,
Network.AVALANCHE_C_TESTNET,
]

export const MultitokenNetworks = [
Expand All @@ -238,6 +252,8 @@ export const MultitokenNetworks = [
Network.CRONOS_TESTNET,
Network.BASE,
Network.BASE_SEPOLIA,
Network.AVALANCHE_C,
Network.AVALANCHE_C_TESTNET,
]

export const FailedTxPerBlockNetworks = [
Expand Down Expand Up @@ -265,6 +281,8 @@ export const FailedTxPerBlockNetworks = [
Network.CRONOS_TESTNET,
Network.BASE,
Network.BASE_SEPOLIA,
Network.AVALANCHE_C,
Network.AVALANCHE_C_TESTNET,
]

export const ContractAddressLogEventNetworks = [
Expand All @@ -285,6 +303,7 @@ export const ContractAddressLogEventNetworks = [
Network.FLARE_SONGBIRD,
Network.CRONOS,
Network.BASE,
Network.AVALANCHE_C,
]

export const InternalTxNetworks = [
Expand All @@ -300,4 +319,5 @@ export const InternalTxNetworks = [
Network.FLARE_SONGBIRD,
Network.CRONOS,
Network.BASE,
Network.AVALANCHE_C,
]
2 changes: 2 additions & 0 deletions src/e2e/e2e.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export const e2eUtil = {
case Network.CRONOS_TESTNET:
case Network.BASE:
case Network.BASE_SEPOLIA:
case Network.AVALANCHE_C:
case Network.AVALANCHE_C_TESTNET:
return '0xdb4C3b4350EE869F2D0a2F43ce0292865E2Aa149'
case Network.CELO_ALFAJORES:
return '0xdf083B077F1FD890fC71feCaBbd3F68F94cD21Bf'
Expand Down
2 changes: 1 addition & 1 deletion src/e2e/tatum.notification.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from './e2e.constant'
import { e2eUtil } from './e2e.util'

describe.skip('notification', () => {
describe('notification', () => {
describe('createSubscription', () => {
describe('IP auth', () => {
describe('Address Event', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/service/tatum/tatum.evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class FullEvm extends NotificationEvm {
export class ArbitrumNova extends BaseEvm {}
export class ArbitrumOne extends BaseEvm {}
export class Aurora extends BaseEvm {}
export class AvalancheC extends BaseEvm {}
export class AvalancheC extends NotificationEvm {}
export class Cronos extends NotificationEvm {}
export class EthereumClassic extends BaseEvm {}
export class Fantom extends BaseEvm {}
Expand Down
5 changes: 5 additions & 0 deletions src/util/util.shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ export const Utils = {
return Network.FLARE
case AddressEventNotificationChain.BASE:
return Network.BASE
case AddressEventNotificationChain.AVAX:
return Network.AVALANCHE_C
default:
throw new Error(`Chain ${chain} is not supported.`)
}
Expand Down Expand Up @@ -584,6 +586,9 @@ export const Utils = {
case Network.BASE:
case Network.BASE_SEPOLIA:
return AddressEventNotificationChain.BASE
case Network.AVALANCHE_C:
case Network.AVALANCHE_C_TESTNET:
return AddressEventNotificationChain.AVAX
default:
throw new Error(`Network ${network} is not supported.`)
}
Expand Down

0 comments on commit fe95d9c

Please sign in to comment.