-
Review
chainlink.env
and adapt accordingly. The committed environment file uses Kovan testnet. Also, the example uses a wss infura project url. -
Build and run with docker-compose
- Build with default values, which you can adapt if needed inside the
Dockerfile
docker-compose up --build
- First build with your own build args and then run:
$ docker-compose build --build-arg API_USER_EMAIL=my@test.com
$ docker-compose up
- Browse to
localhost:6688
and log in with your credentials.
Default credentials:
- username:
"admin@admin.com"
- password:
Admin@123
- wallet password:
Admin@123
- Go to keys from the menu and Send some ether to your Regular node address.
-
Open Oracle.sol
-
Compile, In Deploy and Run tab select "Injected Web3"
-
Select Oracle.sol contract in menu and in Deploy copy the Kovan address link:
0xa36085F69e2889c224210F603D836748e7dC0088
-
Deploy with the kovan link address and confirm the metamask transaction
-
Check Keys tab in Chainklink node and copy the Regular node address. (If chainlink node isn't running yet check this link.)
-
Paste it in
SetFullfillmentPermission
function with your node address and value astrue
. -
Recheck your node address in
getAuthorizationStatus
function to see if it is true.
-
Run your External Adapter.
-
From the menus on the top, go to Bridge and create a bridge.
- Give any name for the bridge (You will need it later in job spec).
- Check your localhost ip using
ipconfig
as docker struggles to understand localhost. - There must be your 'wlp6s0' or similar with 'inet' value as your IP address.
- Set it as the Bridge link. I have set it as http://192.168.254.120/8080 where the external adapter is running.
-
Copy paste the odometer_job.txt as the job spec code for test. OR Follow https://docs.chain.link/docs/fulfilling-requests/ for setting a job request
-
Go through https://docs.chain.link/docs/jobs/ for your preferred job type. (No need to go through this if working with odometer_job.txt)
-
Change the bridge name to that you made earlier (default=hackathon).
-
Change Oracle address on top and bottom of the job spec to the oracle you deployed. If not deployed yet, check above 'Deploy Oracle.sol and fulfill Node request' section.
-
Recheck your Oracle address and bridge name, then Run the job.