QuickNode Functions is an extremely versatile product, allowing arbitrary code to be run at the edge within the QuickNode infrastructure. Customers have offloaded small backend jobs and replaced full applications.
We've assembled a library of ready-to-use code samples to accelerate your development. These samples demonstrate how to use Functions effectively and integrate them into your existing architecture, including examples that leverage other QuickNode products like Streams and Key-Value Store.
The code samples below can be used in a variety of ways, including as standalone Functions, filters for your Streams, or custom Streams destinations through a Function.
Function | Chain(s) | Description | Dataset | Runtime | Usage |
---|---|---|---|---|---|
Manage Wallet Portfolio | Solana | Add and remove Solana wallets to a portfolio using Key-Value store and fetch the portfolio details. | Block | Node.js | Standalone Function |
Compute DEX Metrics | Solana | Get valuable Solana DEX data like transactions, value change, unique users, and transaction share major DEX protocols, including Phoenix, Raydium, and Jupiter. | Programs with logs | Node.js | Standalone Function |
Compute Block Metrics | EVM | Get vital block analytics data like active addresses, gas price, ETH transferred, biggest transactions, etc. | Block with receipts | Node.js | Standalone Function and Stream Filter |
Compute Block Metrics | Solana | Get vital Solana block analytics data like compute units, fees, program invocations, transaction count, and account activity. | Block | Node.js | Standalone Function |
Compute Contract Deployments | EVM | Compute the number of smart contracts deployed in a block. | Debug_trace | Node.js | Standalone Function |
Estimate Gas Price | EVM | Get the average gas price of the latest block by averaging gas prices across 100 transactions. | Block | Node.js | Standalone Function and Stream Filter |
Find Whale Transactions | EVM | Get transactions with a value greater than a specified amount. | Block | Node.js | Standalone Function and Stream Filter |
Fetch TRC20 (TRON) Metadata | Tron | Retrieve essential TRC20 token metadata such as name, symbol, decimals, and total supply, supporting both TRON native and EVM-compatible addresses for seamless integration. | no dataset | Node.js | Standalone Function |
Translate Txns (multi-chain) | EVM | Translate blockchain transactions into human readable format for multiple blockchains. | no dataset | Node.js | Standalone Function |
Stream Translated Txns | EVM | Set up a Stream of human readable transaction data. | Transactions | Node.js | Standalone Function and Stream Filter |
Stream to Discord | EVM | Have your QuickNode Stream feed data directly into a Discord channel. | Logs | Node.js | Custom Stream Destination via Function |
Detect Token Allowance | EVM | Get ERC-20 token approval events and details related to those approvals. | Logs | Node.js | Standalone Function |
Detect Uniswap Swaps | Ethereum | Get Uniswap V2&V3 swap events along with details related to those swaps. | Debug_Trace | Node.js | Standalone Function |
Compute Validator Metrics | Solana | Get Solana validator's voting patterns and performance metrics. | Programs with logs | Node.js | Standalone Function |
Fetch Solana NFTs | Solana | Fetch NFTs and related metadata for a given Solana wallet. | no dataset | Node.js | Standalone Function |
Fetch SPL Tokens | Solana | Fetch SPL tokens and their balances for a given Solana wallet. | no dataset | Node.js | Standalone Function |
Contribute to the Functions Library by opening a pull request to submit your Function.
If you'd like to request additional examples, please open an issue on the GitHub repository.