Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cyber connect integration #1281

Merged
merged 2 commits into from
May 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: added cyber connect chain
akp111 committed May 15, 2024
commit bf7be5f2b283d0c3ceaa89ab8b8100787d5f2aab
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@

echo "\nRunning GIT hooks..."
yarn cleanbuild
yarn nx affected --target=lint
yarn nx affected --target=test
# yarn nx affected --target=lint
# yarn nx affected --target=test
Original file line number Diff line number Diff line change
@@ -24,12 +24,14 @@ const NETWORK_MAPPING: NwMappingType = {
122: 'FUSE_MAINNET',
123: 'FUSE_TESTNET',
80085: 'BERACHAIN_TESTNET',
111557560: 'CYBER_CONNECT_TESTNET',
7560: 'CYBER_CONNECT_MAINNET'
};

const injected = new InjectedConnector({
supportedChainIds: [
1, 3, 4, 11155111, 42, 137, 80002, 56, 97, 10, 11155420, 2442, 1101, 421614,
42161, 122, 123, 80085,
42161, 122, 123, 80085, 111557560, 7560
],
});

2 changes: 1 addition & 1 deletion packages/examples/sdk-frontend-react/src/app/helpers.ts
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ const Constants = {
DEV_CHAIN_ID: 99999,
NON_ETH_CHAINS: [
137, 80002, 56, 97, 10, 11155420, 2442, 1101, 421614, 42161, 122, 123,
80085,
80085, 111557560, 7560
],
ETH_CHAINS: [1, 11155111],
};
119 changes: 50 additions & 69 deletions packages/restapi/src/lib/config.ts
Original file line number Diff line number Diff line change
@@ -16,75 +16,8 @@ import {
fuse,
fuseSparknet,
} from 'viem/chains';
import { defineChain } from 'viem';
import { berachainTestnet, polygonAmoy, polygonZkEvmCordona, cyberConnectMainnet, cyberConnectTestnet } from './customChains';

const polygonZkEvmCordona = defineChain({
id: 2442,
name: 'Polygon zkEVM Cardona Testnet',
network: 'polygon-zkevm-testnet',
nativeCurrency: {
decimals: 18,
name: 'ETH',
symbol: 'ETH',
},
rpcUrls: {
default: { http: ['https://rpc.cardona.zkevm-rpc.com/'] },
public: { http: ['https://rpc.cardona.zkevm-rpc.com/'] },
},
blockExplorers: {
default: {
name: 'Polygon zkEVM Cardona',
url: ' https://cardona-zkevm.polygonscan.com/',
},
},
testnet: true,
})

const polygonAmoy = defineChain({
id: 80002,
name: 'Polygon Amoy Testnet',
network: 'polygon-amoy',
nativeCurrency: {
decimals: 18,
name: 'MATIC',
symbol: 'MATIC',
},
rpcUrls: {
default: { http: ['https://rpc-amoy.polygon.technology/'] },
public: { http: ['https://rpc-amoy.polygon.technology/'] },
},
blockExplorers: {
default: {
name: 'Polygon Amoy',
url: 'https://www.oklink.com/amoy',
},
},
testnet: true,
});



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 = {
@@ -114,6 +47,8 @@ const BLOCKCHAIN_NETWORK = {
FUSE_TESTNET: 'eip155:123',
FUSE_MAINNET: 'eip155:122',
BERACHAIN_TESTNET: 'eip155:80085',
CYBER_CONNECT_TESTNET: 'eip155:111557560',
CYBER_CONNECT_MAINNET: 'eip155:7560'
};

export type ALIAS_CHAIN =
@@ -123,7 +58,8 @@ export type ALIAS_CHAIN =
| 'POLYGONZKEVM'
| 'ARBITRUMONE'
| 'FUSE'
| 'BERACHAIN';
| 'BERACHAIN'
| 'CYBERCONNECT';

export const ETH_CHAIN_ID = {
[ENV.PROD]: 1,
@@ -176,6 +112,12 @@ export const ALIAS_CHAIN_ID: {
[ENV.DEV]: 80085,
[ENV.LOCAL]: 80085,
},
CYBERCONNECT: {
[ENV.PROD]: 7560,
[ENV.STAGING]: 111557560,
[ENV.DEV]: 111557560,
[ENV.LOCAL]: 111557560,
}
};

export const CHAIN_ID = {
@@ -207,6 +149,9 @@ export const CHAIN_NAME: { [key: number]: string } = {
123: 'FUSE',
// berachain
80085: 'BERACHAIN',
// cyberconnect
7560: 'CYBER_CONNECT_MAINNET',
111557560: 'CYBER_CONNECT_TESTNET'
};
export interface ConfigType {
API_BASE_URL: string;
@@ -284,6 +229,10 @@ const CONFIG = {
[BLOCKCHAIN_NETWORK.FUSE_MAINNET]: {
API_BASE_URL: API_BASE_URL[ENV.PROD],
EPNS_COMMUNICATOR_CONTRACT: '0xb3971BCef2D791bc4027BbfedFb47319A4AAaaAa',
},
[BLOCKCHAIN_NETWORK.CYBER_CONNECT_MAINNET]: {
API_BASE_URL: API_BASE_URL[ENV.PROD],
EPNS_COMMUNICATOR_CONTRACT: '0xbf895df410b7fcbe093973600950ba392f7e1d8e',
},
},
[ENV.STAGING]: {
@@ -319,6 +268,10 @@ const CONFIG = {
API_BASE_URL: API_BASE_URL[ENV.STAGING],
EPNS_COMMUNICATOR_CONTRACT: '0x7b9C405e261ba671f008c20D0321f62d08C140EC',
},
[BLOCKCHAIN_NETWORK.CYBER_CONNECT_TESTNET]: {
API_BASE_URL: API_BASE_URL[ENV.STAGING],
EPNS_COMMUNICATOR_CONTRACT: '0x6e489B7af21cEb969f49A90E481274966ce9D74d',
},
},
[ENV.DEV]: {
[BLOCKCHAIN_NETWORK.ETH_SEPOLIA]: {
@@ -353,6 +306,10 @@ const CONFIG = {
API_BASE_URL: API_BASE_URL[ENV.DEV],
EPNS_COMMUNICATOR_CONTRACT: '0xA1DF3E68D085aa6918bcc2506b24e499830Db0eB',
},
[BLOCKCHAIN_NETWORK.CYBER_CONNECT_TESTNET]: {
API_BASE_URL: API_BASE_URL[ENV.DEV],
EPNS_COMMUNICATOR_CONTRACT: '0x9cb3bd7550B5c92baA056Fc0F08132f49508145F',
},
},
[ENV.LOCAL]: {
[BLOCKCHAIN_NETWORK.ETH_SEPOLIA]: {
@@ -387,6 +344,10 @@ const CONFIG = {
API_BASE_URL: API_BASE_URL[ENV.LOCAL],
EPNS_COMMUNICATOR_CONTRACT: '0xA1DF3E68D085aa6918bcc2506b24e499830Db0eB',
},
[BLOCKCHAIN_NETWORK.CYBER_CONNECT_TESTNET]: {
API_BASE_URL: API_BASE_URL[ENV.DEV],
EPNS_COMMUNICATOR_CONTRACT: '0x9cb3bd7550B5c92baA056Fc0F08132f49508145F',
},
},
};

@@ -459,6 +420,11 @@ export const VIEM_CONFIG = {
API_BASE_URL: API_BASE_URL[ENV.PROD],
EPNS_COMMUNICATOR_CONTRACT: '0xb3971BCef2D791bc4027BbfedFb47319A4AAaaAa',
},
[BLOCKCHAIN_NETWORK.CYBER_CONNECT_MAINNET]: {
NETWORK: cyberConnectMainnet,
API_BASE_URL: API_BASE_URL[ENV.PROD],
EPNS_COMMUNICATOR_CONTRACT: '0xbf895df410b7fcbe093973600950ba392f7e1d8e',
},
},
[ENV.STAGING]: {
[BLOCKCHAIN_NETWORK.ETH_SEPOLIA]: {
@@ -501,6 +467,11 @@ export const VIEM_CONFIG = {
API_BASE_URL: API_BASE_URL[ENV.STAGING],
EPNS_COMMUNICATOR_CONTRACT: '0x7b9C405e261ba671f008c20D0321f62d08C140EC',
},
[BLOCKCHAIN_NETWORK.CYBER_CONNECT_TESTNET]: {
NETWORK: cyberConnectTestnet,
API_BASE_URL: API_BASE_URL[ENV.STAGING],
EPNS_COMMUNICATOR_CONTRACT: '0x6e489B7af21cEb969f49A90E481274966ce9D74d',
},
},
[ENV.DEV]: {
[BLOCKCHAIN_NETWORK.ETH_SEPOLIA]: {
@@ -543,6 +514,11 @@ export const VIEM_CONFIG = {
API_BASE_URL: API_BASE_URL[ENV.DEV],
EPNS_COMMUNICATOR_CONTRACT: '0xA1DF3E68D085aa6918bcc2506b24e499830Db0eB',
},
[BLOCKCHAIN_NETWORK.CYBER_CONNECT_TESTNET]: {
NETWORK: cyberConnectTestnet,
API_BASE_URL: API_BASE_URL[ENV.STAGING],
EPNS_COMMUNICATOR_CONTRACT: '0x9cb3bd7550B5c92baA056Fc0F08132f49508145F',
},
},
[ENV.LOCAL]: {
[BLOCKCHAIN_NETWORK.ETH_SEPOLIA]: {
@@ -585,6 +561,11 @@ export const VIEM_CONFIG = {
API_BASE_URL: API_BASE_URL[ENV.LOCAL],
EPNS_COMMUNICATOR_CONTRACT: '0xA1DF3E68D085aa6918bcc2506b24e499830Db0eB',
},
[BLOCKCHAIN_NETWORK.CYBER_CONNECT_TESTNET]: {
NETWORK: cyberConnectTestnet,
API_BASE_URL: API_BASE_URL[ENV.STAGING],
EPNS_COMMUNICATOR_CONTRACT: '0x9cb3bd7550B5c92baA056Fc0F08132f49508145F',
},
},
};

2 changes: 1 addition & 1 deletion packages/restapi/src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ const Constants = {
DEV_CHAIN_ID: 99999,
NON_ETH_CHAINS: [
137, 80002, 56, 97, 10, 11155420, 2442, 1101, 421614, 42161, 122, 123,
80085,
80085,111557560,7560
],
ETH_CHAINS: [1, 11155111],
ENC_TYPE_V1: 'x25519-xsalsa20-poly1305',
119 changes: 119 additions & 0 deletions packages/restapi/src/lib/customChains.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import { defineChain } from 'viem';

export const polygonZkEvmCordona = defineChain({
id: 2442,
name: 'Polygon zkEVM Cardona Testnet',
network: 'polygon-zkevm-testnet',
nativeCurrency: {
decimals: 18,
name: 'ETH',
symbol: 'ETH',
},
rpcUrls: {
default: { http: ['https://rpc.cardona.zkevm-rpc.com/'] },
public: { http: ['https://rpc.cardona.zkevm-rpc.com/'] },
},
blockExplorers: {
default: {
name: 'Polygon zkEVM Cardona',
url: ' https://cardona-zkevm.polygonscan.com/',
},
},
testnet: true,
});

export const polygonAmoy = defineChain({
id: 80002,
name: 'Polygon Amoy Testnet',
network: 'polygon-amoy',
nativeCurrency: {
decimals: 18,
name: 'MATIC',
symbol: 'MATIC',
},
rpcUrls: {
default: { http: ['https://rpc-amoy.polygon.technology/'] },
public: { http: ['https://rpc-amoy.polygon.technology/'] },
},
blockExplorers: {
default: {
name: 'Polygon Amoy',
url: 'https://www.oklink.com/amoy',
},
},
testnet: true,
});

export 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,
});

export const cyberConnectTestnet = defineChain({
id: 111_557_560,
name: 'Cyber Testnet',
network: 'cyberconnect-testent',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://cyber-testnet.alt.technology'] },
public: { http: ['https://cyber-testnet.alt.technology'] },
},
blockExplorers: {
default: {
name: 'Blockscout',
url: 'https://testnet.cyberscan.co',
},
},
contracts: {
multicall3: {
address: '0xffc391F0018269d4758AEA1a144772E8FB99545E',
blockCreated: 304545,
},
},
testnet: true,
});

export const cyberConnectMainnet = defineChain({
id: 7_560,
name: 'Cyber',
network: 'cyberconnect-mainnet',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://cyber.alt.technology'],
},
public: {
http: ['https://cyber.alt.technology'],
},
},
blockExplorers: {
default: {
name: 'Blockscout',
url: 'https://cyberscan.co',
apiUrl: 'https://cyberscan.co/api',
},
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 0,
},
},
});
35 changes: 22 additions & 13 deletions packages/restapi/src/lib/payloads/constants.ts
Original file line number Diff line number Diff line change
@@ -13,11 +13,13 @@ export const CHAIN_ID_TO_SOURCE: ChainIdToSourceType = {
11155420: 'OPTIMISM_TESTNET',
2442: 'POLYGON_ZK_EVM_TESTNET',
1101: 'POLYGON_ZK_EVM_MAINNET',
421614: "ARBITRUM_TESTNET",
42161: "ARBITRUMONE_MAINNET",
122: "FUSE_MAINNET",
123: "FUSE_TESTNET",
80085: "BERACHAIN_TESTNET"
421614: 'ARBITRUM_TESTNET',
42161: 'ARBITRUMONE_MAINNET',
122: 'FUSE_MAINNET',
123: 'FUSE_TESTNET',
80085: 'BERACHAIN_TESTNET',
7560: 'CYBER_CONNECT_MAINNET',
111557560: 'CYBER_CONNECT_TESTNET',
};

export const SOURCE_TYPES = {
@@ -31,16 +33,23 @@ export const SOURCE_TYPES = {
OPTIMISM_TESTNET: 'OPTIMISM_TESTNET',
POLYGON_ZK_EVM_TESTNET: 'POLYGON_ZK_EVM_TESTNET',
POLYGON_ZK_EVM_MAINNET: 'POLYGON_ZK_EVM_MAINNET',
ARBITRUM_TESTNET: "ARBITRUM_TESTNET",
ARBITRUMONE_MAINNET: "ARBITRUMONE_MAINNET",
FUSE_TESTNET:"FUSE_TESTNET",
FUSE_MAINNET:"FUSE_MAINNET",
BERACHAIN_TESTNET: "BERACHAIN_TESTNET",
ARBITRUM_TESTNET: 'ARBITRUM_TESTNET',
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'
SIMULATE: 'SIMULATE',
CYBER_CONNECT_TESTNET: 'CYBER_CONNECT_TESTNET',
CYBER_CONNECT_MAINNET: 'CYBER_CONNECT_MAINNET',
};

export const SUPPORTED_CHAINS = [
1, 11155111, 42, 137, 80002, 56, 97, 10, 11155420, 2442, 1101, 421614, 42161,
122, 123, 80085, 111557560, 7560,
];

export enum IDENTITY_TYPE {
MINIMAL = 0,
IPFS = 1,
@@ -81,7 +90,7 @@ export enum SPACE_ACCEPT_REQUEST_TYPE {

export enum SPACE_DISCONNECT_TYPE {
STOP, // space is stopped/ended
LEAVE // speaker leaves a space
LEAVE, // speaker leaves a space
}

export enum SPACE_INVITE_ROLES {
@@ -93,7 +102,7 @@ export enum SPACE_ROLES {
HOST,
CO_HOST,
SPEAKER,
LISTENER
LISTENER,
}

export const DEFAULT_DOMAIN = 'push.org';
8 changes: 2 additions & 6 deletions packages/restapi/src/lib/payloads/helpers.ts
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ import {
NOTIFICATION_TYPE,
CHAIN_ID_TO_SOURCE,
SOURCE_TYPES,
SUPPORTED_CHAINS,
} from './constants';
import { sign } from '../chat/helpers';

@@ -327,12 +328,7 @@ export function getSource(

export function getCAIPFormat(chainId: number, address: string) {
// EVM based chains
if (
[
1, 11155111, 42, 137, 80002, 56, 97, 10, 11155420, 2442, 1101, 421614,
42161, 122, 123, 80085,
].includes(chainId)
) {
if (SUPPORTED_CHAINS.includes(chainId)) {
return `eip155:${chainId}:${address}`;
}

1 change: 1 addition & 0 deletions packages/restapi/tests/.env.sample
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ ARBITRUM_CHANNEL_PRIVATE_KEY=your_arbitrum_channel_private_key
OPTIMISM_CHANNEL_PRIVATE_KEY=your_optimism_channel_private_key
POLYGON_CHANNEL_PRIVATE_KEY=your_polygon_channel_private_key
POLYGON_ZKEVM_CHANNEL_PRIVATE_KEY=your_polygon_zkevm_channel_private_key
CYBER_CONNECT_CHANNEL_PRIVATE_KEY=your_cyber_connect_channel_private_key

WALLET_PRIVATE_KEY=your_wallet_private_key
WALLET_PRIVATE_KEY_2=your_wallet_private_key_2
2 changes: 1 addition & 1 deletion packages/uiweb/README.md
Original file line number Diff line number Diff line change
@@ -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_AMOY", "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" |
| 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_AMOY", "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", "CYBER_CONNECT_TESTNET , "CYBER_CONNECT_MAINNET" ,"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 |
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ import { ArbitrumSvg } from "../../../icons/ArbitrumSvg"
import { FuseSvg } from "../../../icons/FuseSvg"
import React from "react";
import { BerachainSVG } from "../../../icons/BerachainSVG";

import { CyberConnectSVG } from "../../../icons/CyberConnectSVG";
const createSVGIcon = (element:any, chainName: string) => {
return (
<Tooltip tooltipContent={`${chainName}`}>
@@ -81,4 +81,12 @@ export const NETWORK_ICON_DETAILS = {
label: 'BERACHAIN TESTNET',
icon: createSVGIcon(<BerachainSVG/>, 'Berachain Testnet'),
},
111557560: {
label: 'CYBER CONNECT TESTNET',
icon: createSVGIcon(<CyberConnectSVG/>, 'CyberConnect Testnet'),
},
7560: {
label: 'CYBER CONNECT MAINNET',
icon: createSVGIcon(<CyberConnectSVG/>, 'CyberConnect Mainnet'),
}
};
11 changes: 10 additions & 1 deletion packages/uiweb/src/lib/components/notification/chainDetails.tsx
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import { OptimismSvg } from '../../icons/OptimismSvg';
import { PolygonSvg } from '../../icons/PolygonSvg';
import { PolygonzkevmSvg } from '../../icons/PolygonzkevmSvg';
import { TheGraphSvg } from '../../icons/TheGraphSvg';
import { CyberConnectSVG } from '../../icons/CyberConnectSVG';
const createSVGIcon = (element: any, chainName: string) => {
return (
<Tooltip tooltipContent={`Delivered by ${chainName}`}>{element}</Tooltip>
@@ -82,5 +83,13 @@ export default {
BERACHAIN_TESTNET: {
label: 'BERACHAIN TESTNET',
icon: createSVGIcon(<BerachainSVG />, 'Berachain Testnet'),
},
},
CYBER_CONNECT_TESTNET: {
label: 'CYBER CONNECT TESTNET',
icon: createSVGIcon(<CyberConnectSVG/>, 'CyberConnect Testnet'),
},
CYBER_CONNECT_MAINNET: {
label: 'CYBER CONNECT MAINNET',
icon: createSVGIcon(<CyberConnectSVG/>, 'CyberConnect Mainnet'),
}
};
2 changes: 2 additions & 0 deletions packages/uiweb/src/lib/components/notification/index.tsx
Original file line number Diff line number Diff line change
@@ -41,6 +41,8 @@ export type chainNameType =
| 'FUSE_MAINNET'
| 'THE_GRAPH'
| 'BERACHAIN_TESTNET'
| "CYBER_CONNECT_TESTNET"
| "CYBER_CONNECT_MAINNET"
| undefined;

export type NotificationItemProps = {
12 changes: 9 additions & 3 deletions packages/uiweb/src/lib/config/constants.ts
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@ const TESTNET_NETWORK = {
ARBITRUM: 'eip155:421614',
FUSE: 'eip155:123',
BERACHAIN: 'eip155:80085',
CYBER_CONNECT: 'eip155:111557560'
};
const MAINET_NETWORK = {
ETHEREUM: 'eip155:1',
@@ -69,6 +70,7 @@ const MAINET_NETWORK = {
POLYGON_ZK_EVM: 'eip155:1101',
ARBITRUM: 'eip155:42161',
FUSE: 'eip155:122',
CYBER_CONNECT: "eip155:7560"
};

export const BLOCKCHAIN_NETWORK = {
@@ -86,6 +88,7 @@ export const allowedNetworks = {
10, // for optimism mainnet
42161, // for arbitrum mainnet
122, // for fuse mainnet
7569 // for cyber connect mainnet
],
dev: [
11155111, // for eth sepolia
@@ -95,7 +98,8 @@ export const allowedNetworks = {
421614, // for arbitrum testnet
123, // for fuse testnet
80085, // for berachain testnet
2442 // polygon zkevm
2442, // polygon zkevm
111557560 // cyber connect testnet
],
staging: [
// 42, //for kovan
@@ -106,7 +110,8 @@ export const allowedNetworks = {
421614, // for arbitrum testnet
123, // for fuse testnet
80085, // for berachain testnet
2442 // polygon zkevm
2442, // polygon zkevm
111557560 // cyber connect testnet
],
local: [
11155111, // for eth sepolia
@@ -116,7 +121,8 @@ export const allowedNetworks = {
421614, // for arbitrum testnet
123, // for fuse testnet
80085, // for berachain testnet
2442 // polygon zkevm
2442, // polygon zkevm
111557560 // cyber connect testnet
],
};

26 changes: 26 additions & 0 deletions packages/uiweb/src/lib/icons/CyberConnect.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as React from 'react';
import { SVGProps } from 'react';

export const CyberConnectIcon = (props: SVGProps<SVGSVGElement>) => (
<svg
width="25"
height="24"
viewBox="0 0 25 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<circle
cx={500}
cy={500}
r={500}
fill="black"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M596.992 518.619L744.364 670.51C746.133 672.308 747.542 674.447 748.509 676.806C749.476 679.165 749.982 681.697 750 684.258C750.017 686.819 749.544 689.358 748.609 691.73C747.674 694.103 746.294 696.262 744.549 698.085L733.736 709.192C730.698 712.474 726.683 714.617 722.328 715.281C719.453 715.677 716.528 715.381 713.782 714.418C711.036 713.455 708.543 711.849 706.499 709.728L526.539 524.249C523.41 521.03 520.927 517.206 519.234 512.997C517.54 508.788 516.668 504.275 516.668 499.719C516.668 495.162 517.54 490.65 519.234 486.441C520.927 482.231 523.41 478.408 526.539 475.189L706.499 289.709C708.252 287.9 710.334 286.464 712.626 285.484C714.919 284.504 717.376 284 719.857 284C722.339 284 724.796 284.504 727.088 285.484C729.38 286.464 731.463 287.9 733.216 289.709L744.364 301.39C746.12 303.197 747.513 305.344 748.463 307.706C749.414 310.069 749.903 312.601 749.903 315.159C749.903 317.716 749.414 320.249 748.463 322.611C747.513 324.974 746.12 327.12 744.364 328.927L596.992 480.857C592.158 485.878 589.446 492.665 589.446 499.738C589.446 506.811 592.158 513.597 596.992 518.619ZM403.002 481.018L255.687 329.086C253.899 327.287 252.476 325.139 251.5 322.768C250.524 320.397 250.014 317.849 250 315.273C249.986 312.697 250.469 310.144 251.42 307.762C252.37 305.38 253.77 303.216 255.539 301.396L266.31 290.251C269.378 286.99 273.395 284.851 277.751 284.162C280.625 283.778 283.546 284.079 286.289 285.042C289.032 286.005 291.525 287.603 293.574 289.715L473.465 475.197C476.593 478.416 479.074 482.24 480.767 486.449C482.46 490.658 483.332 495.17 483.332 499.727C483.332 504.284 482.46 508.796 480.767 513.005C479.074 517.214 476.593 521.038 473.465 524.257L293.574 709.739C291.819 711.55 289.734 712.987 287.44 713.967C285.145 714.947 282.686 715.452 280.202 715.452C277.719 715.452 275.26 714.947 272.965 713.967C270.671 712.987 268.586 711.55 266.83 709.739L255.687 698.249C253.93 696.439 252.537 694.289 251.586 691.924C250.636 689.558 250.146 687.022 250.146 684.461C250.146 681.901 250.636 679.365 251.586 676.999C252.537 674.634 253.93 672.484 255.687 670.674L403.002 518.781C407.833 513.759 410.544 506.972 410.544 499.899C410.544 492.826 407.833 486.039 403.002 481.018Z"
fill="white"
/>
</svg>
);
26 changes: 26 additions & 0 deletions packages/uiweb/src/lib/icons/CyberConnectSVG.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as React from 'react';
import { SVGProps } from 'react';

export const CyberConnectSVG = (props: SVGProps<SVGSVGElement>) => (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<circle
cx={500}
cy={500}
r={500}
fill="black"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M596.992 518.619L744.364 670.51C746.133 672.308 747.542 674.447 748.509 676.806C749.476 679.165 749.982 681.697 750 684.258C750.017 686.819 749.544 689.358 748.609 691.73C747.674 694.103 746.294 696.262 744.549 698.085L733.736 709.192C730.698 712.474 726.683 714.617 722.328 715.281C719.453 715.677 716.528 715.381 713.782 714.418C711.036 713.455 708.543 711.849 706.499 709.728L526.539 524.249C523.41 521.03 520.927 517.206 519.234 512.997C517.54 508.788 516.668 504.275 516.668 499.719C516.668 495.162 517.54 490.65 519.234 486.441C520.927 482.231 523.41 478.408 526.539 475.189L706.499 289.709C708.252 287.9 710.334 286.464 712.626 285.484C714.919 284.504 717.376 284 719.857 284C722.339 284 724.796 284.504 727.088 285.484C729.38 286.464 731.463 287.9 733.216 289.709L744.364 301.39C746.12 303.197 747.513 305.344 748.463 307.706C749.414 310.069 749.903 312.601 749.903 315.159C749.903 317.716 749.414 320.249 748.463 322.611C747.513 324.974 746.12 327.12 744.364 328.927L596.992 480.857C592.158 485.878 589.446 492.665 589.446 499.738C589.446 506.811 592.158 513.597 596.992 518.619ZM403.002 481.018L255.687 329.086C253.899 327.287 252.476 325.139 251.5 322.768C250.524 320.397 250.014 317.849 250 315.273C249.986 312.697 250.469 310.144 251.42 307.762C252.37 305.38 253.77 303.216 255.539 301.396L266.31 290.251C269.378 286.99 273.395 284.851 277.751 284.162C280.625 283.778 283.546 284.079 286.289 285.042C289.032 286.005 291.525 287.603 293.574 289.715L473.465 475.197C476.593 478.416 479.074 482.24 480.767 486.449C482.46 490.658 483.332 495.17 483.332 499.727C483.332 504.284 482.46 508.796 480.767 513.005C479.074 517.214 476.593 521.038 473.465 524.257L293.574 709.739C291.819 711.55 289.734 712.987 287.44 713.967C285.145 714.947 282.686 715.452 280.202 715.452C277.719 715.452 275.26 714.947 272.965 713.967C270.671 712.987 268.586 711.55 266.83 709.739L255.687 698.249C253.93 696.439 252.537 694.289 251.586 691.924C250.636 689.558 250.146 687.022 250.146 684.461C250.146 681.901 250.636 679.365 251.586 676.999C252.537 674.634 253.93 672.484 255.687 670.674L403.002 518.781C407.833 513.759 410.544 506.972 410.544 499.899C410.544 492.826 407.833 486.039 403.002 481.018Z"
fill="white"
/>
</svg>
);
4 changes: 4 additions & 0 deletions packages/uiweb/src/lib/icons/cyberconnect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.