Chapter 3
Estimated time: 37 mins
When interacting with BandChain, we need to send instructions to BandChain to tell it what to do. The method in which we use to send instructions is by creating messages and broadcasting them to BandChain.
In order to broadcast these messages, our online IDE, Band Builder can be used to both write the data source and deploy it.
Alternatively, our SDK's bandchain.js and pyband can also be used.
Examples on how to form a transaction to send messages on pyband can be found here and an example for bandchain.js can be found here.
There are two messages used to deploy and edit a data source, MsgCreateDataSource
and MsgEditDataSource
MsgCreateDataSource
is used to create a data source on BandChain and
contains the following parameters:
Parameter | Type | Description |
---|---|---|
Name | string | The name of the data source to be deployed |
Description | string | A description of the data source |
Executable | bytes | The content of the data source executable |
Fee | Coin | The fee to be paid per-query when this data source is used |
Treasury | string | The treasury address of which the fee is paid too |
Owner | string | The address of owner for the data source to be deployed |
Sender | string | The address of the message sender |
MsgEditDataSource
is used to modify the parameters of an existing data source on BandChain and contains the following parameters:
Parameter | Type | Description |
---|---|---|
DataSourceID | int64 | The data source identifier |
Name | string | The name of the data source to be deployed |
Description | string | A description of the data source |
Executable | bytes | The content of the data source executable |
Fee | Coin | The fee to be paid per-query when this data source is used |
Treasury | string | The treasury address of which the fee is paid too |
Owner | string | The address of owner for the data source to be deployed |
Sender | string | The address of the message sender |
where the following field can be set as ["do-not-modify]
in their respective types if no changes are required from the existing values on BandChain:
name
: "[do-not-modify]"
description
: "[do-not-modify"]"
executable
: b"[do-not-modify]"