https://github.com/rpcpool/optimized-txs-examples
Optimized Solana Transactions Examples
https://github.com/rpcpool/optimized-txs-examples
Last synced: 11 months ago
JSON representation
Optimized Solana Transactions Examples
- Host: GitHub
- URL: https://github.com/rpcpool/optimized-txs-examples
- Owner: rpcpool
- License: mit
- Created: 2024-04-05T09:46:46.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T17:22:39.000Z (almost 2 years ago)
- Last Synced: 2024-04-30T18:35:39.532Z (almost 2 years ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Optimized Transactions Examples
[Read this](https://docs.triton.one/chains/solana/sending-txs) to improve optimize your transactions and improve delivery
This repo contains scripts which implement transaction optimizations such as:
- Skipping preflight
- Handling retries client side
- Minimizing compute units
- Adding priority fees
### Scripts
Run a script by executing `node .mjs`. For eg `node selfSolTransfer.mjs`
Refer the environment variables needed in the `.env.sample` file
1. `selfSolTransfer.mjs`: Transfer 5000 lamports to yourself
2. `jupiterSwap.mjs`: Swap using the Jupiter API