Documentation ¶
Index ¶
- Constants
- func GetDataProviderRewardPerByte(c *Context, l *Logger) (sdk.Dec, error)
- func GetDataSource(c *Context, l *Logger, id types.DataSourceID) (types.DataSource, error)
- func GetEventValue(log sdk.ABCIMessageLog, evType string, evKey string) (string, error)
- func GetEventValues(log sdk.ABCIMessageLog, evType string, evKey string) (res []string)
- func GetExecutable(c *Context, l *Logger, hash string) ([]byte, error)
- func GetRawRequests(c *Context, l *Logger, log sdk.ABCIMessageLog) ([]rawRequest, error)
- func GetRequest(c *Context, l *Logger, id types.RequestID) (types.Request, error)
- func Main()
- func SubmitReport(c *Context, l *Logger, keyIndex int64, reports []ReportMsgWithKey)
- type Config
- type Context
- type FeeEstimationData
- type Logger
- type ReportMsgWithKey
- type VerificationMessage
Constants ¶
View Source
const ( // TODO: We can subscribe only for txs that contain request messages TxQuery = "tm.event = 'Tx'" // EventChannelCapacity is a buffer size of channel between node and this program EventChannelCapacity = 2000 )
TODO: refactor yoda to more consistent errors
Variables ¶
This section is empty.
Functions ¶
func GetDataProviderRewardPerByte ¶
todo for refactoring
func GetDataSource ¶
func GetDataSource(c *Context, l *Logger, id types.DataSourceID) (types.DataSource, error)
func GetEventValue ¶
GetEventValue checks and returns the exact value in the given log with the given type and key.
func GetEventValues ¶
func GetEventValues(log sdk.ABCIMessageLog, evType string, evKey string) (res []string)
GetEventValues returns the list of all values in the given log with the given type and key.
func GetExecutable ¶
GetExecutable fetches data source executable using the provided client.
func GetRawRequests ¶
func GetRawRequests(c *Context, l *Logger, log sdk.ABCIMessageLog) ([]rawRequest, error)
GetRawRequests returns the list of all raw data requests in the given log.
func GetRequest ¶
GetRequest fetches request by id
func SubmitReport ¶
func SubmitReport(c *Context, l *Logger, keyIndex int64, reports []ReportMsgWithKey)
Types ¶
type Config ¶
type Config struct { ChainID string `mapstructure:"chain-id"` // ChainID of the target chain NodeURI string `mapstructure:"node"` // Remote RPC URI of BandChain node to connect to Validator string `mapstructure:"validator"` // The validator address that I'm responsible for GasPrices string `mapstructure:"gas-prices"` // Gas prices of the transaction LogLevel string `mapstructure:"log-level"` // Log level of the logger Executor string `mapstructure:"executor"` // Executor name and URL (example: "Executor name:URL") BroadcastTimeout string `mapstructure:"broadcast-timeout"` // The time that Yoda will wait for tx commit RPCPollInterval string `mapstructure:"rpc-poll-interval"` // The duration of rpc poll interval MaxTry uint64 `mapstructure:"max-try"` // The maximum number of tries to submit a report transaction MaxReport uint64 `mapstructure:"max-report"` // The maximum number of reports in one transaction }
Config data structure for yoda daemon.
type FeeEstimationData ¶
type FeeEstimationData struct {
// contains filtered or unexported fields
}
type ReportMsgWithKey ¶
type ReportMsgWithKey struct {
// contains filtered or unexported fields
}
type VerificationMessage ¶
type VerificationMessage struct { ChainID string `json:"chain_id"` Validator sdk.ValAddress `json:"validator"` RequestID types.RequestID `json:"request_id"` ExternalID types.ExternalID `json:"external_id"` }
func NewVerificationMessage ¶
func NewVerificationMessage( chainID string, validator sdk.ValAddress, requestID types.RequestID, externalID types.ExternalID, ) VerificationMessage
func (VerificationMessage) GetSignBytes ¶
func (msg VerificationMessage) GetSignBytes() []byte
Source Files ¶
Click to show internal directories.
Click to hide internal directories.