Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import type { Vault, VaultWithStats } from '@/actions/types';
- import { VaultType } from '@/actions/types';
- import { SOLANA_CHAIN_IDS } from '@/lib/config/chains/adapters/solana';
- import { YOSOL_PROGRAM_ID, YOSOL_SHARE_MINT } from '@/lib/config/vaults/solana/config';
- /**
- * Mock yoSOL vault data for Solana chain
- * TODO: Remove this mock once backend provides real Solana vault data
- */
- export const YOSOL_MOCK: VaultWithStats = {
- id: 'yoSOL',
- name: 'yoSOL',
- type: VaultType.DEPOSIT,
- asset: {
- name: 'Solana',
- symbol: 'SOL',
- decimals: 9,
- address: 'So11111111111111111111111111111111111111112', // Native SOL mint
- coingeckoId: 'solana',
- },
- shareAsset: {
- name: 'yoVaultSOL',
- symbol: 'yoSOL',
- decimals: 9,
- address: YOSOL_SHARE_MINT.toBase58(), // yoSOL share mint
- coingeckoId: 'yield-optimizer-sol',
- },
- chain: {
- id: SOLANA_CHAIN_IDS.MAINNET,
- name: 'solana',
- nativeAsset: {
- name: 'Solana',
- symbol: 'SOL',
- decimals: 9,
- address: 'So11111111111111111111111111111111111111112',
- coingeckoId: 'solana',
- },
- explorer: 'https://solscan.io/',
- blockTime: 0.4,
- },
- contracts: {
- vaultAddress: YOSOL_PROGRAM_ID.toBase58(),
- escrowAddress: null,
- authorityAddress: YOSOL_PROGRAM_ID.toBase58(),
- },
- sharePrice: {
- raw: '1000000000',
- formatted: '1.0',
- },
- tvl: {
- raw: '0',
- formatted: '0',
- },
- yield: {
- '1d': null,
- '7d': null,
- '30d': null,
- },
- rewardYield: '0',
- cap: {
- raw: '0',
- formatted: '$0',
- },
- };
- /**
- * Full Vault type for yoSOL with complete stats (used by useVault hook)
- */
- export const YOSOL_VAULT_MOCK: Vault = {
- id: 'yoSOL',
- name: 'yoSOL',
- type: VaultType.DEPOSIT,
- asset: YOSOL_MOCK.asset,
- shareAsset: YOSOL_MOCK.shareAsset,
- chain: YOSOL_MOCK.chain,
- contracts: YOSOL_MOCK.contracts,
- deployment: {
- blockNumber: 0,
- timestamp: Date.now(),
- txHash: '',
- },
- protocols: [],
- stats: {
- tvl: { raw: '0', formatted: '0' },
- yield: { '1d': null, '7d': null, '30d': null },
- sharePrice: { raw: '1000000000', formatted: '1.0' },
- rewardYield: '0',
- maxCap: { raw: '0', formatted: '0' },
- idleBalance: { raw: '0', formatted: '0' },
- investedBalance: { raw: '0', formatted: '0' },
- idleBalances: [],
- protocolStats: [],
- },
- };
Advertisement