types

package
v2.4.7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateJob

type CreateJob struct {
	Job *Job `json:"job,omitempty"`
}

CreateJob is a message to create a new job. JobId is a unique identifier for the job. ChainType is the type of chain the job is for (e.g. "evm"). ChainReferenceId is the reference for the chain (e.g. "eth-main"). Definition containts the ABI of the target contract. Payload is the data to be sent to the contract. PayloadModifiable indicates whether the payload can be modified. IsMEV indicates whether the job should be routed via an MEV pool.

func (CreateJob) ValidateBasic added in v2.4.2

func (c CreateJob) ValidateBasic() error

type ExecuteJob added in v2.4.2

type ExecuteJob struct {
	JobID   string `json:"job_id"`
	Sender  string `json:"sender"`
	Payload []byte `json:"payload"`
}

ExecuteJob is a message to execute a job. JobId is the unique identifier for the job. Sender is the address of the sender. Payload is the data to be sent to the contract.

func (ExecuteJob) ValidateBasic added in v2.4.2

func (j ExecuteJob) ValidateBasic() error

type Job

type Job struct {
	JobId             string `json:"job_id"`
	ChainType         string `json:"chain_type"`
	ChainReferenceId  string `json:"chain_reference_id"`
	Definition        string `json:"definition"`
	Payload           string `json:"payload"`
	PayloadModifiable bool   `json:"payload_modifiable"`
	IsMEV             bool   `json:"is_mev"`
}

JobId is a unique identifier for the job. ChainType is the type of chain the job is for (e.g. "evm"). ChainReferenceId is the reference for the chain (e.g. "eth-main"). Definition containts the ABI of the target contract. Payload is the data to be sent to the contract. PayloadModifiable indicates whether the payload can be modified. IsMEV indicates whether the job should be routed via an MEV pool.

func (Job) ValidateBasic added in v2.4.2

func (j Job) ValidateBasic() error

type JobByIdRequest

type JobByIdRequest struct {
	JobId string `json:"job_id"`
}

type JobByIdResponse

type JobByIdResponse struct {
	Job *Job `json:"job"`
}

type Message added in v2.4.2

type Message struct {
	// Contracts can create new jobs. Any number of jobs
	// may be created, so lang as job IDs stay unique.
	CreateJob *CreateJob `json:"create_job,omitempty"`

	// Contracts can execute jobs.
	ExecuteJob *ExecuteJob `json:"execute_job,omitempty"`
}

type Query added in v2.4.2

type Query struct {
	JobById *JobByIdRequest `json:"job_id,omitempty"`
}

Jump to

Keyboard shortcuts

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