-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.sh
63 lines (46 loc) · 1.47 KB
/
notes.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
fetchBatchPrices().then(prices => console.log("Batch Prices:", prices));
fetchDerivativePrices().then(prices => console.log("Derivative Batch Prices:", prices));
fetchSTKDExchangeRate().then(exchangeRate => console.log("stkd-SCRT Exchange Rate:", exchangeRate));
fetchGovernanceProposals().then(price => console.log("Governance Proposals:", proposals));
window.fetchGovernanceProposals().then(console.log).catch(console.error);
fetchAllRedemptionRates()
.then(rates => console.log('All Redemption Rates:', rates))
.catch(err => console.error('Error:', err));
fetchRedemptionRates()
.then(rates => console.log('Host Zone Redemption Rates:', rates))
.catch(err => console.error('Error:', err));
fetchRedemptionRateForTIA()
.then(rate => console.log('Redemption Rate for TIA:', rate))
.catch(err => console.error('Error:', err));
#Graph QL Endpoint
https://prodv1.securesecrets.org/graphql
#Query Tokens
query {
tokens {
id
name
symbol
description
logoPath
PriceToken {
priceId
}
}
}
#Query Price of specific token
query {
prices(query: { ids: ["563526c3-2187-4f3a-a41b-813f599bf59c"] }) {
id
value
}
}
fetchAllTokenPricesWithNames();
##Test Voting From console
#Connect Wallet
await window.connectKeplrWallet();
#Test Fetching Props
const proposals = await window.fetchGovernanceProposals();
console.log(proposals);
#Vote on Proposal
const result = await window.voteOnProposal(313, "Yes");
console.log(result);