diff --git a/.husky/pre-commit b/.husky/pre-commit index 8a79c3470..2665d0376 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -4,4 +4,4 @@ echo "\nRunning GIT hooks..." yarn cleanbuild yarn nx affected --target=lint -#yarn nx affected --target=test \ No newline at end of file +yarn nx affected --target=test \ No newline at end of file diff --git a/packages/examples/sdk-frontend-react/src/app/components/Connect.tsx b/packages/examples/sdk-frontend-react/src/app/components/Connect.tsx index 8797ccc99..2ef319591 100644 --- a/packages/examples/sdk-frontend-react/src/app/components/Connect.tsx +++ b/packages/examples/sdk-frontend-react/src/app/components/Connect.tsx @@ -22,11 +22,12 @@ const NETWORK_MAPPING: NwMappingType = { 421613: "ARBITRUM_TESTNET", 42161: "ARBITRUMONE_MAINNET", 122: "FUSE_MAINNET", - 123: "FUSE_TESTNET" + 123: "FUSE_TESTNET", + 80085: "BERACHAIN_TESTNET", }; const injected = new InjectedConnector({ - supportedChainIds: [1, 3, 4, 11155111, 42, 137, 80001, 56, 97, 10, 420, 1442, 1101, 421613, 42161, 122, 123], + supportedChainIds: [1, 3, 4, 11155111, 42, 137, 80001, 56, 97, 10, 420, 1442, 1101, 421613, 42161, 122, 123,80085], }) const ConnectWrapper = styled.div` diff --git a/packages/examples/sdk-frontend-react/src/app/helpers.ts b/packages/examples/sdk-frontend-react/src/app/helpers.ts index 1411c03f7..f8e89eb23 100644 --- a/packages/examples/sdk-frontend-react/src/app/helpers.ts +++ b/packages/examples/sdk-frontend-react/src/app/helpers.ts @@ -18,7 +18,7 @@ const Constants = { }, DEFAULT_CHAIN_ID: 11155111, DEV_CHAIN_ID: 99999, - NON_ETH_CHAINS: [137, 80001, 56, 97, 10, 420, 1442, 1101, 421613, 42161, 122, 123], + NON_ETH_CHAINS: [137, 80001, 56, 97, 10, 420, 1442, 1101, 421613, 42161, 122, 123,80085], ETH_CHAINS: [1, 11155111] }; diff --git a/packages/restapi/src/lib/config.ts b/packages/restapi/src/lib/config.ts index 76247b288..e8b89f2e2 100644 --- a/packages/restapi/src/lib/config.ts +++ b/packages/restapi/src/lib/config.ts @@ -18,8 +18,31 @@ import { fuse, fuseSparknet, } from 'viem/chains'; +import { defineChain } from 'viem'; const { ENV } = Constants; +const berachainTestnet = defineChain({ + id: 80085, + name: 'Berachain Artio', + network: 'berachain-testnet', + nativeCurrency: { + decimals: 18, + name: 'BERA Token', + symbol: 'BERA', + }, + rpcUrls: { + default: { http: ['https://artio.rpc.berachain.com'] }, + public: { http: ['https://artio.rpc.berachain.com'] }, + }, + blockExplorers: { + default: { + name: 'Berachain', + url: 'https://artio.beratrail.io', + }, + }, + testnet: true, +}); + // for methods not needing the entire config export const API_BASE_URL = { [ENV.PROD]: 'https://backend.epns.io/apis', @@ -47,6 +70,7 @@ const BLOCKCHAIN_NETWORK = { ARBITRUMONE_MAINNET: 'eip155:42161', FUSE_TESTNET: 'eip155:123', FUSE_MAINNET: 'eip155:122', + BERACHAIN_TESTNET: 'eip155:80085', }; export type ALIAS_CHAIN = @@ -55,7 +79,8 @@ export type ALIAS_CHAIN = | 'OPTIMISM' | 'POLYGONZKEVM' | 'ARBITRUMONE' - | 'FUSE'; + | 'FUSE' + | 'BERACHAIN'; export const ETH_CHAIN_ID = { [ENV.PROD]: 1, @@ -100,6 +125,11 @@ export const ALIAS_CHAIN_ID = { [ENV.DEV]: 123, [ENV.LOCAL]: 123, }, + BERACHAIN: { + [ENV.STAGING]: 80085, + [ENV.DEV]: 80085, + [ENV.LOCAL]: 80085, + }, }; export const CHAIN_ID = { @@ -129,6 +159,8 @@ export const CHAIN_NAME: { [key: number]: string } = { // fuse 122: 'FUSE', 123: 'FUSE', + // berachain + 80085: 'BERACHAIN', }; export interface ConfigType { API_BASE_URL: string; @@ -237,6 +269,10 @@ const CONFIG = { API_BASE_URL: API_BASE_URL[ENV.STAGING], EPNS_COMMUNICATOR_CONTRACT: '0xb3971BCef2D791bc4027BbfedFb47319A4AAaaAa', }, + [BLOCKCHAIN_NETWORK.BERACHAIN_TESTNET]: { + API_BASE_URL: API_BASE_URL[ENV.STAGING], + EPNS_COMMUNICATOR_CONTRACT: '0x7b9C405e261ba671f008c20D0321f62d08C140EC', + }, }, [ENV.DEV]: { [BLOCKCHAIN_NETWORK.ETH_SEPOLIA]: { @@ -267,6 +303,10 @@ const CONFIG = { API_BASE_URL: API_BASE_URL[ENV.DEV], EPNS_COMMUNICATOR_CONTRACT: '0x7eBb54D86CF928115965DB596a3E600404dD8039', }, + [BLOCKCHAIN_NETWORK.BERACHAIN_TESTNET]: { + API_BASE_URL: API_BASE_URL[ENV.DEV], + EPNS_COMMUNICATOR_CONTRACT: '0xA1DF3E68D085aa6918bcc2506b24e499830Db0eB', + }, }, [ENV.LOCAL]: { [BLOCKCHAIN_NETWORK.ETH_SEPOLIA]: { @@ -297,6 +337,10 @@ const CONFIG = { API_BASE_URL: API_BASE_URL[ENV.LOCAL], EPNS_COMMUNICATOR_CONTRACT: '0x7eBb54D86CF928115965DB596a3E600404dD8039', }, + [BLOCKCHAIN_NETWORK.BERACHAIN_TESTNET]: { + API_BASE_URL: API_BASE_URL[ENV.LOCAL], + EPNS_COMMUNICATOR_CONTRACT: '0xA1DF3E68D085aa6918bcc2506b24e499830Db0eB', + }, }, }; @@ -406,6 +450,11 @@ export const VIEM_CONFIG = { API_BASE_URL: API_BASE_URL[ENV.STAGING], EPNS_COMMUNICATOR_CONTRACT: '0xb3971BCef2D791bc4027BbfedFb47319A4AAaaAa', }, + [BLOCKCHAIN_NETWORK.BERACHAIN_TESTNET]: { + NETWORK: berachainTestnet, + API_BASE_URL: API_BASE_URL[ENV.STAGING], + EPNS_COMMUNICATOR_CONTRACT: '0x7b9C405e261ba671f008c20D0321f62d08C140EC', + }, }, [ENV.DEV]: { [BLOCKCHAIN_NETWORK.ETH_SEPOLIA]: { @@ -443,6 +492,11 @@ export const VIEM_CONFIG = { API_BASE_URL: API_BASE_URL[ENV.DEV], EPNS_COMMUNICATOR_CONTRACT: '0x7eBb54D86CF928115965DB596a3E600404dD8039', }, + [BLOCKCHAIN_NETWORK.BERACHAIN_TESTNET]: { + NETWORK: berachainTestnet, + API_BASE_URL: API_BASE_URL[ENV.DEV], + EPNS_COMMUNICATOR_CONTRACT: '0xA1DF3E68D085aa6918bcc2506b24e499830Db0eB', + }, }, [ENV.LOCAL]: { [BLOCKCHAIN_NETWORK.ETH_SEPOLIA]: { @@ -480,10 +534,14 @@ export const VIEM_CONFIG = { API_BASE_URL: API_BASE_URL[ENV.LOCAL], EPNS_COMMUNICATOR_CONTRACT: '0x7eBb54D86CF928115965DB596a3E600404dD8039', }, + [BLOCKCHAIN_NETWORK.BERACHAIN_TESTNET]: { + NETWORK: berachainTestnet, + API_BASE_URL: API_BASE_URL[ENV.LOCAL], + EPNS_COMMUNICATOR_CONTRACT: '0xA1DF3E68D085aa6918bcc2506b24e499830Db0eB', + }, }, }; - export const ALPHA_FEATURE_CONFIG = { STABLE: { feature: [] as string[], diff --git a/packages/restapi/src/lib/constants.ts b/packages/restapi/src/lib/constants.ts index ebc43caf8..2738c420f 100644 --- a/packages/restapi/src/lib/constants.ts +++ b/packages/restapi/src/lib/constants.ts @@ -65,7 +65,9 @@ const Constants = { }, DEFAULT_CHAIN_ID: 11155111, DEV_CHAIN_ID: 99999, - NON_ETH_CHAINS: [137, 80001, 56, 97, 10, 420, 1442, 1101, 421613, 42161, 122, 123], + NON_ETH_CHAINS: [ + 137, 80001, 56, 97, 10, 420, 1442, 1101, 421613, 42161, 122, 123, 80085, + ], ETH_CHAINS: [1, 11155111], ENC_TYPE_V1: 'x25519-xsalsa20-poly1305', ENC_TYPE_V2: 'aes256GcmHkdfSha256', diff --git a/packages/restapi/src/lib/payloads/constants.ts b/packages/restapi/src/lib/payloads/constants.ts index acc6aad27..83c977007 100644 --- a/packages/restapi/src/lib/payloads/constants.ts +++ b/packages/restapi/src/lib/payloads/constants.ts @@ -16,7 +16,8 @@ export const CHAIN_ID_TO_SOURCE: ChainIdToSourceType = { 421613: "ARBITRUM_TESTNET", 42161: "ARBITRUMONE_MAINNET", 122: "FUSE_MAINNET", - 123: "FUSE_TESTNET" + 123: "FUSE_TESTNET", + 80085: "BERACHAIN_TESTNET" }; export const SOURCE_TYPES = { @@ -34,6 +35,7 @@ export const SOURCE_TYPES = { ARBITRUMONE_MAINNET: "ARBITRUMONE_MAINNET", FUSE_TESTNET:"FUSE_TESTNET", FUSE_MAINNET:"FUSE_MAINNET", + BERACHAIN_TESTNET: "BERACHAIN_TESTNET", THE_GRAPH: 'THE_GRAPH', PUSH_VIDEO: 'PUSH_VIDEO', SIMULATE: 'SIMULATE' diff --git a/packages/restapi/src/lib/payloads/helpers.ts b/packages/restapi/src/lib/payloads/helpers.ts index 98bebd020..4724aaca7 100644 --- a/packages/restapi/src/lib/payloads/helpers.ts +++ b/packages/restapi/src/lib/payloads/helpers.ts @@ -195,7 +195,7 @@ export async function getVerificationProof({ wallet, pgpPrivateKey, env, - rules + rules, }: { senderType: 0 | 1; signer: any; @@ -212,7 +212,7 @@ export async function getVerificationProof({ wallet?: walletType; pgpPrivateKey?: string; env?: ENV; - rules?:VideoNotificationRules; + rules?: VideoNotificationRules; }) { let message = null; let verificationProof = null; @@ -328,7 +328,10 @@ export function getSource( export function getCAIPFormat(chainId: number, address: string) { // EVM based chains if ( - [1, 11155111, 42, 137, 80001, 56, 97, 10, 420, 1442, 1101, 421613, 42161, 122, 123].includes(chainId) + [ + 1, 11155111, 42, 137, 80001, 56, 97, 10, 420, 1442, 1101, 421613, 42161, + 122, 123, 80085, + ].includes(chainId) ) { return `eip155:${chainId}:${address}`; } diff --git a/packages/restapi/tests/.env.sample b/packages/restapi/tests/.env.sample index 7f97b7f13..440b64226 100644 --- a/packages/restapi/tests/.env.sample +++ b/packages/restapi/tests/.env.sample @@ -3,6 +3,9 @@ # ENVIRONMENT | 'STAGING' or 'PROD' or 'DEV' ENV=env_name +## CHANNEL WITH ALIAS +BERACHAIN_CHANNEL_PRIVATE_KEY= + WALLET_PRIVATE_KEY=your_wallet_private_key WALLET_PRIVATE_KEY_2=your_wallet_private_key_2 WALLET_RECIPIENT_PK=your_wallet_recipient_pk diff --git a/packages/restapi/tests/lib/alias/berachain.test.ts b/packages/restapi/tests/lib/alias/berachain.test.ts new file mode 100644 index 000000000..9fb816d67 --- /dev/null +++ b/packages/restapi/tests/lib/alias/berachain.test.ts @@ -0,0 +1,86 @@ +import * as path from 'path'; +import * as dotenv from 'dotenv'; +dotenv.config({ path: path.resolve(__dirname, '../../.env') }); +import * as PUSH_CHANNELS from '../../../src/lib/channels'; +import { expect } from 'chai'; +import { ethers } from 'ethers'; +import { PushAPI, user } from '../../../src'; +import { ENV } from '../../../src/lib/constants'; + +describe('ALIAS functionality', () => { + let userAlice: PushAPI; + let userBob: PushAPI; + let account: string; + let account2: string; + before(async () => { + const provider = new ethers.providers.JsonRpcProvider( + 'https://artio.rpc.berachain.com' // berachain artio Provider + ); + const signer = new ethers.Wallet( + `0x${process.env['BERACHAIN_CHANNEL_PRIVATE_KEY']}`, + provider + ); + account = signer.address; + userAlice = await PushAPI.initialize(signer, { + env: ENV.DEV, + }); + + const signer2 = new ethers.Wallet(ethers.Wallet.createRandom().privateKey); + account2 = signer2.address; + userBob = await PushAPI.initialize(signer2, { env: ENV.DEV }); + }); + + it.skip('Should be able to create channel', async () => { + const channelInfo = await userAlice.channel.info(); + if (channelInfo) return; // skip if already exists + const res = await userAlice.channel.create({ + name: 'SDK Alias Test', + description: 'Testing using sdk', + url: 'https://push.org', + icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAz0lEQVR4AcXBsU0EQQyG0e+saWJ7oACiKYDMEZVs6GgSpC2BIhzRwAS0sgk9HKn3gpFOAv3v3V4/3+4U4Z1q5KTy42Ql940qvFONnFSGmCFmiN2+fj7uCBlihpgh1ngwcvKfwjuVIWaIGWKNB+GdauSk8uNkJfeNKryzYogZYoZY40m5b/wlQ8wQM8TayMlKeKcaOVkJ71QjJyuGmCFmiDUe+HFy4VyEd57hx0mV+0ZliBlihlgL71w4FyMnVXhnZeSkiu93qheuDDFDzBD7BcCyMAOfy204AAAAAElFTkSuQmCC', + alias: `eip155:80085:${account}`, + progressHook: (progress: any) => console.log(progress), + }); + console.log(res); + }); + + it('Should be able to send notifications', async () => { + await userAlice.channel.send(['*'], { + notification: { + title: 'hi', + body: 'test-broadcast', + }, + payload: { + title: 'testing broadcast notification', + body: 'testing with random body', + cta: 'https://google.com/', + embed: 'https://avatars.githubusercontent.com/u/64157541?s=200&v=4', + }, + channel: `eip155:80085:${account}`, + }); + }); + + it('Should be able to add delegatee', async () => { + await userAlice.channel.delegate.add(account2); + }); + + it('Should be able to send notifications from delegate', async () => { + await userBob.channel.send(['*'], { + notification: { + title: 'hi', + body: 'test-broadcast', + }, + payload: { + title: 'testing broadcast notification', + body: 'testing with random body', + cta: 'https://google.com/', + embed: 'https://avatars.githubusercontent.com/u/64157541?s=200&v=4', + }, + channel: `eip155:80085:${account}`, + }); + }); + + it('Should be able to remove delegatee', async () => { + await userAlice.channel.delegate.remove(account2); + }); +}); diff --git a/packages/uiweb/README.md b/packages/uiweb/README.md index a6e8ddda4..13c496fe5 100644 --- a/packages/uiweb/README.md +++ b/packages/uiweb/README.md @@ -149,7 +149,7 @@ where | cta | string | Call To Action Link (given during notification creation) | | image | string | Any media link (given during notification creation) | | url | string | Channel Link (given during channel setup) | -| chainName | string | Can be anyone of the following blockchain networks on which the notification was sent - "ETH_MAINNET", "ETH_TEST_SEPOLIA", "POLYGON_MAINNET", "POLYGON_TEST_MUMBAI", "BSC_MAINNET, "BSC_TESTNET", "OPTIMISM_MAINNET", "OPTIMISM_TESTNET", "POLYGON_ZK_EVM_TESTNET", "POLYGON_ZK_EVM_MAINNET", "ARBITRUM_TESTNET", "ARBITRUMONE_MAINNET", "FUSE_TESTNET", "FUSE_MAINNET", "THE_GRAPH" | +| chainName | string | Can be anyone of the following blockchain networks on which the notification was sent - "ETH_MAINNET", "ETH_TEST_SEPOLIA", "POLYGON_MAINNET", "POLYGON_TEST_MUMBAI", "BSC_MAINNET, "BSC_TESTNET", "OPTIMISM_MAINNET", "OPTIMISM_TESTNET", "POLYGON_ZK_EVM_TESTNET", "POLYGON_ZK_EVM_MAINNET", "ARBITRUM_TESTNET", "ARBITRUMONE_MAINNET", "FUSE_TESTNET", "FUSE_MAINNET", "BERACHIAN_TESTNET", "THE_GRAPH" | | theme | string | 'light' or 'dark' (customization to be given by the dApp) | | customTheme | INotificationItemTheme | custom theme object for the component | | isSpam | boolean | whether a spam notification or not | diff --git a/packages/uiweb/src/lib/components/chat/CreateGroup/AddCriteria.tsx b/packages/uiweb/src/lib/components/chat/CreateGroup/AddCriteria.tsx index 0f2eceb52..1d83af289 100644 --- a/packages/uiweb/src/lib/components/chat/CreateGroup/AddCriteria.tsx +++ b/packages/uiweb/src/lib/components/chat/CreateGroup/AddCriteria.tsx @@ -13,17 +13,19 @@ import { } from '../reusables'; import { Section, Span, Spinner } from '../../reusables'; import useMediaQuery from '../../../hooks/useMediaQuery'; -import { ModalHeaderProps } from './CreateGroupModal'; +import { ModalHeaderProps } from './CreateGroupModal'; import { useChatData } from '../../../hooks'; import { QuantityInput } from '../reusables/QuantityInput'; import { ThemeContext } from '../theme/ThemeProvider'; import { Checkbox } from '../reusables/Checkbox'; import OptionButtons from '../reusables/OptionButtons'; - +import BerachainSvg from '../../../icons/berachain.svg'; import EthereumSvg from '../../../icons/ethereum.svg'; import PolygonSvg from '../../../icons/polygon.svg'; import ArbitrumSvg from '../../../icons/arbitrum.svg'; import BSCSvg from '../../../icons/bsc.svg'; +import FuseSvg from '../../../icons/fuse.svg'; + import OptimismSvg from '../../../icons/optimisim.svg'; import { BLOCKCHAIN_NETWORK, device } from '../../../config'; import { GUILD_COMPARISON_OPTIONS, INVITE_CHECKBOX_LABEL } from '../constants'; @@ -57,7 +59,7 @@ import { } from '../helpers'; import { IChatTheme } from '../exportedTypes'; -const AddCriteria = ({ +const AddCriteria = ({ handlePrevious, onClose, criteriaStateManager, @@ -207,7 +209,8 @@ const AddCriteria = ({ const dropdownChainsValues: Array = [ { id: 0, - value: BLOCKCHAIN_NETWORK[env as keyof typeof BLOCKCHAIN_NETWORK].ETHEREUM, + value: + BLOCKCHAIN_NETWORK[env as keyof typeof BLOCKCHAIN_NETWORK].ETHEREUM, title: 'Ethereum', icon: EthereumSvg, function: () => setSelectedChainValue(0), @@ -228,18 +231,34 @@ const AddCriteria = ({ }, { id: 3, - value: BLOCKCHAIN_NETWORK[env as keyof typeof BLOCKCHAIN_NETWORK].OPTIMISM, + value: + BLOCKCHAIN_NETWORK[env as keyof typeof BLOCKCHAIN_NETWORK].OPTIMISM, title: 'Optimism', icon: OptimismSvg, function: () => setSelectedChainValue(3), }, { id: 4, - value: BLOCKCHAIN_NETWORK[env as keyof typeof BLOCKCHAIN_NETWORK].ARBITRUM, + value: + BLOCKCHAIN_NETWORK[env as keyof typeof BLOCKCHAIN_NETWORK].ARBITRUM, title: 'Arbitrum', icon: ArbitrumSvg, function: () => setSelectedChainValue(4), }, + { + id: 5, + value: BLOCKCHAIN_NETWORK[env].FUSE, + title: 'Fuse', + icon: FuseSvg, + function: () => setSelectedChainValue(5), + }, + { + id: 6, + value: BLOCKCHAIN_NETWORK[env].BERACHAIN, + title: 'Berachain', + icon: BerachainSvg, + function: () => setSelectedChainValue(46), + }, ]; const onQuantityChange = (e: any) => { @@ -416,7 +435,7 @@ const AddCriteria = ({ gap="12px" overflow="hidden scroll" justifyContent="start" - padding='0 2px 0 10px' + padding="0 2px 0 10px" width={isMobile ? '300px' : '400px'} >
@@ -440,7 +459,7 @@ const AddCriteria = ({ justifyContent="space-between" alignItems="center" > -
+
{Array.isArray( getCategoryDropdownValues({ dropdownCategoryValues, @@ -630,7 +649,7 @@ const AddCriteria = ({
{ @@ -662,7 +681,10 @@ const AddCriteria = ({ (criteriaState.isUpdateCriteriaEnabled() ? 'Update' : 'Add')} {validationLoading && } - + ); }; @@ -687,4 +709,4 @@ const ScrollSection = styled(Section)<{ theme: IChatTheme }>` &::-webkit-scrollbar { width: 4px; } -`; \ No newline at end of file +`; diff --git a/packages/uiweb/src/lib/components/chat/constants/chainDetails.tsx b/packages/uiweb/src/lib/components/chat/constants/chainDetails.tsx index 168d7aaff..eb9baeaa0 100644 --- a/packages/uiweb/src/lib/components/chat/constants/chainDetails.tsx +++ b/packages/uiweb/src/lib/components/chat/constants/chainDetails.tsx @@ -9,6 +9,7 @@ import { PolygonzkevmSvg } from "../../../icons/PolygonzkevmSvg"; import { ArbitrumSvg } from "../../../icons/ArbitrumSvg" import { FuseSvg } from "../../../icons/FuseSvg" import React from "react"; +import { BerachainSVG } from "../../../icons/BerachainSVG"; const createSVGIcon = (element:any, chainName: string) => { return ( @@ -75,5 +76,9 @@ export const NETWORK_ICON_DETAILS = { 122 : { label: 'FUSE MAINNET', icon: createSVGIcon(, 'Fuse Mainnet'), - } + }, + 80085 : { + label: 'BERACHAIN TESTNET', + icon: createSVGIcon(, 'Berachain Testnet'), + }, }; diff --git a/packages/uiweb/src/lib/components/notification/chainDetails.tsx b/packages/uiweb/src/lib/components/notification/chainDetails.tsx index 7dc4452cc..f4a3ebf6b 100644 --- a/packages/uiweb/src/lib/components/notification/chainDetails.tsx +++ b/packages/uiweb/src/lib/components/notification/chainDetails.tsx @@ -8,6 +8,7 @@ import { PolygonzkevmSvg } from '../../icons/PolygonzkevmSvg'; import { TheGraphSvg } from '../../icons/TheGraphSvg'; import { ArbitrumSvg } from '../../icons/ArbitrumSvg'; import { FuseSvg } from '../../icons/FuseSvg'; +import { BerachainSVG } from '../../icons/BerachainSVG'; const createSVGIcon = (element: any, chainName: string) => { return ( {element} @@ -78,4 +79,8 @@ export default { label: 'THE GRAPH', icon: createSVGIcon(, 'The Graph'), }, + BERACHAIN_TESTNET: { + label: 'BERACHAIN TESTNET', + icon: createSVGIcon(, 'Berachain Testnet'), + }, }; diff --git a/packages/uiweb/src/lib/components/notification/index.tsx b/packages/uiweb/src/lib/components/notification/index.tsx index 4a0aa631f..7db49a5fa 100644 --- a/packages/uiweb/src/lib/components/notification/index.tsx +++ b/packages/uiweb/src/lib/components/notification/index.tsx @@ -39,6 +39,7 @@ export type chainNameType = | 'FUSE_TESTNET' | 'FUSE_MAINNET' | 'THE_GRAPH' + | 'BERACHAIN_TESTNET' | undefined; export type NotificationItemProps = { diff --git a/packages/uiweb/src/lib/config/constants.ts b/packages/uiweb/src/lib/config/constants.ts index 620d73da4..38cdcdf58 100644 --- a/packages/uiweb/src/lib/config/constants.ts +++ b/packages/uiweb/src/lib/config/constants.ts @@ -33,6 +33,7 @@ export const NETWORK_DETAILS = { }, 97: {}, 420: {}, + 80085: {} }; //todo: need to change o sepolia @@ -58,7 +59,8 @@ const TESTNET_NETWORK = { OPTIMISM: 'eip155:420', POLYGON_ZK_EVM: 'eip155:1442', ARBITRUM:'eip155:421613', - FUSE: 'eip155:123' + FUSE: 'eip155:123', + BERACHAIN: 'eip155:80085' }; const MAINET_NETWORK = { ETHEREUM: 'eip155:1', @@ -67,7 +69,8 @@ const MAINET_NETWORK = { OPTIMISM: 'eip155:10', POLYGON_ZK_EVM: 'eip155:1101', ARBITRUM:'eip155:42161', - FUSE: 'eip155:122' + FUSE: 'eip155:122', + BERACHAIN: 'eip155:80085' }; export const BLOCKCHAIN_NETWORK = { @@ -84,7 +87,8 @@ export const allowedNetworks = { 56, // for bnb mainnet 10, // for optimism mainnet 42161, // for arbitrum mainnet - 122 // for fuse mainnet + 122, // for fuse mainnet + 80085 // while berachain dont have a mainnet ], dev: [ 11155111, // for eth sepolia @@ -92,7 +96,8 @@ export const allowedNetworks = { 97, // bnb testnet 420, // optimism goerli testnet 421613, // for arbitrum testnet - 123 // for fuse testnet + 123, // for fuse testnet + 80085 // for Berachainn Testnet ], staging: [ // 42, //for kovan @@ -101,7 +106,8 @@ export const allowedNetworks = { 97, // bnb testnet 420, // optimism goerli testnet 421613, // for arbitrum testnet - 123 // for fuse testnet + 123, // for fuse testnet + 80085 // for berachain testnet ], local: [ 11155111, // for eth sepolia @@ -109,7 +115,8 @@ export const allowedNetworks = { 97, // bnb testnet 420, // optimism goerli testnet 421613, // for arbitrum testnet - 123 // for fuse testnet + 123, // for fuse testnet + 80085 // for berachain testnet ] } diff --git a/packages/uiweb/src/lib/icons/BerachainSVG.tsx b/packages/uiweb/src/lib/icons/BerachainSVG.tsx new file mode 100644 index 000000000..76b5e5fbc --- /dev/null +++ b/packages/uiweb/src/lib/icons/BerachainSVG.tsx @@ -0,0 +1,981 @@ +import React from "react"; + +export const BerachainSVG = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); + + diff --git a/packages/uiweb/src/lib/icons/berachain.svg b/packages/uiweb/src/lib/icons/berachain.svg new file mode 100644 index 000000000..c400941e1 --- /dev/null +++ b/packages/uiweb/src/lib/icons/berachain.svg @@ -0,0 +1,975 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file