Encoding Params

To set the parameters for validation in the smart contract, you need an encoded bytes version of the params. BandChain comes with a utility endpoint for encoding JSON params to bytes for you.

get

http://rpc.alpha.bandchain.org/zoracle/serialize_params/:codeHash
Request
Response
Request
Path Parameters
codeHash
optional
string
Oracle Script Hash
Query Parameters
params
optional
object
JSON for Oracle Script parameters Example: { "crypto_symbol": "BTC" }
Response
200: OK
{
"result": "<SERIALIZED PARAMS STRING>"
}