Plugin WFN Data Review
Plugin offers weather data from Ambient, for the demo purpose the data lake units are being formed from various installation units at the Gulf location. This can be taken widely by setting up similar units across the globe, thus it forms a great data lake.
To execute or set up the weather data "Ambient" & how to contribute - Please wait for our directions.
Weather Data UI
The weather Data UI points to the link: https://wfn.goplugin.co/
Pre-requisites
You need the following information to test the weather data onto your contract using the Weather Data UI.
Oracle Address
Job ID
API endpoint
Environment endpoint
Steps For Using weather Data UI - Mainnet
Write and deploy your client contract using the network details
Fund it with PLI
Call your request method with the following input params
Oracle Address
0x1948745008E2704f8784e6654f76458BfF0Cdae5
Job ID
9ce06be377d846ed9333ef835a342e64
API Endpoint
gettempbyids
Environment endpoint
Wind
Temperature
RelativeHumidity
HeatIndex
Client Contract
Deploy the above ClientContract using http://remix.ethereum.org/. Once the contract is deployed, it has to be funded(0.2 PLI). For the sake of convenience, we can call the address of this contract CC for now.
After the contract is funded it has to be flattened using remix, for the convenience of the user the flattened form of the ClientContract is provided below.
Now you can go to the weather Data UI - link
WEATHER INFO
Select the filtering criteria like 'City', 'State', and 'Country' and click 'Show', you will be getting the latest weather info of the place you selected. After getting the result, move to the 'BLOCKCHAIN INFO' tab.
BLOCKCHAIN INFO
Deploy your contract tab details:
1) Select the 'Deploy your contract' tab and paste the flattened form of the contract and make sure you have selected the 'Mainnet' selection button and not 'Apothem', then press compile, after successful compilation you should get the ABI as the resultant.
2) Make sure you have XDC wallet installed and the account is pointing to 'mainnet', now click on the Deploy button. Now you should have got 'View Transaction' at the bottom, right-click on that and verify whether the transaction succeeded.
3) Copy and paste the 'ABI' contents from this page to a notepad.
Push Weather tab details:
1) Paste the copied ABI into the ABI field, client contract address (which is mentioned above as CC) into the 'Contract Address' field, oracle address, and job id to the respective fields.
2) Select an 'Environmental check' and click on Submit.
3) Once the transaction is done successfully you will get the 'View Transaction' button, click on it and verify the transaction status as 'success'. On the same page you can find the 'To:' field, copy the address in this field, and fund the address with 0.1 PLI
Show Weather tab details:
1) Paste the address which you copied and fund the same in 'Weather tab details' into 'Request Contract' field. Make sure you replaced the 'xdc' to '0x' at the start of the address.
2) Paste the ABI content into the 'ABI' field, select the 'Environmental check' field which you pushed and click submit, you will be receiving the weather details whatever you just pushed onto the plugin blockchain.
10 DAYS RECORD
In this tab the user can witness the 10 days of data for the selected location. Currently, the weather details include Temperature, Wind, Humidity and, HeatIndex.
Last updated