Reputation: 1
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
Upvotes: 0
Views: 33
Reputation: 492
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)
Upvotes: 1