Skip to content

Commit

Permalink
Add Eclipse mainnet and testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
PrasoonPratham committed Sep 21, 2023
1 parent 6d0e846 commit 58e37a7
Show file tree
Hide file tree
Showing 6 changed files with 319 additions and 124 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
"keen-slider": "^6.8.3",
"metro-config": "^0.72.2",
"moment": "^2.29.4",
"near-api-js": "^2.1.4",
"near-seed-phrase": "^0.2.0",
"patch-package": "^6.4.7",
"postcss-normalize": "^10.0.1",
"process": "^0.11.10",
Expand Down
Binary file modified src/assets/images/IconSolana.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/IconSolanaVector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions src/eclipse-wallet-adapter/constants/token-constants.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
const { PublicKey } = require('@solana/web3.js');

const SOL_DECIMALS = 6;
const SOL_SYMBOL = 'SOL';
const SOL_NAME = 'Solana';
const SOL_LOGO =
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/solana/info/logo.png';
const SOL_SYMBOL = 'ETH';
const SOL_NAME = 'Eclipse';
const SOL_LOGO = 'https://i.imgur.com/y0JEPfQ.png';
const SOL_ADDRESS = 'So11111111111111111111111111111111111111112';

const USDC_ADDRESS = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
Expand Down
176 changes: 66 additions & 110 deletions src/eclipse-wallet-adapter/services/network-service.js
Original file line number Diff line number Diff line change
@@ -1,122 +1,78 @@
let promise;

const networkData = [
{
"id": "ethereum-mainnet",
"blockchain": "ethereum",
"environment": "mainnet",
"name": "Ethereum",
"icon": "https://assets-cdn.trustwallet.com/blockchains/ethereum/info/logo.png",
"currency": {
"symbol": "ETH",
"decimals": 18
},
"config": {
"chainId": 1,
"openSeaUrl": "https://api.opensea.io/api"
}
{
id: 'solana-devnet',
blockchain: 'solana',
environment: 'devnet',
name: 'Eclipse Mainnet',
icon: 'https://assets-cdn.trustwallet.com/blockchains/solana/info/logo.png',
currency: {
symbol: 'ETH',
decimals: 9,
},
{
"id": "ethereum-goerli",
"blockchain": "ethereum",
"environment": "goerli",
"name": "Ethereum Goerli",
"icon": "https://assets-cdn.trustwallet.com/blockchains/ethereum/info/logo.png",
"currency": {
"symbol": "ETH",
"decimals": 18
},
"config": {
"chainId": 5,
"openSeaUrl": "https://testnets-api.opensea.io/api"
}
config: {
nodeUrl: 'https://staging-rpc.dev.eclipsenetwork.xyz',
},
{
"id": "solana-mainnet",
"blockchain": "solana",
"environment": "mainnet",
"name": "Solana",
"icon": "https://assets-cdn.trustwallet.com/blockchains/solana/info/logo.png",
"currency": {
"symbol": "SOL",
"decimals": 9
},
"config": {
"nodeUrl": "https://solana-api.syndica.io/access-token/GihB7MDgiHYn8jy0JKZTVEVHzMBKSKPZnrMxMNxyb3h9Wf637lklI4AxyTdNlw8Z/rpc"
}
},
{
id: 'solana-testnet',
blockchain: 'solana',
environment: 'testnet',
name: 'Eclipse Testnet',
icon: 'https://assets-cdn.trustwallet.com/blockchains/solana/info/logo.png',
currency: {
symbol: 'ETH',
decimals: 9,
},
{
"id": "solana-testnet",
"blockchain": "solana",
"environment": "testnet",
"name": "Solana Testnet",
"icon": "https://assets-cdn.trustwallet.com/blockchains/solana/info/logo.png",
"currency": {
"symbol": "SOL",
"decimals": 9
},
"config": {
"nodeUrl": "https://api.testnet.solana.com"
}
config: {
nodeUrl: 'https://api.testnet.solana.com',
},
{
"id": "solana-devnet",
"blockchain": "solana",
"environment": "devnet",
"name": "Solana Devnet",
"icon": "https://assets-cdn.trustwallet.com/blockchains/solana/info/logo.png",
"currency": {
"symbol": "SOL",
"decimals": 9
},
"config": {
"nodeUrl": "https://api.devnet.solana.com"
}
},
{
id: 'ethereum-mainnet',
blockchain: 'ethereum',
environment: 'mainnet',
name: 'Ethereum',
icon: 'https://assets-cdn.trustwallet.com/blockchains/ethereum/info/logo.png',
currency: {
symbol: 'ETH',
decimals: 18,
},
{
"id": "near-mainnet",
"blockchain": "near",
"environment": "mainnet",
"name": "Near",
"icon": "https://assets-cdn.trustwallet.com/blockchains/near/info/logo.png",
"currency": {
"symbol": "NEAR",
"decimals": 24
},
"config": {
"nodeUrl": "https://rpc.mainnet.near.org",
"archivalNodeUrl": "https://archival-rpc.mainnet.near.org",
"helperUrl": "https://helper.mainnet.near.org",
"indexerUrl": "https://api.kitwallet.app",
"nearTokenId": "wrap.near",
"refFinance": {
"apiUrl": "https://indexer.ref.finance",
"contractId": "v2.ref-finance.near"
}
}
config: {
chainId: 1,
openSeaUrl: 'https://api.opensea.io/api',
},
{
"id": "near-testnet",
"blockchain": "near",
"environment": "testnet",
"name": "Near Testnet",
"icon": "https://assets-cdn.trustwallet.com/blockchains/near/info/logo.png",
"currency": {
"symbol": "NEAR",
"decimals": 24
},
"config": {
"nodeUrl": "https://rpc.testnet.near.org",
"archivalNodeUrl": "https://archival-rpc.testnet.near.org",
"helperUrl": "https://helper.testnet.near.org",
"indexerUrl": "https://testnet-api.kitwallet.app",
"nearTokenId": "wrap.testnet",
"refFinance": {
"apiUrl": "https://dev-indexer.ref-finance.com",
"contractId": "ref-finance-101.testnet"
}
}
}
},
{
id: 'ethereum-goerli',
blockchain: 'ethereum',
environment: 'goerli',
name: 'Ethereum Goerli',
icon: 'https://assets-cdn.trustwallet.com/blockchains/ethereum/info/logo.png',
currency: {
symbol: 'ETH',
decimals: 18,
},
config: {
chainId: 5,
openSeaUrl: 'https://testnets-api.opensea.io/api',
},
},
// {
// "id": "solana-mainnet",
// "blockchain": "solana",
// "environment": "mainnet",
// "name": "Solana",
// "icon": "https://assets-cdn.trustwallet.com/blockchains/solana/info/logo.png",
// "currency": {
// "symbol": "SOL",
// "decimals": 9
// },
// "config": {
// "nodeUrl": "https://solana-api.syndica.io/access-token/GihB7MDgiHYn8jy0JKZTVEVHzMBKSKPZnrMxMNxyb3h9Wf637lklI4AxyTdNlw8Z/rpc"
// }
// },
];

const getNetworks = async () => {
Expand Down
Loading

0 comments on commit 58e37a7

Please sign in to comment.