Skip to content

Commit

Permalink
ALL-10815 - add bera (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel authored Feb 27, 2025
1 parent cd89c1e commit 3f74cb6
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [4.2.50] - 2025.2.27

### Added

- Added berachain

## [4.2.49] - 2025.2.20

### Fix
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.49",
"version": "4.2.50",
"description": "Tatum JS SDK",
"author": "Tatum",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
1 change: 1 addition & 0 deletions src/dto/Currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export enum Currency {
RON = 'RON',
S = 'S',
KAIA = 'KAIA',
BERA = 'BERA',
}

export function networkToCurrency(network: Network): Currency {
Expand Down
6 changes: 6 additions & 0 deletions src/dto/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export enum Network {
RONIN = 'ronin-mainnet',
SONIC_MAINNET = 'sonic-mainnet',
KAIA_MAINNET = 'kaia-mainnet',
BERACHAIN_MAINNET = 'berachain-mainnet',

// Testnets
ALGORAND_ALGOD_TESTNET = 'algorand-testnet-algod',
Expand Down Expand Up @@ -455,6 +456,11 @@ export type NetworkMetadata = {
}

export const NETWORK_METADATA: Record<Network, NetworkMetadata> = {
[Network.BERACHAIN_MAINNET]: {
currency: Currency.BERA,
testnet: false,
defaultMainnet: true,
},
[Network.ETHEREUM_SEPOLIA]: {
currency: Currency.ETH,
testnet: true,
Expand Down
2 changes: 1 addition & 1 deletion src/e2e/rpc/evm/evm.rpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { EvmE2eUtils } from './evm.e2e.utils'

const testNetworks = [
{ network: Network.CELO },
{ network: Network.CELO_ALFAJORES },
// { network: Network.CELO_ALFAJORES },
// { network: Network.ARBITRUM_ONE },
{ network: Network.ARBITRUM_NOVA, apiKey: ApiKey.mainnet },
{
Expand Down
1 change: 1 addition & 0 deletions src/service/tatum/tatum.evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class XinFin extends BaseEvm {}
export class Ronin extends BaseEvm {}
export class Sonic extends BaseEvm {}
export class Kaia extends BaseEvm {}
export class Berachain extends BaseEvm {}
export class Base extends NotificationEvm {}
export class Flare extends NotificationEvm {}
export class Chiliz extends NotificationEvm {}
Expand Down
4 changes: 3 additions & 1 deletion src/util/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ export const Constant = {
[Network.KAIA_MAINNET]: 18,
[Network.KAIA_KAIROS]: 18,
[Network.SONIC_MAINNET]: 18,
[Network.SONIC_BLAZE]: 18
[Network.SONIC_BLAZE]: 18,
[Network.BERACHAIN_MAINNET]: 18
},
CURRENCY_NAMES: {
[Network.BITCOIN]: 'BTC',
Expand Down Expand Up @@ -254,6 +255,7 @@ export const Constant = {
[Network.KAIA_KAIROS]: 'KAIA',
[Network.SONIC_MAINNET]: 'SONIC',
[Network.SONIC_BLAZE]: 'SONIC',
[Network.BERACHAIN_MAINNET]: 'BERA',
},
RPC: {
MAINNETS: [
Expand Down
4 changes: 3 additions & 1 deletion src/util/util.shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import {
ArbitrumOne,
Aurora,
AvalancheC,
Base,
Base, Berachain,
BinanceSmartChain,
Bitcoin,
BitcoinCash,
Expand Down Expand Up @@ -893,6 +893,8 @@ export const Utils = {
case Network.KAIA_MAINNET:
case Network.KAIA_KAIROS:
return new Kaia(id) as T
case Network.BERACHAIN_MAINNET:
return new Berachain(id) as T
case Network.KADENA:
case Network.KADENA_TESTNET:
return new Kadena(id) as T
Expand Down

0 comments on commit 3f74cb6

Please sign in to comment.