Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
]
},
"dependencies": {
"@lifi/types": "17.62.0"
"@lifi/types": "17.63.0"
},
"devDependencies": {
"@commitlint/cli": "^19.7.1",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/chains/foundry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const foundryChainNameMap: Record<ChainId, string> = {
[ChainId.HPL]: 'hyperliquid',
[ChainId.OAS]: 'oasis',
[ChainId.SOL]: 'solana',
[ChainId.FOG]: 'fogo',
[ChainId.TER]: 'terra',
[ChainId.BTC]: 'bitcoin',
[ChainId.BCH]: 'bitcoin-cash',
Expand Down
2 changes: 1 addition & 1 deletion src/chains/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { supportedEVMChains } from './supportedChains.evm.js'
export * from './supportedChains.js'
export { supportedMVMChains } from './supportedChains.mvm.js'
export { supportedSolanaChains } from './supportedChains.svm.js'
export { supportedSVMChains } from './supportedChains.svm.js'
export { supportedTVMChains } from './supportedChains.tvm.js'
export { supportedUXTOChains } from './supportedChains.utxo.js'
export { foundryChainNameMap } from './foundry.js'
Expand Down
4 changes: 2 additions & 2 deletions src/chains/supportedChains.svm.int.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Connection, PublicKey } from '@solana/web3.js'
import { describe, expect, test } from 'vitest'
import { supportedSolanaChains } from './supportedChains.svm.js'
import { supportedSVMChains } from './supportedChains.svm.js'

const TokenProgramAddress = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'
const WalletAddress = '6AUWsSCRFSCbrHKH9s84wfzJXtD6mNzAHs11x6pGEcmJ'

describe.concurrent('SVM chains RPC check', () => {
const rpcUrls = supportedSolanaChains.flatMap((chain) =>
const rpcUrls = supportedSVMChains.flatMap((chain) =>
chain.metamask.rpcUrls.map((rpcUrl) => ({
rpcUrl: rpcUrl,
chainId: chain.id,
Expand Down Expand Up @@ -41,10 +41,10 @@
programId: tokenProgramPublicKey,
}),
])
expect(blockHeight.status).toBe('fulfilled')

Check failure on line 44 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Fogo' - 1021111031099710 RPC: 'https://fluxrpc.com/'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:44:34
expect(slot.status).toBe('fulfilled')

Check failure on line 45 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Fogo' - 1021111031099710 RPC: 'https://fluxrpc.com/'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:45:27

Check failure on line 45 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Fogo' - 1021111031099710 RPC: 'https://fluxrpc.com/'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:45:27

Check failure on line 45 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Fogo' - 1021111031099710 RPC: 'https://fluxrpc.com/'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:45:27

Check failure on line 45 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Fogo' - 1021111031099710 RPC: 'https://fluxrpc.com/'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:45:27

Check failure on line 45 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Fogo' - 1021111031099710 RPC: 'https://fluxrpc.com/'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:45:27

Check failure on line 45 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Fogo' - 1021111031099710 RPC: 'https://fluxrpc.com/'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:45:27

Check failure on line 45 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Fogo' - 1021111031099710 RPC: 'https://fluxrpc.com/'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:45:27
expect(balance.status).toBe('fulfilled')
expect(tokenAccountsByOwner.status).toBe('fulfilled')

Check failure on line 47 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Solana' - 1151111081099710 RPC: 'https://solana-rpc.publicnode.com'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:47:43

Check failure on line 47 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Solana' - 1151111081099710 RPC: 'https://solana-rpc.publicnode.com'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:47:43

Check failure on line 47 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Solana' - 1151111081099710 RPC: 'https://solana-rpc.publicnode.com'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:47:43

Check failure on line 47 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Solana' - 1151111081099710 RPC: 'https://solana-rpc.publicnode.com'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:47:43

Check failure on line 47 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Solana' - 1151111081099710 RPC: 'https://solana-rpc.publicnode.com'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:47:43

Check failure on line 47 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Solana' - 1151111081099710 RPC: 'https://solana-rpc.publicnode.com'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:47:43

Check failure on line 47 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Solana' - 1151111081099710 RPC: 'https://solana-rpc.publicnode.com'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:47:43

Check failure on line 47 in src/chains/supportedChains.svm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.svm.int.spec.ts > SVM chains RPC check > should successfully get chain ID from 'Solana' - 1151111081099710 RPC: 'https://solana-rpc.publicnode.com'

AssertionError: expected 'rejected' to be 'fulfilled' // Object.is equality Expected: "fulfilled" Received: "rejected" ❯ src/chains/supportedChains.svm.int.spec.ts:47:43
}
)
})
28 changes: 25 additions & 3 deletions src/chains/supportedChains.svm.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { SolanaChain } from '@lifi/types'
import type { SVMChain } from '@lifi/types'
import { ChainId, ChainKey, ChainType, CoinKey } from '@lifi/types'

export const supportedSolanaChains: SolanaChain[] = [
export const supportedSVMChains: SVMChain[] = [
{
key: ChainKey.SOL,
chainType: ChainType.SVM,
Expand All @@ -11,7 +11,7 @@ export const supportedSolanaChains: SolanaChain[] = [
mainnet: true,
logoURI:
'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/solana.svg',
faucetUrls: ['https://stakely.io/faucet/solana-sol'],
faucetUrls: [],
metamask: {
chainId: ChainId.SOL.toString(),
blockExplorerUrls: [
Expand All @@ -31,4 +31,26 @@ export const supportedSolanaChains: SolanaChain[] = [
],
},
},
{
key: ChainKey.FOG,
chainType: ChainType.SVM,
name: 'Fogo',
coin: CoinKey.FOGO,
id: ChainId.FOG,
mainnet: true,
logoURI:
'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/fogo.svg',
faucetUrls: [],
metamask: {
chainId: ChainId.FOG.toString(),
blockExplorerUrls: ['https://fogoscan.com/'],
chainName: 'Fogo',
nativeCurrency: {
name: 'FOGO',
symbol: 'FOGO',
decimals: 9,
},
rpcUrls: ['https://fluxrpc.com/'],
},
},
]
4 changes: 2 additions & 2 deletions src/chains/supportedChains.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Chain, ChainKey } from '@lifi/types'
import { supportedEVMChains } from './supportedChains.evm.js'
import { supportedMVMChains } from './supportedChains.mvm.js'
import { supportedSolanaChains } from './supportedChains.svm.js'
import { supportedSVMChains } from './supportedChains.svm.js'
import { supportedUXTOChains } from './supportedChains.utxo.js'
import { supportedTVMChains } from './supportedChains.tvm.js'

Expand All @@ -10,7 +10,7 @@ import { supportedTVMChains } from './supportedChains.tvm.js'
// This will be removed in the future
export const supportedChains = [
...supportedEVMChains,
...supportedSolanaChains,
...supportedSVMChains,
...supportedMVMChains,
...supportedUXTOChains,
...supportedTVMChains,
Expand Down
53 changes: 53 additions & 0 deletions src/coins/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,49 @@ export const basicCoins: BasicCoin[] = [
},
},
},
// > Fogo
{
key: CoinKey.FOGO,
name: CoinKey.FOGO,
logoURI:
'https://lifinance.github.io/types/src/assets/icons/chains/fogo.svg',
verified: true,
chains: {
[ChainId.FOG]: {
address: '11111111111111111111111111111111',
decimals: 9,
},
},
},
{
key: CoinKey.WFOGO,
name: CoinKey.WFOGO,
logoURI:
'https://lifinance.github.io/types/src/assets/icons/chains/fogo.svg',
verified: true,
chains: {
[ChainId.FOG]: {
address: 'So11111111111111111111111111111111111111112',
decimals: 9,
name: 'wFOGO',
},
},
},
{
key: CoinKey.USDCs,
name: CoinKey.USDCs,
logoURI:
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png',
verified: true,
chains: {
[ChainId.FOG]: {
address: 'uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG',
decimals: 6,
name: 'Bridged USDC',
symbol: 'USDC.s',
},
},
},

// OTHER STABLECOINS
// USDT
Expand Down Expand Up @@ -3389,6 +3432,16 @@ export const wrappedTokens: { [ChainId: string]: StaticToken } = {
logoURI:
'https://assets.coingecko.com/coins/images/4128/standard/solana.png',
},
[ChainId.FOG]: {
address: 'So11111111111111111111111111111111111111112',
symbol: 'wFOGO',
decimals: 9,
chainId: ChainId.FOG,
coinKey: CoinKey.WFOGO,
name: 'wFOGO',
logoURI:
'https://lifinance.github.io/types/src/assets/icons/chains/fogo.svg',
},
[ChainId.BSC]: {
// https://bscscan.com/token/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
address: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c',
Expand Down
Loading