Skip to content

Commit 1bd855e

Browse files
committed
solana mainnet support
1 parent 98cd21e commit 1bd855e

14 files changed

Lines changed: 748 additions & 95 deletions

.yarn/install-state.gz

-1.16 KB
Binary file not shown.

config/default.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,27 @@ export default {
5858
// → auto-generate, devnet only). Mainnet operators should also override
5959
// `rpc` here with a paid endpoint (Helius, Triton, etc.) — the public
6060
// mainnet-beta endpoint is rate-limited and unsuitable for production.
61+
//
62+
// `priorityFeeMicroLamports` is a ComputeBudget compute-unit price applied
63+
// to the transactions the paymaster builds AND signs itself (multisig/nonce
64+
// setup, nonce-pool top-ups). On mainnet, base-fee-only transactions are
65+
// deprioritised under load and routinely dropped outright — the signature
66+
// simply never lands — so a non-zero value is required there. Devnet is
67+
// uncontended, hence 0. Our instructions burn ~10k CU, so 50k µlamports/CU
68+
// costs ~500 lamports per tx: negligible against the reimbursement floors
69+
// in FEE_SCHEDULE, and cheap insurance against a stuck setup.
6170
devnet: {
6271
rpc: 'https://api.devnet.solana.com',
72+
priorityFeeMicroLamports: 0,
6373
},
6474
mainnet: {
65-
rpc: 'https://api.mainnet-beta.solana.com',
75+
// Branded endpoint: the ssp-backends-proxy Worker holds the provider
76+
// credential and fronts it as node-solana.sspwallet.io, so no token
77+
// lives in this repo or in any client bundle. Requests carrying
78+
// SSP_RELAY_PROXY_KEY land in the Worker's higher relay rate-limit
79+
// bucket instead of the per-IP one (we poll every vault from one IP).
80+
rpc: 'https://node-solana.sspwallet.io',
81+
priorityFeeMicroLamports: 50000,
6682
},
6783
},
6884
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"@runonflux/aa-schnorr-multisig-sdk": "1.3.0",
25-
"@runonflux/solana-multisig": "0.11.0",
25+
"@runonflux/solana-multisig": "0.12.0",
2626
"@runonflux/utxo-lib": "1.0.5",
2727
"@scure/bip32": "2.2.0",
2828
"@solana/spl-token": "0.4.14",

src/services/blockchains.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,30 @@ const solDevnet = {
467467
tokens: tokens.solDevnet(),
468468
};
469469

470+
const solMainnet = {
471+
id: 'solMainnet',
472+
libid: 'solana-mainnet',
473+
name: 'Solana',
474+
symbol: 'SOL',
475+
slip: 501, // SLIP-44 Solana. NOTE: `slip === 1` is the app-wide testnet
476+
// marker, so this being 501 is what makes solMainnet a mainnet chain
477+
// everywhere (fees, rates, tier gating, explorer links).
478+
decimals: 9,
479+
bip32: {
480+
// not specified, use default — leaf converted to Ed25519 seed at signing time
481+
public: 0x0488b21e,
482+
private: 0x0488ade4,
483+
},
484+
scriptType: 'p2sh', // not used for Solana, defaulted
485+
chainType: 'sol',
486+
backend: 'solana-mainnet',
487+
// SEPARATE program from devnet — own keypair + upgrade authority. The
488+
// program ID is a PDA seed input, so this must never be swapped with the
489+
// devnet one.
490+
programId: 'SSPWVu7dtTDkZYmDx73StqV46PioSmdiNE7igpjHK1r',
491+
tokens: tokens.solMainnet(),
492+
};
493+
470494
export default {
471495
btc,
472496
flux,
@@ -480,6 +504,7 @@ export default {
480504
base,
481505
rvn,
482506
zec,
507+
solMainnet,
483508
btcTestnet,
484509
btcSignet,
485510
fluxTestnet,

src/services/ratesService.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ async function fetchCryptoRates() {
6464
pepe: response.data.data['24478'].quote.USD.price,
6565
fdusd: response.data.data['26081'].quote.USD.price,
6666
pol: response.data.data['28321'].quote.USD.price,
67+
// Chain-id alias. Wallet chain-level lookups index cryptoRates by CHAIN
68+
// ID verbatim (`cryptoRates[activeChain]`), and the Polygon chain id is
69+
// `polygon`, not its `POL` symbol — without this every POL balance and
70+
// fiat total renders $0.00. Verified missing against the live relay
71+
// 2026-08-13. Same reason `bsc`/`base`/`solMainnet` exist as aliases.
72+
polygon: response.data.data['28321'].quote.USD.price,
6773
rndr: response.data.data['5690'].quote.USD.price,
6874
render: response.data.data['5690'].quote.USD.price,
6975
okb: response.data.data['3897'].quote.USD.price,
@@ -155,12 +161,18 @@ async function fetchCryptoRates() {
155161
avax: response.data.data['5805'].quote.USD.price,
156162
base: response.data.data['1027'].quote.USD.price, // ETH
157163
kda: response.data.data['5647'].quote.USD.price,
158-
// Solana SOL (CMC ID 5426). Exposed under the `sol` symbol only.
159-
// `solDevnet` is intentionally NOT mapped to a USD rate — testnet
160-
// tokens have no value, and pretending they do inflates enterprise
161-
// treasury displays with fake balances. `solMainnet` will be added
162-
// here when the mainnet chain config lands.
164+
// Solana SOL (CMC ID 5426), under BOTH keys — they serve different
165+
// lookups and both are required:
166+
// `sol` — token/symbol lookups (portfolio token rows, TokenBox)
167+
// `solMainnet` — CHAIN-level lookups, which index by chain id verbatim
168+
// (`cryptoRates[activeChain]` in Balances/WalletSwitcher/
169+
// portfolio/send/activity). Same reason `bsc` and `base`
170+
// exist alongside `bnb`/`eth`. Without the chain-id key
171+
// every SOL balance and fiat total silently renders 0.
172+
// `solDevnet` is intentionally absent — TEST-SOL has no value, and
173+
// pricing it would inflate treasury displays with fake balances.
163174
sol: response.data.data['5426'].quote.USD.price,
175+
solMainnet: response.data.data['5426'].quote.USD.price,
164176
};
165177
cryptoRates = prices;
166178
} catch (error) {

0 commit comments

Comments
 (0)