What is Chainlink Functions?
Chainlink Functions provides your smart contracts with access to a trust-minimized compute infrastructure. Your smart contract sends your code to a Decentralized Oracle Network (DON), and each DON’s oracle runs the same code in a serverless environment. The DON aggregates all the independent runs and returns the final result to your smart contract. Your code can be anything from simple computation to fetching data from API providers.
Chainlink Functions provides access to off-chain computation without having to run and configure your own Chainlink Node. To pay for requests, you fund a subscription account with LINK. Your subscription is billed only when the DON fulfills your request.
To learn more about how Chainlink Functions works, read the concepts and the architecture pages.
See the Tutorials page to find some simple tutorials that show you different GET and POST requests that run on Chainlink Functions.
When to use Chainlink Functions
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 off-chain 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
Testnet BETA Preview
Chainlink Functions is available on testnet only as a limited BETA preview to ensure that this new platform is robust and secure for developers. While on testnet and in BETA, developers must follow best practices and not use the BETA for any production application or secure any value. Chainlink Functions is likely to evolve and improve. Breaking changes might occur while the service is in BETA. Monitor these docs to stay updated on feature improvements along with interface and contract changes. Apply here to request access and add your EVM account address to the allow list.
See the Supported Networks page to find a list of supported networks and contract addresses.