Documentation ¶
Index ¶
- Constants
- Variables
- func GetEventValues(log []abci.Event, evType string, evKey string) (res []string)
- func ImportKeyHexCommand() *cobra.Command
- func Main()
- func NewClient(projectId, projectSecret string) *http.Client
- func SubmitReport(c *Context, l *Logger, keyIndex int64, reports []ReportMsgWithKey)
- type Config
- type Context
- type Logger
- type ReportMsgWithKey
- type Request
- type RequestKey
- type RequestVerification
Constants ¶
View Source
const ( TxQuery = "tm.event = 'Tx' AND wasm-wasm_request.id EXISTS AND wasm-wasm_request.contract EXISTS" // EventChannelCapacity is a buffer size of channel between node and this program EventChannelCapacity = 2000 )
Variables ¶
View Source
var (
DefaultKvasirHome string
)
Global instances.
Functions ¶
func GetEventValues ¶
GetEventValues returns the list of all values in the given log with the given type and key.
func ImportKeyHexCommand ¶
func SubmitReport ¶
func SubmitReport(c *Context, l *Logger, keyIndex int64, reports []ReportMsgWithKey)
SubmitReport TODO: rework
Types ¶
type Config ¶
type Config struct { ChainID string `mapstructure:"chain-id"` // ChainID of the target chain NodeURI string `mapstructure:"node"` // Remote RPC URI of OdinChain node to connect to Validator string `mapstructure:"validator"` // The validator address that I'm responsible for ValidatorAccAddr string `mapstructure:"validator-acc"` 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 MetricsListenAddr string `mapstructure:"metrics-listen-addr"` // Address to listen on for prometheus metrics Contracts []string `mapstructure:"contracts"` IPFS string `mapstructure:"ipfs"` IPFSProjectID string `mapstructure:"ipfs_project_id"` // For Infura IPFS usage, leave empty otherwise IPFSProjectSecret string `mapstructure:"ipfs_project_secret"` GRPC string `mapstructure:"grpc"` }
type ReportMsgWithKey ¶
type ReportMsgWithKey struct {
// contains filtered or unexported fields
}
type Request ¶
type Request struct { ChosenValidators []string `json:"chosen_validators"` Metadata string `json:"metadata"` PartsReceived uint32 `json:"parts_received"` PartsRequested uint32 `json:"parts_requested"` Payed sdk.Coins `json:"payed"` RequestHeight uint64 `json:"request_Height"` RequestID uint64 `json:"request_id"` Sender string `json:"sender"` Status string `json:"status"` }
type RequestKey ¶
type RequestVerification ¶
type RequestVerification struct { ChainID string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` Validator string `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator,omitempty"` RequestID uint64 `protobuf:"varint,3,opt,name=request_id,json=requestId,proto3,casttype=RequestID" json:"request_id,omitempty"` Contract string `protobuf:"varint,4,opt,name=contract,json=externalId,proto3,casttype=ExternalID" json:"contract,omitempty"` }
func NewRequestVerification ¶
func NewRequestVerification( chainID string, validator sdk.ValAddress, requestID uint64, contract string, ) RequestVerification
func (RequestVerification) GetSignBytes ¶
func (msg RequestVerification) GetSignBytes() []byte
Source Files ¶
Click to show internal directories.
Click to hide internal directories.