Skip to main content

Getting Started with Functions

Updated on
Jun 29, 2024

Overview

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 and namespaces to meet your needs, however it is important to remember that the minimum activation time for any function is 100ms.

QuickNode planDiscoverDiscover+BuildScaleEnterprise
Included GB-sec3005001,0003,000Custom, tiered pricing*
Price per GB-secn/a$0.0000159$0.0000159$0.0000159Custom, tiered pricing*
API DatasetsBlocks, Transactions, Logs, and ReceiptsBlocks, Transactions, Logs, and ReceiptsBlocks, Transactions, Logs, and Receipts+ Traces and all-in-one datasetsCustom datasets
Activate via Streams
Activate via API

Access

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.

Supported Chains

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:

ChainMainnetTestnets
ArbitrumSepolia
Arbitrum Nova
Avalanche C-ChainFuji
BaseSepolia
BeraComing soonArtio
BlastSepolia
BNB Smart ChainTestnet
Celo
CyberSepolia
EthereumHolesky, Sepolia
Fantom
Gnosis
Immutable XTestnet
MantleSepolia
OptimismSepolia
PolygonAmoy
Polygon zkEVM
ScrollTestnet
zkSyncSepolia
XaiSepolia

Function Configuration


  • Namespace: The namespace for the function.
  • Function name: The name of the function.
  • Runtime: Choose from Node.js v20 or Python v3.11.
  • 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.
  • Concurrency limit: The maximum number of times this function can run or be queued to run simultaneously. This value is currently limited to 1.
  • Memory limit: The amount of memory allocated to this function. The range is 128MB-512MB.

function settings

Function Editor

You can code your function in the functions code editor, but if you want to include dependencies, you can upload your function as a Zip file.

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.

Upload Zip

If you want to add additional dependencies use more packages in your function, you can switch to the .zip file view and upload your complete function as a zip file. Learn more about how to create and upload a zip file.

function zip upload

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.

Have an Idea?

You can let us know what all new runtimes, features, metrics or datasets you want us to support. You can upvote or create a new idea on our Functions Roadmap.

Share this doc