contract

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Contract

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

func New

func New(epoch uint64, chainEndpoint string, proverContractAddress, projectContractAddress, blockNumberContractAddress, multiCallContractAddress common.Address, chainHeadNotifications []chan<- uint64, projectNotifications []chan<- *Project) (*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
	BlockNumber uint64
	Paused      *bool
	Uri         string
	Hash        common.Hash
	Attributes  map[common.Hash][]byte
}

type Prover

type Prover struct {
	ID              uint64
	OperatorAddress common.Address
	BlockNumber     uint64
	Paused          *bool
	NodeTypes       uint64
}

Jump to

Keyboard shortcuts

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