update example

This commit is contained in:
czl1378 2021-01-20 19:47:12 +08:00
parent e875a10185
commit 5b837201af
2 changed files with 11 additions and 11 deletions

View File

@ -44,7 +44,7 @@ yarn build:program
``` ```
yarn solink deploy-program yarn solink deploy-program
deployed aggregator program. program id: HFHbe2uckzz9Xh633mbJPYcukzpyJRVcwL87fUrVddiq deployed aggregator program. program id: DErMSHHbyVisohfM6miHaxstZEAxD5GBq2RrkdcXEasy
``` ```
Create the `btc:usd` feed (that accepts max and min u64 as valid submission values): Create the `btc:usd` feed (that accepts max and min u64 as valid submission values):
@ -57,7 +57,7 @@ yarn solink add-aggregator \
--maxSubmissionValue 18446744073709551615 \ --maxSubmissionValue 18446744073709551615 \
--submissionDecimals 2 --submissionDecimals 2
feed initialized, pubkey: 2jReuMRoYi3pKTF8YLnZEvT2bXcw56SdBxvssrVzu41v feed initialized, pubkey: 3aTBom2uodyWkuVPiUkwCZ2HiFywdUx9tp7su7U2H4Nx
``` ```
## Adding an oracle ## Adding an oracle
@ -85,19 +85,19 @@ Next we create a new oracle to the feed we've created previously, and set its ow
``` ```
yarn solink add-oracle \ yarn solink add-oracle \
--feedAddress 2jReuMRoYi3pKTF8YLnZEvT2bXcw56SdBxvssrVzu41v \ --feedAddress 3aTBom2uodyWkuVPiUkwCZ2HiFywdUx9tp7su7U2H4Nx \
--oracleName solink-test \ --oracleName solink-test \
--oracleOwner FosLwbttPgkEDv36VJLU3wwXcBSSoUGkh7dyZPsXNtT4 --oracleOwner FosLwbttPgkEDv36VJLU3wwXcBSSoUGkh7dyZPsXNtT4
added oracle. pubkey: 4jWLbd2Vm98RrqunVvaSXZuP1AFbgQSM2hAHMvZSdNCu added oracle. pubkey: 7bsB4v6nvHuVC5cWwRheg8opJgmvKVP27pjxiGgoXLoq
``` ```
Start submitting data from a price feed (e.g. coinbase BTC-USDT): Start submitting data from a price feed (e.g. coinbase BTC-USDT):
``` ```
yarn solink feed \ yarn solink feed \
--feedAddress 2jReuMRoYi3pKTF8YLnZEvT2bXcw56SdBxvssrVzu41v \ --feedAddress 3aTBom2uodyWkuVPiUkwCZ2HiFywdUx9tp7su7U2H4Nx \
--oracleAddress 4jWLbd2Vm98RrqunVvaSXZuP1AFbgQSM2hAHMvZSdNCu \ --oracleAddress 7bsB4v6nvHuVC5cWwRheg8opJgmvKVP27pjxiGgoXLoq \
--pairSymbol BTC/USD --pairSymbol BTC/USD
``` ```
@ -107,15 +107,15 @@ Poll the latest aggregated (median) value from a feed:
``` ```
yarn solink feed-poll \ yarn solink feed-poll \
--feedAddress 2jReuMRoYi3pKTF8YLnZEvT2bXcw56SdBxvssrVzu41v --feedAddress 3aTBom2uodyWkuVPiUkwCZ2HiFywdUx9tp7su7U2H4Nx
``` ```
## Remove oracle ## Remove oracle
``` ```
yarn solink remove-oracle \ yarn solink remove-oracle \
--feedAddress 2jReuMRoYi3pKTF8YLnZEvT2bXcw56SdBxvssrVzu41v \ --feedAddress 3aTBom2uodyWkuVPiUkwCZ2HiFywdUx9tp7su7U2H4Nx \
--oracleAddress 4jWLbd2Vm98RrqunVvaSXZuP1AFbgQSM2hAHMvZSdNCu --oracleAddress 7bsB4v6nvHuVC5cWwRheg8opJgmvKVP27pjxiGgoXLoq
``` ```
## Test Token ## Test Token

View File

@ -4,7 +4,7 @@
"secret": "7c6b942c8925723a53c2290a754b90ed173b49a0f2a4dbf1c6e593621dde535bb5d898b49db565cfb30d57e6b69af285ea49d33b2c30c50ca540f60384a57778" "secret": "7c6b942c8925723a53c2290a754b90ed173b49a0f2a4dbf1c6e593621dde535bb5d898b49db565cfb30d57e6b69af285ea49d33b2c30c50ca540f60384a57778"
}, },
"btc:usd": { "btc:usd": {
"pubkey": "6MiGDVX51qwq2qoyvWCTQHEeCUvKqgheSjRwJicxYjRr", "pubkey": "3aTBom2uodyWkuVPiUkwCZ2HiFywdUx9tp7su7U2H4Nx",
"secret": "015554435c6abd136dfca88d45563cc0845fe638c52571089e0826c29a84ebc34f98b4cef8149643ffdb8e106fd2273800d301987d1011a736686a16fa06b471" "secret": "1e9d64a5459b70310f1d47ab5b0cc38dc515b5c628d08e2e291429f5da4768792649264661c8993855340c5b0665c1d702acbf7cd12fbaa3960cfcc05313ad55"
} }
} }