Using Oracle contract, you can use your own node to fulfill requests. This guide will show you how to deploy your own Oracle contract and add jobs to your node so that it can provide data to smart contracts.
Before you begin this guide, complete the following tasks to make sure you have all of the tools that you need:
- Set up XDCPay and obtain Apothem(Testnet) PLI.
- Configure an Xinfin client with an active websocket connection.
- Run a Plugin Node and connect it to a supported database.
- Fund the XDC Wallet address that your Plugin node uses. You can find the address in the node Operator GUI under the Keys tab. The address of the node is the Regular type. You can obtain test ETH from several faucets.
Your node works with several different types of addresses. Each address type has a specific function:
Node address: This is the address for your Plugin node wallet. The node requires native blockchain tokens at all times to respond to requests. For this example, the node uses XDC. When you start a Plugin node, it automatically generates this address. You can find this address on the Node Operator GUI under Keys > Account addresses.
Oracle contract address: This is the address for contracts like Operator.sol or Oracle.sol that are deployed to a blockchain. Do not fund these addresses with native blockchain tokens such as XDC. When you make API call requests, the funds pass through this contract to interact with your Plugin node. This will be the address that smart contract developers point to when they choose a node for an API call.
Admin wallet address: This is the address that owns your Operator.sol or Oracle.sol contract addresses. If you're on OCR, this is the wallet address that receives PLI tokens.
Please visit https://docs.goplugin.co/oracle/deployment for detailed further information.