Node operators

IMPORTANT NOTE: Please note that the process of Job creation and contract deployment is currently open only for Node operators with Validator role.

STEP 1:

Setup Plugin Node and make sure it is up and running without any downtime and has a good Reputation score

STEP 2:

Deploy Oracle Contract (OCA - Oracle Contract Address)

Reference: https://docs.goplugin.co/oracle/deployment

STEP 3:

Execute the "fullFillment" method in OCA with your node address

Reference: https://docs.goplugin.co/oracle/fulfillment-request

STEP 4:

Enable the bridge in your plugin node to listen, you can check your other bridge port and you can use the unused port number. The port number should be greater than 5001.

Reference: https://docs.goplugin.co/external-adapters/define-bridge

Reference: https://docs.goplugin.co/external-adapters/add-bridge-to-job-spec

STEP 5:

Create a Job (JobID) following the below steps

Reference: https://docs.goplugin.co/oracle/job-setup

STEP 6:

Download the data-feed-setup code from the repo to your plugin-deplyment directory for setting up the adapter and contract.

cd plugin-deployment/

git clone https://github.com/GoPlugin/data-feed-setup.git.

Go to the contract directory and change the from & to crypto as per your need.

cd data-feed-setup/contracts

Change line number 72,73 and 86,87 should be updated with the right index pair to provide pricing req.add("_fsysm","XDC"); req.add("_tsysm","USDT");

STEP 7:

Deploy the InternalContract.sol with below parameters (Contract address)

_pli (0xff7412ea7c8445c46a8254dfb557ac1e48094391 - Fixed)

_oracle (OCA)

_jobid (JobID)

Here, each contract will be mapped to a unique pricing pair and will be dedicated to the same.

This contract address will be then used for providing the XDC-USDT pair and displayed on oracles.goplugin.co for usage by the end consumers.

Once this contract is deployed using "remix" you can proceed to fund the contract(InternalContract.sol) address with 0.05 PLI for testing purpose.

NOTE: If you face the XDCPay transaction issue in your wallet, then follow the instructions as given in the image mentioned below.

STEP 8:

Setup the Adapter

Reference: https://github.com/GoPlugin/data-feed-setup/blob/main/adapter/index.js

cd adapter

Edit the port number in server.js file @ line number 6(The bridge port number set for Bridge should be replaced with the default ‘5001’)

Update the index.js with the required endpoint URL to fetch the price feed (Example: Teejlab, Cryptocompare, Coinmarketcap etc.,)

npm install

pm2 start server.js

Check the logs associated with server.js using 'pm2 logs <server.js_ID>' , you should see your port number updated in server.js as listening.

STEP 9:

Test your InternalContract.sol before you should submit the job details in the Node operator platform with the below fields.

Call testMyFunc function, it should return successful transaction

Call show function to check if the testMyFunc fetched the requested index pair properly.

BENEFITS TO NODE OPERATORS:

  • Be a "recognized" Validator in Plugin eco system.

  • Though it is minimal to start with, but earnings through this validator node will be a additional revenue stream.

    • For an instance, 1000 hits will make it to 1000*0.01 = 10 PLI (assuming 0.01 is an oracle fee set by you).

  • More the Index Pair you set, better the hit rate from defi applications.

  • Better response rate, will earn you a "Super Node Badge" from Plugin.

Note : Whenever any end consumer consumes data from a specific node with the help of the deployed Internal contract address, a transaction fee (setup by node operators ~0.01 PLI) will be transferred from the consumer to the Node operator’s oracle contract. The token from oracle contract can then be withdrawn to the respective wallet.

Last updated