Everyone, please head over to https://t.co/nEfz4lBxF2
You’ll see a full UI redesign that’s now committed to GitHub.
If you notice any bugs or have improvement suggestions, DM me
Mainnet will be finished soon aswell. Everybody be ready.
Everyone, please head over to https://t.co/nEfz4lBxF2
You’ll see a full UI redesign that’s now committed to GitHub.
If you notice any bugs or have improvement suggestions, DM me
Mainnet will be finished soon aswell. Everybody be ready.
Got some solid feedback on stream last night about features we should implement on the site.
Would you prefer onsite trading fees to be used for buybacks and burns, or for all site fees to be paid in $MTF and burned?
DO NOT INTERACT WITH THE ETF YET
If you want to test the platform use devnet
i am continuously working on mainnet do not interact with any thing mainnet yet
DO NOT INTERACT WITH THE ETF YET
If you want to test the platform use devnet
i am continuously working on mainnet do not interact with any thing mainnet yet
>> Added unit test for mainnet
Github:
https://t.co/c2Lu7lAkya
Output:
> [email protected] test:unit
> ts-mocha -p ./tests/tsconfig.json tests/**/*.ts
Mainnet Configuration Tests
Network Configuration
✔ should have valid mainnet RPC URL format
✔ should have valid devnet RPC URL format
✔ should differentiate between mainnet and devnet URLs
✔ should use correct mainnet cluster URL pattern
✔ should use correct devnet cluster URL pattern
Solscan URL Generation
✔ should generate correct mainnet account URL (no cluster param)
✔ should generate correct devnet account URL (with cluster param)
✔ should generate correct mainnet transaction URL
✔ should generate correct devnet transaction URL
Network Type Validation
✔ should accept 'devnet' as valid network
✔ should accept 'mainnet-beta' as valid network
✔ should correctly identify devnet
✔ should correctly identify mainnet
RPC Endpoint Selection
✔ should return devnet RPC for devnet network
✔ should return mainnet RPC for mainnet-beta network
✔ should default to mainnet for unknown network
Program ID Consistency
✔ should use same program ID on both networks
✔ should derive same PDAs on both networks
Dev Wallet Configuration
✔ should have valid dev wallet public key
✔ should be a valid Solana public key
✔ should use same dev wallet on both networks
Fee Calculations (Network Agnostic)
✔ should calculate same fees regardless of network
✔ should calculate correct total fees (1%)
Connection Configuration
✔ should create connection with mainnet endpoint
✔ should create connection with devnet endpoint
✔ should use 'confirmed' commitment by default for both networks
API Request Network Parameters
✔ should include network in buy request
✔ should include network in sell request
✔ should include network in ETF creation request
Database Network Field
✔ should store network field for devnet ETF
✔ should store network field for mainnet ETF
✔ should filter ETFs by network
Transaction Network Field
✔ should store network for buy transaction
✔ should store network for sell transaction
✔ should generate correct explorer link based on network
Environment Variables
✔ should have MAINNET_RPC_URL defined or use fallback
✔ should handle missing MAINNET_RPC_URL gracefully
Network Switch Logic
✔ should switch from devnet to mainnet
✔ should switch from mainnet to devnet
✔ should update RPC endpoint on network switch
Real Token Addresses (Mainnet)
✔ should validate USDC mainnet address
✔ should validate wrapped SOL address
✔ should validate BONK mainnet address
✔ should be valid PublicKeys
Jupiter API Configuration
✔ should use correct Jupiter Quote API endpoint
✔ should use correct Jupiter Swap API endpoint
✔ should use correct Jupiter Price API endpoint
✔ should build correct quote URL with parameters
Mainnet Safety Checks
✔ should warn when using mainnet with small balances
✔ should validate transaction amount is reasonable
✔ should reject zero amount transactions
✔ should reject negative amount transactions
mtf-etf Unit Tests
Test Setup Complete:
Lister: GAnPcdwDb9HjWS5Z7nTGRMxDTDxTqCQjgHTeq1xSbyqJ
Investor: 2oa6jxg1UKiVAcEFCiEpTzofp7m4ARb8pTh8yB5p81FE
ETF PDA (index 0): 5TUYP3dqv1F89dfjVczhVxjJRSSVJzRqffWPwn6AzyVU
Dev Wallet: GdtZWBCTUrFneA7FdFaxyudhCLTKgBM4a9NVR3k4rPJx
PDA Derivation
✔ should derive ETF PDA correctly with index
✔ should derive different PDAs for different listers
✔ should produce consistent PDAs for the same lister and index
✔ should derive different PDAs for same lister with different indices
✔ should allow up to 5 ETFs per wallet (indices 0-4)
Fee Calculations
✔ should calculate 0.5% creator fee correctly
✔ should calculate 0.5% dev fee correctly
✔ should calculate 1% total fees correctly
✔ should calculate amount after fees correctly
✔ should handle small amounts with rounding
✔ should handle very small amounts (fee rounds to 0)
✔ should calculate large amounts without overflow
✔ should handle 10 SOL investment
Token Percentage Validation
✔ should accept percentages that sum to 100
✔ should accept single token at 100%
✔ should accept 10 tokens equally weighted
✔ should reject percentages that sum to less than 100
✔ should reject percentages that sum to more than 100
✔ should handle uneven split (33/33/34)
Token Allocation Calculations
✔ should allocate SOL correctly for 50/50 split
✔ should allocate SOL correctly for 50/30/20 split
✔ should handle uneven splits (33/33/34)
✔ should allocate correctly for single token
Constants Validation
✔ should have correct DEV_WALLET address
✔ should have correct PROGRAM_ID
✔ should have valid PublicKey for DEV_WALLET
✔ should have valid PublicKey for PROGRAM_ID
Round-trip Fee Analysis
✔ should calculate total fees for buy and sell round-trip
✔ should show creator gets 0.5% on each leg
✔ should show dev gets 0.5% on each leg
✔ should calculate fees correctly for 100 SOL round-trip
Token Count Validation
✔ should accept 1 token
✔ should accept 10 tokens
✔ should reject 0 tokens
✔ should reject 11 tokens
✔ should accept any count between 1 and 10
Supply Tracking
✔ should increase supply on buy
✔ should decrease supply on sell
✔ should track supply across multiple operations
✔ should not allow supply to go negative
✔ should handle full liquidation
Account Validation Logic
✔ should validate lister account matches ETF lister
✔ should reject wrong lister account
✔ should validate dev wallet is correct constant
✔ should reject wrong dev wallet
Instruction Building
✔ should build initializeEtf accounts correctly
✔ should build buyEtf accounts correctly
✔ should build sellEtf accounts correctly
✔ should build closeEtf accounts correctly
Edge Cases
✔ should handle maximum safe integer for SOL amount
✔ should handle BigInt for very large calculations
✔ should handle minimum non-zero fee amount
✔ should handle amounts just below minimum fee threshold
Error Codes
✔ should have sequential error codes starting at 6000
✔ should have all expected error codes defined
✔ should have MaxEtfsReached error code
Program Transaction Building
✔ should use PDA from database when available
✔ should derive same PDA as stored in database
✔ should include dev_wallet in buy_etf accounts
✔ should build buy_etf instruction data correctly
✔ should skip program transaction when no PDA available
✔ should build program transaction when PDA is available
Percentage Rounding
✔ should round percentages to integers
✔ should adjust last percentage to ensure sum is 100
✔ should handle already-integer percentages
✔ should handle edge case where rounding causes sum > 100
Non-Custodial Flow
✔ should derive PDA from creator wallet with index
✔ should use stored contract_address for buy transactions
✔ should not require protocol wallet for transactions
121 passing (63ms)
Let me know if you guys want me to add any feature
For today my main focus will be mainnet
once complete i can get to updates and features people would want