Chainlink is a decentralized oracle network that allows smart contracts to securely access external data and APIs. It provides smart contracts with data from outside sources through oracle nodes that query, verify, and authenticate external data feeds. Chainlink has built-in price feeds and adapters that allow smart contracts to request data from nodes paid in LINK tokens. The document demonstrates a smart contract using Chainlink to request ETH price data from an API and receive the response once fulfilled.
2. WHAT ARE ORACLES?
A blockchain oracle is a third-party service that provides
smart contracts with information from the outside world. It
is the layer that queries, verifies, and authenticates
external data sources, usually via trusted APIs and then
relays that information.
14. REQUESTING AN ALARM
/** * Receive the response in the form of uint256 */
event AlarmForMeetup(bytes32 _requestId, uint256 _volume);
function fulfillAlarm(bytes32 _requestId, uint256 _volume) public
recordChainlinkFulfillment(_requestId) {
alarmDone = true;
emit AlarmForMeetup( _requestId, _volume);
}
20. SMART CONTRACT CODE –
RESPONSE
/**
* Receive the response in the form of uint256
*/
function fulfill(bytes32 _requestId, uint256 _volume) public
recordChainlinkFulfillment(_requestId)
{
volume = _volume;
}
23. $LINK TOKEN
1.$LINK token is ChainLink’s native
cryptocurrency and was set up on the
Ethereum network using an ERC677
2.Chainlink nodes are paid in $LINK tokens only
3.$LINK tokens are used as collateral value
24. WANT TO LEARN MORE ABOUT
CHAINLINK?
https://www.reddit.com/r/Chainlink/
https://chainlinklabs.com/jobs