HomeCoinsBand Protocol (BAND)Integrating Band’s Oracle into Your User Interface | by Sawit Trisirisatayawong |...

Integrating Band’s Oracle into Your User Interface | by Sawit Trisirisatayawong | Band Protocol | Aug, 2020

- Advertisement -


Throughout this article, we will be writing a few code snippets to demonstrate how a web application can utilize oracle data as reported by BandChain.

The application consists of two components:

  • A cron-requester backend service that periodically makes requests to BandChain’s oracle for the price of the various cryptocurrencies.
  • The web page itself then retrieves the results of those requests and shows it accordingly. This is the part that we will be focusing on in this article.

1) Specifying the Required Parameters

  • oracleScriptID: The ID of the oracle script executed to make the request
  • params: The input parameters to that oracle script. This includes the cryptocurrency symbol to query, the method to aggregate the results from BandChain’s validators, and the multiplier to multiply the aggregated result by
  • askCount: The number of validators that were requested to respond to the request
  • minCount: The minimum number of validators necessary for the request to proceed to the execution phase

2) Retrieving the Matching Request Results from BandChain

Decentralized applications are created with interdependent elements, we have the back-end, which is responsible for logic and behavior, and the front-end which is for users to interact with the application. It’s critical that all layers in decentralized applications are indeed, decentralized.

20201016023142aff i?offer id=10&file id=543&aff id=26183

Read the original article here

- Advertisement -
Mr Bitcointe
Mr Bitcointehttps://www.bitcointe.com/
“Fact You Need To Know About Cryptocurrency - The first Bitcoin purchase was for pizza.” ― Mohsin Jameel
471FansLike
76FollowersFollow
4,567FollowersFollow
5,261FollowersFollow
1,278FollowersFollow
2,230SubscribersSubscribe

Most Popular

bitcoin
Bitcoin (BTC) $ 62,405.00
ethereum
Ethereum (ETH) $ 2,493.55
tether
Tether (USDT) $ 1.00
bitcoin-cash
Bitcoin Cash (BCH) $ 1,143.83
litecoin
Litecoin (LTC) $ 323.18
eos
EOS (EOS) $ 8.45
okb
OKB (OKB) $ 19.37
tezos
Tezos (XTZ) $ 7.46
leo-token
LEO Token (LEO) $ 2.27
cardano
Cardano (ADA) $ 1.44
monero
Monero (XMR) $ 357.07
stellar
Stellar (XLM) $ 0.615835
chainlink
Chainlink (LINK) $ 43.10
huobi-token
Huobi Token (HT) $ 20.34
tron
TRON (TRX) $ 0.176601
usd-coin
USD Coin (USDC) $ 0.999584
dash
Dash (DASH) $ 383.25
neo
NEO (NEO) $ 93.63
iota
IOTA (MIOTA) $ 2.48
nem
NEM (XEM) $ 0.459654
zcash
Zcash (ZEC) $ 279.31
maker
Maker (MKR) $ 3,598.55
paxos-standard
Paxos Standard (PAX) $ 0.999296
ethereum-classic
Ethereum Classic (ETC) $ 45.47
vechain
VeChain (VET) $ 0.237192
true-usd
TrueUSD (TUSD) $ 1.00
ftx-token
FTX Token (FTT) $ 54.28
kucoin-shares
KuCoin Token (KCS) $ 13.49
waves
Waves (WAVES) $ 16.27