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
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.