Approving Oracle tokens
Oracle tokens need approvals too
Any token that needs to be transferred to execute a SmartPiggies function must first be approved by the transacting account. This is needed to create piggies, purchase piggies, and also to clear piggies for settlement, if the oracle declared in the piggy requires a fee.
SmartPiggies offers oracles that do not require a fee, but the SmartPiggies smart contract also supports oracles that require a fee, such as Chainlink. If the piggy references an oracle that require a fee, the token required for the fee must be approved by the user, so that the SmartPiggies contract can transfer that token as payment on behalf of the user making the oracle request. If a chainlink oracle is used for the oracle in a piggy, a token approval must be made for the LINK token. This is the same process as making a collateral token approval and can be done from the Manage Wallet menu:
Select the toggle to the left of the LINK icon to create an approval transaction. After the MetaMask confirmation is confirmed, and the transaction completes successfully, an oracle call using a chainlink oracle can be executed by this Ethereum account. Note that the transacting account needs to have the required LINK to make the oracle call, but does not need a LINK balance to complete the approve transaction.