Documentation ¶
Index ¶
- func AnyArgsToJson(args []any) ([]string, error)
- func CanonicalizeJSON(in []byte) ([]byte, error)
- func JsonArgsToAny(methodName string, jsonArgs []string, abiJSON []byte) ([]any, error)
- type Call
- type Config
- type ContractCallEvent
- type Engine
- func (e *Engine) CallSpec(ctx context.Context, id string, atBlock uint64) (Result, error)
- func (e *Engine) EnsureChainID(chainID string, confirmWithClient bool)
- func (e *Engine) GetEthTime(ctx context.Context, atBlock uint64) (uint64, error)
- func (e *Engine) GetInitialTriggerTime(id string) (uint64, error)
- func (e *Engine) GetRequiredConfirmations(id string) (uint64, error)
- func (e *Engine) GetSpec(id string) (common.Spec, bool)
- func (e *Engine) MakeResult(specID string, bytes []byte) (Result, error)
- func (e *Engine) OnSpecActivated(ctx context.Context, spec datasource.Spec) error
- func (e *Engine) OnSpecDeactivated(ctx context.Context, spec datasource.Spec)
- func (e *Engine) Poll(ctx context.Context, wallTime time.Time)
- func (e *Engine) ReloadConf(cfg Config)
- func (e *Engine) Start()
- func (e *Engine) StartAtHeight(height uint64, time uint64)
- func (e *Engine) Stop()
- type EthReaderCaller
- type Forwarder
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyArgsToJson ¶
AnyArgsToJson does the inverse of the JsonArgsToAny; takes a list of arguments in go types and marshals them to a list of JSON strings.
func CanonicalizeJSON ¶
func JsonArgsToAny ¶
JsonArgsToAny takes a list of arguments marshalled as JSON strings. It then uses the ethereum ABI to convert each JSON argument into the go type which corresponds to the ethereum type defined in the ABI for that argument.
Types ¶
type Call ¶
type Call struct {
// contains filtered or unexported fields
}
func (Call) Spec ¶
func (c Call) Spec() ethcallcommon.Spec
type Config ¶
func NewDefaultConfig ¶
func NewDefaultConfig() Config
type ContractCallEvent ¶
type ContractCallEvent struct { BlockHeight uint64 BlockTime uint64 SpecId string Result []byte Error *string SourceChainID *uint64 }
func EthereumContractCallResultFromProto ¶
func EthereumContractCallResultFromProto( qr *vegapb.EthContractCallEvent, ) (ContractCallEvent, error)
func (ContractCallEvent) Hash ¶
func (q ContractCallEvent) Hash() string
func (*ContractCallEvent) IntoProto ¶
func (q *ContractCallEvent) IntoProto() *vegapb.EthContractCallEvent
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) EnsureChainID ¶ added in v0.74.0
EnsureChainID tells the engine which chainID it should be related to, and it confirms this against the its client.
func (*Engine) GetEthTime ¶
func (*Engine) GetInitialTriggerTime ¶
func (*Engine) GetRequiredConfirmations ¶
func (*Engine) MakeResult ¶
func (*Engine) OnSpecActivated ¶
func (*Engine) OnSpecDeactivated ¶
func (e *Engine) OnSpecDeactivated(ctx context.Context, spec datasource.Spec)
func (*Engine) Poll ¶
Poll is called by the poller in it's own goroutine; it isn't part of the abci code path.
func (*Engine) ReloadConf ¶
func (*Engine) Start ¶
func (e *Engine) Start()
Start starts the polling of the Ethereum bridges, listens to the events they emit and forward it to the network.
func (*Engine) StartAtHeight ¶
type EthReaderCaller ¶
type Forwarder ¶
type Forwarder interface {
ForwardFromSelf(*commandspb.ChainEvent)
}