-
Notifications
You must be signed in to change notification settings - Fork 88
Feature/jss 32 naga sdk add rpc env var for e2e and artillery tests #854
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
Feature/jss 32 naga sdk add rpc env var for e2e and artillery tests #854
Conversation
- Introduced `getFreshPriceFeedInfo` method to fetch price feed data independently of state refresh across various network environments (naga-dev, naga-local, naga-staging, naga-test). - Updated multi-endpoint processor to utilize the new `LitClientType` for better type safety. - Enhanced the `createLitClient` function to include a fresh price feed info fetcher.
- Modified `fundAccount` and `getViemPublicClient` functions to utilize a custom RPC URL if provided, enhancing flexibility in network configurations. - Cleaned up commented-out code in `runPkpSignTest` for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds optional custom RPC URL override functionality for E2E and Artillery tests via the LIT_YELLOWSTONE_PRIVATE_RPC_URL environment variable. This allows tests to use a private RPC endpoint instead of the default public endpoints when the environment variable is set.
Key changes include:
- Added
getFreshPriceFeedInfomethod to all Naga network environment modules - Modified E2E test helpers to support custom RPC URL override via environment variable
- Updated Artillery test configuration to include LitClientType import
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/networks/src/networks/vNaga/envs//naga-.module.ts | Added getFreshPriceFeedInfo method to expose fresh price feed fetching functionality |
| packages/lit-client/src/lib/LitClient/createLitClient.ts | Exposed getFreshPriceFeedInfo method in the Lit client interface |
| e2e/src/helper/fundAccount.ts | Added support for custom RPC URL via LIT_YELLOWSTONE_PRIVATE_RPC_URL environment variable |
| e2e/src/helper/NetworkManager.ts | Added custom RPC URL support for Viem public client creation |
| e2e/artillery/src/processors/multi-endpoints.ts | Updated imports and type annotations for Artillery tests |
|
|
||
| // Global variables to cache expensive operations | ||
| let litClient: any = null; | ||
| let litClient: LitClientType; |
Copilot
AI
Aug 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The litClient variable is declared without initialization but used in conditional checks. This will cause a TypeScript error since LitClientType doesn't include undefined. Consider initializing as let litClient: LitClientType | null = null; to match the previous pattern.
| let litClient: LitClientType; | |
| let litClient: LitClientType | null = null; |
| authContext: authContext, | ||
| pubKey: state.masterAccount.pkp.publicKey, | ||
| toSign: `Hello from Artillery! ${Date.now()}`, // Unique message per request | ||
| // userMaxPrice: 1000000000000000000n, |
Copilot
AI
Aug 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commented-out code appears to be debugging code that should be removed before merging to keep the codebase clean.
| // userMaxPrice: 1000000000000000000n, |
…ng environment variables setup
… variable validation
…Bun for dependency management
…s-sdk-ci-pipeline feat(e2e): add end-to-end testing workflow for Naga
WHAT
LIT_YELLOWSTONE_PRIVATE_RPC_URL