QuickNode Guide Examples

repository·main·Indexed 42 days ago

https://github.com/quiknode-labs/qn-guide-examples

A collection of full-stack sample applications and code snippets supporting QuickNode's technical guides. Includes tools for monitoring RPC infrastructure via Grafana and Prometheus, an RPC usage alerting tool with support for Slack, PagerDuty, and Discord, a Base AI Agent utilizing Coinbase CDP and OpenAI, and an EVM MCP Server for LLM-based blockchain analysis across Ethereum, Base, Arbitrum, Avalanche, and BSC.

Tokens
171.6K
Snippets
569
Records
750
Agent score
55%

What's inside QuickNode Guide Examples

  1. Overview of the Bitcoin Transaction Report Generator

    main

    The Bitcoin Transaction Report Generator is a tool designed to fetch and analyze Bitcoin transactions for a specific address using Quicknode's Blockbook API. It generates detailed CSV reports that include transaction history, balance changes, and USD valuations within a specified date range.

    Key Features

    • Balance Calculation: Tracks BTC balance before and after every transaction.
    • Transaction Direction: Distinguishes between incoming and outgoing transactions.
    • Confirmation Status: Identifies if transactions are confirmed.
    • USD Conversion: Calculates the USD value of movements at the time of the transaction.
    • Filtering: Excludes irrelevant internal wallet transactions and allows for date-range filtering.
  2. Overview of the Solana Wallet Portfolio function

    main

    The Solana Wallet Portfolio is a serverless function designed to manage a collection of multiple Solana wallets. It provides capabilities to:

    • Create new wallet entries in a portfolio.
    • Update existing wallet information.
    • Query the current state of the wallet portfolio.

    This implementation leverages:

    • Quicknode Functions: For serverless processing logic.
    • Quicknode Key-Value Store: For persistent storage of the wallet list.
    • Solana Web3.js v1.x: For interacting with the Solana blockchain.

    The project is written in TypeScript (./example.ts), but the compiled JavaScript version (./example.js) is what is actually deployed and used within the Quicknode Function environment.

  3. Overview of BatchCallAndSponsor (EIP-7702)

    main

    The BatchCallAndSponsor project is an educational demonstration of account abstraction and sponsored transaction execution using EIP-7702.

    It utilizes a smart contract to enable batch execution of multiple calls by verifying signatures over a nonce and batched call data. The project supports two primary execution modes:

    1. Direct execution: Performed by the smart account itself.
    2. Sponsored execution: Performed via an off-chain signature provided by a sponsor.

    Key Features:

    • Batch transaction execution: Group multiple calls into a single transaction.
    • Off-chain signature verification: Uses ECDSA to validate signatures.
    • Replay protection: Uses an internal nonce that increments after every batch execution to prevent re-using the same signature.
    • Asset support: Handles both ETH and ERC-20 token transfers.
  4. Overview of the AML and CFT Compliant dApp

    main

    The AML and CFT Compliant dApp is a decentralized application designed for secure ETH staking on Ethereum-compatible networks (defaulting to Base Mainnet). It integrates a compliance layer that ensures only low-risk wallets can participate in staking pools.

    Core Functionality

    • Risk-Gated Deposits: Accepts ETH deposits only from wallets that pass a risk evaluation.
    • Compliance-Verified Withdrawals: Facilitates withdrawals after verifying wallet compliance via an oracle-provided risk score.
    • Off-chain Data Integration: Uses Chainlink Functions to fetch real-time risk data from the Quicknode Risk Assessment API.
  5. Overview of Foundry toolkit

    main

    Foundry is a high-performance, modular toolkit for Ethereum application development written in Rust. It provides a suite of tools for testing, interacting with the EVM, and running local nodes:

    • Forge: An Ethereum testing framework (similar to Hardhat or Truffle).
    • Cast: A command-line utility for interacting with EVM smart contracts, sending transactions, and retrieving chain data.
    • Anvil: A local Ethereum node (similar to Ganache or Hardhat Network).
    • Chisel: A fast Solidity REPL for quick code execution and testing.
  6. Overview of Bitcoin Transaction Report Features

    main

    The application leverages Quicknode's Blockbook API to provide several analytical features for Bitcoin addresses:

    • Balance Calculation: Computes BTC balance before and after every transaction.
    • Transaction Direction: Distinguishes between incoming and outgoing transactions.
    • Confirmation Status: Indicates if a transaction is confirmed on the blockchain.
    • USD Conversion: Calculates the USD value of transactions based on the price at the time of the transaction.
    • Filtering: Includes date range filtering, time zone selection, and logic to exclude irrelevant internal wallet transactions.
  7. Features of the Quicknode Solana SDK

    main

    The SDK provides an optimized way to interact with Solana using web3.js-2.0 and Quicknode. Key capabilities include:

    • Automatic compute unit estimation: Optimizes the amount of compute units requested for a transaction.
    • Dynamic priority fee calculation: Uses Quicknode's Solana Priority Fee API to determine appropriate fees.
    • Smart transaction preparation: Handles the lifecycle of preparing and sending transactions efficiently.
    • Type-safe API: Built with TypeScript for better developer experience and safety.
  8. Explore Ethereum Staking Options

    main

    This guide provides an overview of the four primary methods for staking Ethereum, ranging from high-control solo staking to low-barrier centralized exchange staking.

    Staking Methods Overview

    1. Solo Staking: Running your own hardware and validator client. This offers the highest level of decentralization and control but requires significant technical knowledge and hardware maintenance.
    2. Staking Service Providers: Using professional services like Kiln, BloxStaking, or Figment (for institutional needs) to manage the validator infrastructure for you.
    3. Liquid Staking (Staking Pools): Participating in a pool where your staked ETH is represented by a liquid token (e.g., via Rocket Pool, Lido, or Stakewise). This allows you to maintain liquidity while earning staking rewards.
    4. Centralized Exchanges (CEX): The simplest method, where you stake directly through an exchange like Coinbase or Binance. This requires the least technical effort but involves trusting a centralized entity with your assets.
  9. How to use the Quicknode Guide Examples repository

    main

    The repository is organized into two main types of content:

    • Sample App Library: Full-stack, deployable applications (e.g., Next.js, React) found in directories like sample-dapps/. These mirror the apps found in the Quicknode Sample App Library.
    • Guide Examples: Focused snippets, backend scripts, and smaller examples that pair with Quicknode Guides. These are organized by blockchain or technology (e.g., ethereum/, solana/, webhooks/).

    Always check the README.md within a specific sub-folder for its unique setup instructions, environment variables, and runtime requirements.

  10. Understand the Phoenix Dashboard project structure

    main

    The project is a React application organized as follows:

    • src/api.ts: Contains REST helpers for fetching candles and market configuration.
    • src/types.ts: Shared TypeScript type definitions.
    • src/App.tsx: The root component responsible for seeding historical REST data on mount.
    • src/ws/PhoenixWebSocket.tsx: A WebSocket provider and React context for real-time data.
    • src/components/: UI components including Orderbook.tsx, PriceChart.tsx, TradeFeed.tsx, and MarketInfo.tsx.
    • src/utils/: Helper functions like format.ts and the useFundingCountdown.ts hook.