Getting "Invalid secrets ownership" error while using chainlink functions on polygon mainnet

39 Views Asked by At

I am trying to use chainlink functions on polygon mainnet with offchain-secrets, https://docs.chain.link/chainlink-functions/tutorials/api-use-secrets-offchain.

While executing the same function on polygon mumbai, it is working fine. But when I am using it on the polygon mainnet, I am getting this error.

I am trying to run an algorithm to get the token prices of 4 different cryptocurrencies using Coingecko, save this data in a JSON file to IPFS and then return the hash/cid of this file to the smart contract.

2

There are 2 best solutions below

0
On

While executing the same function on polygon mumbai, it is working fine.

Chainlink Functions is currently available on mainnets only as a BETA preview, so you need to apply for early access.

0
On

As Andrej mentioned, Chainlink Functions is currently in BETA mode on mainnets.

If you're blocked, you could consider instead using the traditional "Direct Request" (a.k.a. Any API) Chainlink request pattern through a single Chainlink oracle. You'd essentially hand them your requirement and ask them store any API secrets / keys off-chain for you, and they'd hand you a jobId and a smart contract.

There are many reputable Chainlink oracles out there willing to serve your request. To find one, you can either:

  1. Visit the #operator-requests channel of the Chainlink Official Discord server
  2. Reach out to a known/reputable oracle via their website (we at LinkWell Nodes provide our job ids, oracle addresses, and contract examples directly within our online documentation)

It's important to note that if choosing to go with a single Chainlink oracle (vs. Chainlink Functions), it's essential to choose one that you trust - ideally one with a great reputation, clear communication, and a proper SLA.

Hope that helps!