contract

package
v0.15.9 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RequiredProverAmount         = crypto.Keccak256Hash([]byte("RequiredProverAmount"))
	VmType                       = crypto.Keccak256Hash([]byte("VmType"))
	ClientManagementContractAddr = crypto.Keccak256Hash([]byte("ClientManagementContractAddress"))
)

Functions

This section is empty.

Types

type Contract

type Contract struct {
	// contains filtered or unexported fields
}

func New

func New(db *pebble.DB, pg *postgres.Postgres, size, beginningBlockNumber uint64, chainEndpoint string, proverContractAddr, projectContractAddr common.Address, chainHeadNotifications []chan<- uint64, projectNotifications []chan<- uint64) (*Contract, error)

func (*Contract) LatestProject

func (c *Contract) LatestProject(projectID uint64) *Project

func (*Contract) LatestProjects

func (c *Contract) LatestProjects() []*Project

func (*Contract) LatestProvers

func (c *Contract) LatestProvers() []*Prover

func (*Contract) Project

func (c *Contract) Project(projectID, blockNumber uint64) *Project

func (*Contract) Prover

func (c *Contract) Prover(operator common.Address) *Prover

func (*Contract) Provers

func (c *Contract) Provers(blockNumber uint64) []*Prover

type Project

type Project struct {
	ID         uint64
	Paused     bool
	Uri        string
	Hash       common.Hash
	Attributes map[common.Hash][]byte
}

func (Project) MarshalEasyJSON

func (v Project) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Project) MarshalJSON

func (v Project) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Project) UnmarshalEasyJSON

func (v *Project) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Project) UnmarshalJSON

func (v *Project) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Prover

type Prover struct {
	ID              uint64
	OperatorAddress common.Address
	Paused          bool
	VMTypes         map[uint64]bool
}

Jump to

Keyboard shortcuts

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