-
Notifications
You must be signed in to change notification settings - Fork 258
DEVREL-1077 migrate oft-solana anchor tests from solana-test-validator to Surfpool #1898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: init-solana-tests
Are you sure you want to change the base?
Conversation
🚨 E2E Tests FailedThe E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:
This is non-blocking and does not prevent merging. Check the action logs above for detailed failure information. |
🚨 E2E Tests FailedThe E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:
This is non-blocking and does not prevent merging. Check the action logs above for detailed failure information. |
PR SummaryMigrates Solana Anchor tests to run against Surfpool instead of
Written by Cursor Bugbot for commit dc65c7b. This will update automatically on new commits. Configure here. |
🚨 E2E Tests FailedThe E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:
This is non-blocking and does not prevent merging. Check the action logs above for detailed failure information. |
examples/oft-solana/test/anchor/suites/layerzero-infrastructure.test.ts
Outdated
Show resolved
Hide resolved
🚨 E2E Tests FailedThe E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:
This is non-blocking and does not prevent merging. Check the action logs above for detailed failure information. |
Changes
test:generate-featuresscript withresolve-oft-id.jsfor dynamic OFT program ID resolution.index.test.tsto start Surfpool, clone LayerZero programs, and reset infrastructure accounts.got-shim.cjswith local program keypair generation for offline/local testing.layerzero-infrastructure.test.tsto use Surfpool RPC calls for program cloning.pnpm test:anchorwith Surfpool environment variables.generate-features.ts(92 lines) andtest:generate-featuresnpm script.Example Run
Setting up test environment...
Starting surfpool (upstream: https://api.mainnet-beta.solana.com)...
Waiting for surfnet to start...
Surfnet started.
Priming LayerZero programs from https://api.mainnet-beta.solana.com...
Cloning endpoint...
Cloning uln...
Cloning executor...
Cloning pricefeed...
Cloning dvn...
Program oft (27cGdR9zfM4G1TVXxZQqCv6ebHbhczBFp9rpdr9g9wRR) not found upstream; deploying locally.
Skipping program authority update for OFT: Surfnet RPC surfnet_setProgramAuthority failed: Invalid program account 27cGdR9zfM4G1TVXxZQqCv6ebHbhczBFp9rpdr9g9wRR
Deploying OFT program to Surfnet...
Program Id: 27cGdR9zfM4G1TVXxZQqCv6ebHbhczBFp9rpdr9g9wRR
Signature: 2qqG4GJVTupgkwNP5wVsJF1BnhAZL3jGk1EHuQHjGtZXEQvpkp2seMHN99t2J6tSbEAKmE34WXMDLYkJR5X4sSbH
Test environment ready.
LayerZero Infrastructure
LayerZero Infrastructure Setup
✔ Init Endpoint (1640ms)
✔ Init Executor (370ms)
✔ Init PriceFeed (392ms)
✔ Init DVN (400ms)
✔ Init UltraLightNode (1221ms)
✔ Init address lookup table (1185ms)
Instruction Tests
init_oft
✔ rejects init_oft when shared decimals exceed mint decimals (1316ms)
✔ initializes native and adapter OFTs (712ms)
✔ sets OApp libraries and nonces (784ms)
set_oft_config
native config
✔ rejects unauthorized config updates (461ms)
✔ rejects invalid default fee bps (40ms)
✔ sets minimum default fee bps (309ms)
✔ sets maximum default fee bps (410ms)
✔ updates admin, delegate, and fee (2017ms)
adapter config
✔ rejects unauthorized config updates (458ms)
✔ rejects invalid default fee bps (49ms)
✔ sets minimum default fee bps (304ms)
✔ sets maximum default fee bps (409ms)
✔ updates admin, delegate, and fee (1993ms)
set_peer_config
native peer config
✔ rejects unauthorized peer updates (521ms)
✔ rejects invalid fee bps (109ms)
✔ rejects invalid enforced options (80ms)
✔ sets peer addresses and enforced options (907ms)
✔ sets outbound rate limit values (790ms)
adapter peer config
✔ rejects unauthorized peer updates (511ms)
✔ rejects invalid fee bps (150ms)
✔ rejects invalid enforced options (89ms)
✔ sets peer addresses and enforced options (904ms)
✔ sets outbound rate limit values (793ms)
quote instructions
native quotes
✔ rejects slippage when min amount exceeds computed amount (337ms)
✔ returns quoteSend and quoteOft results (338ms)
adapter quotes
✔ rejects slippage when min amount exceeds computed amount (332ms)
✔ returns quoteSend and quoteOft results (345ms)
send instruction
native send failures
✔ rejects slippage when min amount exceeds computed amount (255ms)
✔ rejects invalid sender when remaining accounts are tampered (245ms)
adapter send failures
✔ rejects slippage when min amount exceeds computed amount (258ms)
✔ rejects invalid sender when remaining accounts are tampered (242ms)
LayerZero Simulation
✔ simulates send and receive for native (12990ms)
✔ simulates send and receive for adapter (3226ms)
withdraw_fee
native fee withdrawal
✔ rejects unauthorized fee withdrawal (449ms)
✔ rejects withdrawal above available fees (800ms)
✔ withdraws available fees (1191ms)
adapter fee withdrawal
✔ rejects unauthorized fee withdrawal (395ms)
✔ rejects withdrawal above available fees (860ms)
✔ withdraws available fees (1133ms)
Cleaning up test environment...
Cleanup completed.
45 passing (1m)
How to test
pnpm test:anchorfromexamples/oft-solana.