跳转至主要内容

Getting Started with Functions

更新于
2026年6月26日
Deprecation Notice: Quicknode Functions

Quicknode Functions will be deprecated and will no longer be available soon.

This change is part of our effort to simplify the platform and provide a more consistent, secure experience for developers. Please begin migrating your workflows away from Functions

概述

Functions enable you to quickly build, deploy, and use serverless functions without the need to manage infrastructure. Your Functions can be used as destinations for your Streams, and can also be activate via API.

Functions Features


  • API Ready: Your functions are automatically exposed as an API, ready to be called from your front-end or other services.
  • Performance at Scale: Our globally balanced, auto-scaling infrastructure ensures smooth operation, even at peak loads.
  • Blockchain Optimized: Use your function as a destination for Streams, and it will automatically activate when new data is piped in from your Stream. You can also activate your function via API and optionally specify a specific blockchain dataset to access within your function during the activation.
  • Storage Access: Access and manage your Storage data seamlessly within your function.
  • Cost Effective: Pay for only what you use, with no upfront costs or long-term commitments.

Want to see Functions in action? Check out our Functions Library for sample code and walkthroughs.

Feature Availability and Cost

Functions beta is available on all Quicknode rate plans. We offer dedicated support and custom integrations for teams with unique requirements. Contact our team for more information.

You can create an unlimited number of functions to meet your needs, however it is important to remember that the minimum activation time for any function is 100ms. For a full breakdown of the Functions features by plan, visit the pricing page.

Understanding GB-sec and Billing

GB-sec (Gigabyte-seconds) is an industry-standard metric we have adopted to measure and bill for Functions usage. It represents the amount of compute resources consumed by your function over time.

How GB-sec is Calculated:

  • Memory Usage: The amount of memory allocated to your function (256MB).
  • Execution Time: The duration your function runs, with a minimum of 100ms per activation.
GB-sec = (Memory Allocated in GB) * (Execution Time in Seconds)

If your function completes in less than 100ms, it will be billed for 100ms.

Example Calculations:

A function configured with a 256MB memory allocation that runs for 50ms (rounded to 100ms minimum):
GB-sec = (256/1024 GB) * (0.1 seconds) = 0.025 GB-sec

  1. A function configured with a 256MB memory allocation that runs for 2 seconds:
    GB-sec = (256/1024 GB) * (2 seconds) = 0.5 GB-sec
信息

By understanding GB-sec, you can optimize your functions for both performance and cost-effectiveness. Consider execution time to make the most of your included GB-sec and minimize additional charges.

访问

Access Functions through the Quicknode Developer Portal.

Functions Activation

Functions can be activated in 3 ways:

  • Test activations: Your function can be activated manually within the function editor inside the Quicknode Developer Portal.
  • Streams activation: You can choose your function as a destination for a Stream, and it will be activated automatically when data is delivered. Learn more about functions as a destination for Streams.
  • API activation: On the overview screen within the Quicknode Developer Portal for your function, you will find the unique API endpoint for your function. You can call this endpoint directly to activate your function. Learn more about the datasets available for API activations.

支持的区块链

Functions activated by API requests can automatically access blockchain data from any of the supported chains and networks mentioned below. For teams with unique requirements, contact our team for more information. Otherwise, our self-serve experience has you covered on the following chains:

主网测试网
摘要测试网
ArbitrumSepolia
Arbitrum Nova
Avalanche C-ChainFuji
B3Sepolia
BaseSepolia
BeraBepolia
比特币
比特币现金测试网
爆炸Sepolia
BNB 智能链测试网
Celo
网络Sepolia
以太坊Hoodi, Sepolia
Fantom
Flow测试网
Fraxtal (Select Access Chain)
诺斯替主义
重力
Hemi测试网
Hyperliquid EVM
不可变 zkEVM测试网
单射测试网
墨水Sepolia
日本开放链
凯亚测试网
镜头测试网
Linea
Lisk (Select Access Chain)
MantleSepolia
Mode (Select Access Chain)
Monad即将推出测试网
MorphHolesky
乐观主义Sepolia
Peaq
等离子体测试网
Polygon厦门
Polygon zkEVMCardona Testnet
Redstone (Select Access Chain)
撒哈拉测试网
滚动测试网
Sei测试网
索拉纳Devnet, Testnet
索尼厄姆
索福尼测试网
DATAAeneid Testnet
Tron
UnichainSepolia
瓦纳Moksha Testnet
WorldchainSepolia
XaiSepolia
zkSyncSepolia
佐拉
0gGalileo Testnet

Select Access Chains

Fraxtal, Lisk, Mode, and Redstone are Select Access Chains. These networks require a subscription to access. To learn more about Select Access Chains, check out this blog on Introducing Select Access Chains: Your Chain, Your Choice

Function Configuration


  • Function name: The name of the function.
  • Runtime: Node.js v20 is available.
  • Description: You can add a description to your function. It supports markdown.
  • Timeout limit: How long your function can run before timing out. The range is 5 to 60 seconds.

function settings

安全

IP Allowlisting

If you're sending data from your Function to an external webhook endpoint, you can restrict access to that endpoint by adding the following IP address to your allowlist:

129.213.68.3
129.80.52.79

This IP address is used by Quicknode Functions when making outbound webhook requests. Adding this IP to your allowlist helps ensure that only legitimate requests from Quicknode Functions can access your webhook endpoint.

Function Editor

You can code your function in the functions code editor.

Code View

Write code that will execute when data is delivered by Streams, or when you activate your function via API.

Within the editor, you can test your function against blockchain datasets and view activation results.

function code editor

Within the code view, your function can access all the packages that are part of the selected runtime.

Functions Dashboard

Within the Quicknode developer portal, you can view details about your functions, including metrics, history, and logs. You can also edit and test your functions.

Each function generates a unique rest API endpoint that can be used to activate the function via API.

我们 ❤️ 您的反馈!

如果您对本文档有任何反馈或疑问,请告诉我们。我们非常期待您的反馈!

分享此文档