contract

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 18 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, 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
}

type Prover

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

Jump to

Keyboard shortcuts

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