diff --git a/.changeset/light-apes-yawn.md b/.changeset/light-apes-yawn.md new file mode 100644 index 000000000..f039e2495 --- /dev/null +++ b/.changeset/light-apes-yawn.md @@ -0,0 +1,6 @@ +--- +'@reservoir0x/reservoir-sdk': patch +'@reservoir0x/reservoir-kit-ui': patch +--- + +adding berachain diff --git a/demo/pages/_app.tsx b/demo/pages/_app.tsx index 6efbd588d..1f06639a3 100644 --- a/demo/pages/_app.tsx +++ b/demo/pages/_app.tsx @@ -98,6 +98,7 @@ const chains = [ customChains.storyOdyssey, customChains.ink, customChains.abstract, + customChains.berachain, ] as [Chain, ...Chain[]] const wagmiConfig = getDefaultConfig({ diff --git a/demo/utils/chains.ts b/demo/utils/chains.ts index d314bc8e6..ec3c746fe 100644 --- a/demo/utils/chains.ts +++ b/demo/utils/chains.ts @@ -397,4 +397,7 @@ export default [ { ...reservoirChains.ink, }, + { + ...reservoirChains.berachain, + }, ] diff --git a/packages/sdk/src/utils/customChains.ts b/packages/sdk/src/utils/customChains.ts index e9fe41f98..95a46c7d0 100644 --- a/packages/sdk/src/utils/customChains.ts +++ b/packages/sdk/src/utils/customChains.ts @@ -1127,6 +1127,20 @@ export const ink = { }, } as const satisfies Chain +export const berachain = { + id: 80094, + name: 'Berachain', + nativeCurrency: { name: 'Bera', symbol: 'BERA', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://rpc.berachain.com'], + }, + public: { + http: ['https://rpc.berachain.com'], + }, + }, +} as const satisfies Chain + export const customChains = { ancient8, ancient8Testnet, @@ -1173,4 +1187,5 @@ export const customChains = { storyOdyssey, monadTestnet, ink, + berachain, } as const satisfies Record diff --git a/packages/sdk/src/utils/paymentTokens.ts b/packages/sdk/src/utils/paymentTokens.ts index 7a09af70f..6b06e2a99 100644 --- a/packages/sdk/src/utils/paymentTokens.ts +++ b/packages/sdk/src/utils/paymentTokens.ts @@ -1243,4 +1243,22 @@ export const chainPaymentTokensMap = { decimals: 18, }, ], + + // Berachain + 80094: [ + { + chainId: 80094, + address: zeroAddress, + symbol: 'BERA', + name: 'BERA', + decimals: 18, + }, + { + chainId: 80094, + address: '0x6969696969696969696969696969696969696969', + symbol: 'WBERA', + name: 'WBERA', + decimals: 18, + }, + ], } as Record diff --git a/packages/sdk/src/utils/reservoirChains.ts b/packages/sdk/src/utils/reservoirChains.ts index f1b2976a9..f7c451514 100644 --- a/packages/sdk/src/utils/reservoirChains.ts +++ b/packages/sdk/src/utils/reservoirChains.ts @@ -530,6 +530,14 @@ const ink = { checkPollingInterval: 1000, } satisfies ReservoirBaseChain +const berachain = { + id: 80094, + name: 'Berachain', + baseApiUrl: 'https://api-berachain.reservoir.tools', + paymentTokens: chainPaymentTokensMap[80094], + checkPollingInterval: 1000, +} satisfies ReservoirBaseChain + export const reservoirChains = { mainnet, polygon, @@ -596,4 +604,5 @@ export const reservoirChains = { storyOdyssey, monadTestnet, ink, + berachain, } diff --git a/packages/ui/src/constants/chainIcons.tsx b/packages/ui/src/constants/chainIcons.tsx index 03a0702c2..d1571d732 100644 --- a/packages/ui/src/constants/chainIcons.tsx +++ b/packages/ui/src/constants/chainIcons.tsx @@ -461,6 +461,11 @@ const chainIcons = { dark: , color: , }, + [reservoirChains.berachain.id]: { + light: , + dark: , + color: , + }, } export default chainIcons diff --git a/packages/ui/src/constants/wrappedContractNames.ts b/packages/ui/src/constants/wrappedContractNames.ts index 55a1788bc..2f179b0e5 100644 --- a/packages/ui/src/constants/wrappedContractNames.ts +++ b/packages/ui/src/constants/wrappedContractNames.ts @@ -64,5 +64,6 @@ const wrappedContractNames: Record = { 1868: 'WETH', // Soneium 1516: 'WIP', // Story Odyssey 57073: 'WETH', // Ink + 80094: 'WBERA', // Berachain } export default wrappedContractNames diff --git a/packages/ui/src/constants/wrappedContracts.ts b/packages/ui/src/constants/wrappedContracts.ts index 909a1ffcd..e1341a843 100644 --- a/packages/ui/src/constants/wrappedContracts.ts +++ b/packages/ui/src/constants/wrappedContracts.ts @@ -64,6 +64,7 @@ const wrappedContracts: Record = { 1868: '0x4200000000000000000000000000000000000006', // Soneium 1516: '0x1516000000000000000000000000000000000000', // Story Odyssey 57073: '0x4200000000000000000000000000000000000006', // Ink + 80094: '0x6969696969696969696969696969696969696969', // Berachain } export default wrappedContracts