What is ChainLink?
ChainLink is a general Purpose framework designed for designing oracle networks so that you can access External Data onto your Smart Contract. Oracle Network contains lots of nodes that act as middleware to get external data on our Smart Contracts. We can also define our Chainlink Node and make sync with Link Pool Market. Steps to publish node on the link Market are given below.
How to make Oracle Account and Set Data onto Blockchain
- Open the Remix IDE
- Copy the following code on Remix and Save as Oracle.sol
pragma solidity 0.4.24;
import "https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.4/Oracle.sol";
- Compile the Oracle.sol in the remix ide with the appropriate version
-
- Deploy the SmartContract on Specific Address
- Once the Deployment is successful. It will return the Contract Address
- Copy the chain-link node address and call the setFulfillment() method with chainlink node address and boolean value true
How to Add jobs on our Node
- Start your chain link node
- From the admin dashboard, click on New Job
- Input job from above into the text field
{
"initiators": [
{
"type": "runlog",
"params": {
"address": "Your Oracle Address"
}
}
],
"tasks": [
{
"type": "httpget",
"confirmations": null,
"params": {
}
},
{
"type": "jsonparse",
"confirmations": null,
"params": {
}
},
{
"type": "ethbytes32",
"confirmations": null,
"params": {
}
},
{
"type": "ethtx",
"confirmations": null,
"params": {
}
}
],
"startAt": null,
"endAt": null
}
- While creating the job, we have to specify the oracle contract address that we got from above.
- Once the job is created, it will create the jobId which is required to execute the job
How to request Data from our Node
- After creating all the jobs we can get the data from the jobs
- In Remix, Create another smart contract to fetch the data from our node
- After creating the file, deploy the smart contract.
- After deploying the smart contract, it will provide a smart contract address
- We have to fund this address with Link so that we can call to these jobs
How to the publish node on Market
- Open Link Market
- Create your own account on Chain Link Market
- After Creating Account, Go to UserProfile
- Create the Node by clicking on create a new Node
- Fill the Required Details of Node. Oracle Address would be the address we have got when we first deploy Oracle.sol
- Once Node is created, You need to verify the on-chain verification to be visible in the market.
November 21, 2024 at 11:24 am
Your comment is awaiting moderation.