-
Notifications
You must be signed in to change notification settings - Fork 89
Chore: Payment benchmarking tests #1032
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: naga
Are you sure you want to change the base?
Changes from all commits
c53d633
cc87392
5a25618
0eb7b0a
b187423
16ba5b1
47ce195
40d1cae
ea402b3
123b500
1a2b080
9470d30
275b5b0
794fbf1
771836c
bf7e29f
bf82374
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,9 +40,9 @@ const LogLevelSchema = z.enum(['silent', 'info', 'debug']); | |
| type LogLevel = z.infer<typeof LogLevelSchema>; | ||
|
|
||
| // Configurations | ||
| const LIVE_NETWORK_FUNDING_AMOUNT = '0.01'; | ||
| const LIVE_NETWORK_FUNDING_AMOUNT = '0.2'; | ||
| const LOCAL_NETWORK_FUNDING_AMOUNT = '1'; | ||
| const LIVE_NETWORK_LEDGER_DEPOSIT_AMOUNT = '1'; | ||
| const LIVE_NETWORK_LEDGER_DEPOSIT_AMOUNT = '1.2'; | ||
|
Comment on lines
+43
to
+45
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bumped because of failing ci E2E tests running out of funds, could be reverted after @glitch003 reduces fees on naga-test |
||
| const MAINNET_NETWORK_FUNDING_AMOUNT = '0.01'; | ||
| const MAINNET_LEDGER_DEPOSIT_AMOUNT = '0.01'; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,170 @@ | ||||||
| declare const Lit: any; | ||||||
| declare const ethers: any; | ||||||
| declare const jsParams: any; | ||||||
|
|
||||||
| /** | ||||||
| * Lit Action: Cross-Chain Swap | ||||||
| * | ||||||
| * Simulates a realistic cross-chain swap flow with price discovery, | ||||||
| * liquidity checks, slippage calculation, and multi-step signing. | ||||||
| */ | ||||||
| async function crossChainSwap() { | ||||||
| // Swap parameters (in a real scenario, these would come from jsParams) | ||||||
| const swapParams = { | ||||||
| sourceChain: 'ethereum', | ||||||
| destChain: 'bitcoin', | ||||||
| sourceToken: 'ETH', | ||||||
| destToken: 'BTC', | ||||||
| amountIn: '1.0', // 1 ETH | ||||||
| userAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb', // Example address | ||||||
|
||||||
| userAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb', // Example address | |
| userAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0', // Example address |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,47 @@ | ||||||
| declare const Lit: any; | ||||||
| declare const jsParams: any; | ||||||
|
|
||||||
| /** | ||||||
| * Lit Action: Decrypt within the Lit Action | ||||||
| * | ||||||
| * Decrypts an API key and makes a fetch request within the Lit Action. | ||||||
| */ | ||||||
| async function decryptWithinLitAction() { | ||||||
| const { accessControlConditions, ciphertext, dataToEncryptHash } = jsParams; | ||||||
|
|
||||||
| // Decrypt the API key | ||||||
| const decryptedApiKey = await Lit.Actions.decryptAndCombine({ | ||||||
| accessControlConditions, | ||||||
| ciphertext, | ||||||
| dataToEncryptHash, | ||||||
| authSig: null, | ||||||
| chain: 'ethereum', | ||||||
| }); | ||||||
|
|
||||||
| // Parse the decrypted API key | ||||||
| const apiKey = JSON.parse(decryptedApiKey); | ||||||
|
||||||
| const apiKey = JSON.parse(decryptedApiKey); | |
| JSON.parse(decryptedApiKey); |
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.
Bumped because of failing ci E2E tests running out of funds, could be reverted after @glitch003 reduces fees on naga-test