Documentation ¶
Overview ¶
Package types includes global types for syncer.
Index ¶
- Constants
- type ABIEntry
- type Client
- type Config
- type Context
- func (c Context) ClientContext() clientcontext.CLIContext
- func (c Context) Codec() *amino.Codec
- func (c Context) Config() Config
- func (c Context) Context() context.Context
- func (c Context) Logger() log.Logger
- func (c Context) TxBuilder() authtypes.TxBuilder
- func (c Context) WithClientContext(ctx *clientcontext.CLIContext) Context
- func (c Context) WithConfig(config *Config) Context
- func (c Context) WithContext(ctx context.Context) Context
- func (c Context) WithLogger(logger log.Logger) Context
- func (c Context) WithLoggerLabels(keyvals ...interface{}) Context
- func (c Context) WithTxBuilder(txBuilder *authtypes.TxBuilder) Context
- func (c Context) WithValue(key, value interface{}) Context
- type Primitive
- type PrimitivePayload
- type PrimitiveScore
- type Strategy
Constants ¶
const ( FlagLogLevel = "log_level" FlagConfigFile = "config" )
default Flags
const DefaultClient = "eth"
DefaultClient sets the default client chain name for tasks.
const DefaultConfigFileName = "oracle-operator.toml"
DefaultConfigFileName defines the default config file name.
const PrimitiveContractFnName = "getInsight"
PrimitiveContractFnName is Security Primitive Contract Interface function name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client string
Client corresponds to the name of the client chain as used in task, e.g. `eth` for task `eth:0x...`.
type Config ¶
type Config struct { Strategy map[Client]Strategy `mapstructure:"strategy"` Method string `mapstructure:"method"` // HTTP method, `GET` or `POST` Timeout int `mapstructure:"timeout"` RetryTimes int `mapstructure:"retry_times"` }
Config for Relayer
type Context ¶
type Context struct { *clientcontext.CLIContext // contains filtered or unexported fields }
Context define the type of data for the operator node.
func NewContext ¶
NewContext creates a new context.
func NewContextWithDefaultConfigAndLogger ¶
NewContextWithDefaultConfigAndLogger returns a new context with global configuration set from a config file.
func (Context) ClientContext ¶
func (c Context) ClientContext() clientcontext.CLIContext
ClientContext returns a copy of the certik chain client context object value.
func (Context) Codec ¶
func (c Context) Codec() *amino.Codec
Codec returns a reference to the client codec.
func (Context) WithClientContext ¶
func (c Context) WithClientContext(ctx *clientcontext.CLIContext) Context
WithClientContext returns a copy of the context with an updated CosmoSDK client context.
func (Context) WithConfig ¶
WithConfig returns a copy of the context with an updated configuration setting.
func (Context) WithContext ¶
WithContext returns a copy of the context with an updated internal context.
func (Context) WithLogger ¶
WithLogger returns a copy of the context with an updated logger.
func (Context) WithLoggerLabels ¶
WithLoggerLabels returns a copy of the context with updated logger labels.
func (Context) WithTxBuilder ¶
WithTxBuilder returns a copy of the context with an updated tx builder.
type Primitive ¶
type Primitive struct { PrimitiveContractAddr string `mapstructure:"primitive_contract_address"` Weight float32 `mapstructure:"weight"` }
Primitive specifies primitive configuration.
type PrimitivePayload ¶
type PrimitivePayload struct { Contract string `json:"contract"` // original requested contract in the event Client Client `json:"client"` // contract client chain Address string `json:"address"` // contract address Function string `json:"function"` // contract function }
PrimitivePayload specifies primitive query payload.
type PrimitiveScore ¶
PrimitiveScore groups returned score and related info from primitive.