oracle

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Oracle

type Oracle struct {
	VochainApp *vochain.BaseApplication
	// contains filtered or unexported fields
}

func NewOracle

func NewOracle(app *vochain.BaseApplication, signer *ethereum.SignKeys) (*Oracle, error)

func (*Oracle) EnableResults

func (o *Oracle) EnableResults(scr *indexer.Indexer)

func (*Oracle) NewProcess

func (o *Oracle) NewProcess(process *models.Process) ([]byte, error)

func (*Oracle) OnComputeResults

func (o *Oracle) OnComputeResults(results *results.Results, proc *indexertypes.Process, h uint32)

OnComputeResults is called once a process result is computed by the indexer. The Oracle will build and send a RESULTS transaction to the Vochain. The transaction includes the final results for the process.

func (*Oracle) OnOracleResults added in v1.2.1

func (o *Oracle) OnOracleResults(procResults *models.ProcessResult, pid []byte, height uint32)

OnOracleResults does nothing. Required for implementing the indexer EventListener interface

type OracleResults added in v1.3.0

type OracleResults struct {
	ChainID       string            `json:"chainId"`
	EntityID      types.HexBytes    `json:"entityId"`
	OracleAddress common.Address    `json:"oracleAddress"`
	ProcessID     types.HexBytes    `json:"processId"`
	Results       [][]*types.BigInt `json:"results"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL