Created
July 20, 2020 09:47
-
-
Save tansawit/5a73b8151fd299fa3082b6aa02ba08d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const requestID = await bandchain.submitRequestTx( | |
oracleScript, | |
{ symbol: 'BTC', multiplier: 10000 }, | |
{ minCount, askCount }, | |
mnemonic, | |
gasAmount, | |
gasLimit | |
); | |
// Get request result | |
const responseStruct = await bandchain.getRequestResult(requestID); | |
const encodedOutput = responseStruct.ResponsePacketData['result']; | |
const decodedOutput = obi.decodeOutput(Buffer.from(encodedOutput, 'base64')); | |
console.log(decodedOutput); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment