Skip to content

Ligo-Protocol/api-smart-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickStart(Only Odometer)

  1. Get the vehicleID from here:
https://ligo-node.oort.codyhatfield.me/api/v0/smartcar/users/wXP24CpYWJGW5lqKCmPB8RTH/vehicles
  1. Get the encToken from here:
https://ligo-node.oort.codyhatfield.me/api/v0/smartcar/users/wXP24CpYWJGW5lqKCmPB8RTH/token
  1. Open remix

  2. Compile APIConsumer.sol

  3. In fulfill function, enter your vehicleID and encToken

  4. In like 5-10 seconds, click on _endOdometer to check the values ..

QuickStart(All)

  1. Get the vehicleID from here:
https://ligo-node.oort.codyhatfield.me/api/v0/smartcar/users/wXP24CpYWJGW5lqKCmPB8RTH/vehicles
  1. Get the encToken from here:
https://ligo-node.oort.codyhatfield.me/api/v0/smartcar/users/wXP24CpYWJGW5lqKCmPB8RTH/token
  1. Open remix

  2. Compile APIConsumerAll.sol

  3. In fulfilldistanceAndlatitudeAndlongitude function, enter your vehicleID and encToken

  4. In like 5-10 seconds, click on _endLatitude, _endLongitude and _endOdometer to check the values ..

How to use from the beginning

  1. Open remix

  2. Compile APIConsumer.sol in remix.

  3. For deployment:

  • Set the Oracle address you mentioned in your Job
  • Set the Job ID by checking the 'externalJobID' in JobSpec of your Job. Remove the dashes in between and cover it with "". Example "29fa9aa13bf1468788b7cc4a500a45b8"
  • Set fee 0
  • Set Kovan address link:
0xa36085F69e2889c224210F603D836748e7dC0088
  • Deploy
  1. Get your vehicleID and encryptedToken:
https://ligo-node.oort.codyhatfield.me/api/v0/smartcar/users/wXP24CpYWJGW5lqKCmPB8RTH/vehicles
https://ligo-node.oort.codyhatfield.me/api/v0/smartcar/users/wXP24CpYWJGW5lqKCmPB8RTH/token
  1. Enter your vehicleID and encryptedToken as string in requestVolumeData function and run it

  2. Click on fulfill function to get your required data.

About

Fetch data from External adapter into smart contract.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published