Documenting a solution for an error message received while working on a Chainlink contract:

Error Message

ProviderError: Error: Transaction reverted: function call to a non-contract account

1 Answer 1


My Solution

This problem was occurring because of the setPublicChainlinkToken() method.

I was attempting to deploy my API Consumer contract on my localhost network. The API reference states, at the time of writing:

“This method will only set the LINK token address if the calling contract is on a public network.”

After switching to the Kovan Testnet, the problem was solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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