Home Coins Band 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


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.



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
474FansLike
76FollowersFollow
4,567FollowersFollow
5,261FollowersFollow
1,550FollowersFollow
2,230SubscribersSubscribe
USD - United States Dollar
EUR
1.17
GBP
1.29
CHF
1.09
NOK
0.11
JPY
0.01
CAD
0.75
AUD
0.72

Most Popular

Twitter’s Jack Dorsey takes aim at Coinbase’s apolitical stance

Twitter CEO Jack Dorsey has taken major U.S. crypto exchange Coinbase to task over its open letter to employees published on Sep 28. The letter,...

Dash adjusts block reward percentage to improve the economics of its network

Dash Core Group, the entity responsible for developing the privacy-focused coin DASH, publicized fresh changes to the asset's proof-of-stake network on Sept. 30. "Dash...

Crypto Bets on the US Election Show Joe Biden Winning the Presidency by 60%

During the first half of the year, betting portals that allow people to wager cryptocurrencies on the upcoming U.S. election had shown...

ICON Development Roadmap Update — September 2020 | by ICON Foundation | Hello ICON World | Sep, 2020

ICON 2.0 Timeline and Gangnam TestnetGreetings ICONists,This month was highlighted by the announcement of our new and improved blockchain, ICON 2.0: BATANG. For the...
bitcoin
Bitcoin (BTC) $ 10,803.95
ethereum
Ethereum (ETH) $ 362.07
ripple
XRP (XRP) $ 0.241954
tether
Tether (USDT) $ 0.999984
bitcoin-cash
Bitcoin Cash (BCH) $ 228.60
bitcoin-cash-sv
Bitcoin SV (BSV) $ 174.38
litecoin
Litecoin (LTC) $ 46.40
eos
EOS (EOS) $ 2.59
binancecoin
Binance Coin (BNB) $ 29.16
okb
OKB (OKB) $ 6.20
tezos
Tezos (XTZ) $ 2.24
leo-token
LEO Token (LEO) $ 1.27
cardano
Cardano (ADA) $ 0.103270
monero
Monero (XMR) $ 111.04
stellar
Stellar (XLM) $ 0.075221
chainlink
Chainlink (LINK) $ 9.98
huobi-token
Huobi Token (HT) $ 4.62
tron
TRON (TRX) $ 0.026334
usd-coin
USD Coin (USDC) $ 0.998389
dash
Dash (DASH) $ 70.43
neo
NEO (NEO) $ 19.59
iota
IOTA (MIOTA) $ 0.286284
nem
NEM (XEM) $ 0.116609
zcash
Zcash (ZEC) $ 64.79
maker
Maker (MKR) $ 568.50
paxos-standard
Paxos Standard (PAX) $ 0.999976
ethereum-classic
Ethereum Classic (ETC) $ 5.41
vechain
VeChain (VET) $ 0.013514
true-usd
TrueUSD (TUSD) $ 1.00
ftx-token
FTX Token (FTT) $ 3.64
kucoin-shares
KuCoin Shares (KCS) $ 0.872774
waves
Waves (WAVES) $ 2.63