0

I have a smart contract which must reach out to an off-chain data source (custom API) in order to verify that the wallet calling the function can do so. My understanding is that this is done via a Chainlink oracle.

Would the user/wallet who signs the transaction have to pay for ETH gas fees and LINK fees in order to run this function? Would they be required to have both ETH and LINK in their wallet to do so? Ideally the end user calling the function would only pay the gas fees of calling the function in ETH. Is this possible?

Thank you

1 Answer 1

0

The end user who signs the transaction that uses the oracle would pay the ETH/gas, just like any normal transaction....however it's the on-chain smart contract that they interact with which pays the LINK for the API call. So as a pre-requisite to the user doing the API call, the contract needs to be funded with enough LINK to perform the request.

A design pattern often used is the contract owner ensures the contract has enough LINK to handle the load of requests that come in from users

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.