how to read data from other Waves Oracles?

37 views Asked by At

how to read data from other Waves Oracles?

getInteger(OracleAddress, key)

key is String I don't know in what type OracleAddress i should convert to

I tried

let OracleAddress = Address("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu".toBytes())

but doesn't work

1

There are 1 answers

0
KardanovIR On

When you do toBytes() with string value you actually get bytes from UTF8 string, but in your case address is an array of bytes converted to base58, so you only need to decode it from base58:

let OracleAddress = Address(base58'3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu')
getIntegerValue(OracleAddress, key)