NEW

CCIP is now live for all developers. See what's new.

Back

Chainlink Functions Beta

Chainlink Functions provides your smart contracts access to trust-minimized compute infrastructure, allowing you to fetch data from APIs and perform custom computation. Your smart contract sends source code in a request to a Decentralized Oracle Network (DON), and each node in the DON executes the code in a serverless environment. The DON then aggregates all the independent return values from each execution and sends the final result back to your smart contract.

Chainlink Functions eliminates the need for you to manage your own Chainlink node and provides decentralized offchain computation and consensus, ensuring that a minority of the network cannot manipulate the response sent back to your smart contract.

Furthermore, Chainlink Functions allows you to include secret values in your request that are encrypted using threshold encryption. These values can only be decrypted via a multi-party decryption process, meaning that every node can only decrypt the secrets with participation from other DON nodes. This feature can provide API keys or other sensitive values to your source code, enabling access to APIs that require authentication.

To pay for requests, you fund a subscription account with LINK. Your subscription is billed when the DON fulfills your requests. Check out the subscriptions page for more information.

Read the architecture page to learn more about how Chainlink Functions works.

See the Tutorials page for simple tutorials showing you different GET and POST requests that run on Chainlink Functions. You can also gain hands-on experience with Chainlink Functions with the Chainlink Functions Playground.

Chainlink Functions enables a variety of use cases. Use Chainlink Functions to:

  • Connect to any public data. For example, you can connect your smart contracts to weather statistics for parametric insurance or real-time sports results for Dynamic NFTs.
  • Connect to public data and transform it before consumption. You could calculate Twitter sentiment after reading data from the Twitter API, or derive asset prices after reading price data from Chainlink Price Feeds.
  • Connect to a password-protected data source; from IoT devices like smartwatches to enterprise resource planning systems.
  • Connect to an external decentralized database, such as IPFS, to facilitate offchain processes for a dApp or build a low-cost governance voting system.
  • Connect to your Web2 application and build complex hybrid smart contracts.
  • Fetch data from almost any Web2 system such as AWS S3, Firebase, or Google Cloud Storage.

You can find several community examples at useChainlinkFunctions.com

Supported networks

See the Supported Networks page to find a list of supported networks and contract addresses.

What's next

Stay updated on the latest Chainlink news