contractsapi

package
v0.7.3-beta2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Code generated by scapi/gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	// core-contracts smart contracts
	CheckpointManager   *artifact.Artifact
	ExitHelper          *artifact.Artifact
	StateSender         *artifact.Artifact
	RootERC20Predicate  *artifact.Artifact
	BLS                 *artifact.Artifact
	BLS256              *artifact.Artifact
	System              *artifact.Artifact
	Merkle              *artifact.Artifact
	ChildValidatorSet   *artifact.Artifact
	NativeERC20         *artifact.Artifact
	StateReceiver       *artifact.Artifact
	ChildERC20          *artifact.Artifact
	ChildERC20Predicate *artifact.Artifact
	L2StateSender       *artifact.Artifact

	TestL1StateReceiver    *artifact.Artifact
	TestWriteBlockMetadata *artifact.Artifact
	RootERC20              *artifact.Artifact
)
View Source
var BLSArtifact string = "" /* 53849-byte string literal not displayed */
View Source
var BN256G2Artifact string = "" /* 19246-byte string literal not displayed */
View Source
var CheckpointABIType = abi.MustNewType("tuple(uint256 epoch,uint256 blockNumber,bytes32 eventRoot)")
View Source
var CheckpointManagerArtifact string = "" /* 35143-byte string literal not displayed */
View Source
var CheckpointMetadataABIType = abi.MustNewType("tuple(bytes32 blockHash,uint256 blockRound,bytes32 currentValidatorSetHash)")
View Source
var ChildERC20Artifact string = "" /* 37019-byte string literal not displayed */
View Source
var ChildERC20PredicateArtifact string = "" /* 31072-byte string literal not displayed */
View Source
var ChildValidatorSetArtifact string = "" /* 134364-byte string literal not displayed */

This is auto-generated file. DO NOT EDIT.

View Source
var EpochABIType = abi.MustNewType("tuple(uint256 startBlock,uint256 endBlock,bytes32 epochRoot)")
View Source
var ExitHelperArtifact string = "" /* 15852-byte string literal not displayed */
View Source
var (

	// GetCheckpointBlockABIResponse is the ABI type for getCheckpointBlock function return value
	GetCheckpointBlockABIResponse = abi.MustNewType("tuple(bool isFound, uint256 checkpointBlock)")
)
View Source
var InitStructABIType = abi.MustNewType("tuple(uint256 epochReward,uint256 minStake,uint256 minDelegation,uint256 epochSize)")
View Source
var L2StateSenderArtifact string = "" /* 4791-byte string literal not displayed */
View Source
var MerkleArtifact string = "" /* 719-byte string literal not displayed */
View Source
var MockERC20Artifact string = "" /* 42549-byte string literal not displayed */
View Source
var NativeERC20Artifact string = "" /* 29907-byte string literal not displayed */
View Source
var RootERC20PredicateArtifact string = "" /* 28600-byte string literal not displayed */
View Source
var StateReceiverArtifact string = "" /* 31321-byte string literal not displayed */
View Source
var StateSenderArtifact string = "" /* 4784-byte string literal not displayed */
View Source
var StateSyncABIType = abi.MustNewType("tuple(uint256 id,address sender,address receiver,bytes data)")
View Source
var StateSyncCommitmentABIType = abi.MustNewType("tuple(uint256 startId,uint256 endId,bytes32 root)")
View Source
var SystemArtifact string = "" /* 3162-byte string literal not displayed */
View Source
var UptimeABIType = abi.MustNewType("tuple(uint256 epochId,tuple(address validator,uint256 signedBlocks)[] uptimeData,uint256 totalBlocks)")
View Source
var UptimeDataABIType = abi.MustNewType("tuple(address validator,uint256 signedBlocks)")
View Source
var ValidatorABIType = abi.MustNewType("tuple(address _address,uint256[4] blsKey,uint256 votingPower)")
View Source
var ValidatorInitABIType = abi.MustNewType("tuple(address addr,uint256[4] pubkey,uint256[2] signature,uint256 stake)")

Functions

This section is empty.

Types

type AddToWhitelistFunction

type AddToWhitelistFunction struct {
	WhitelistAddreses []ethgo.Address `abi:"whitelistAddreses"`
}

func (*AddToWhitelistFunction) DecodeAbi

func (a *AddToWhitelistFunction) DecodeAbi(buf []byte) error

func (*AddToWhitelistFunction) EncodeAbi

func (a *AddToWhitelistFunction) EncodeAbi() ([]byte, error)

type ApproveFunction

type ApproveFunction struct {
	Spender types.Address `abi:"spender"`
	Amount  *big.Int      `abi:"amount"`
}

func (*ApproveFunction) DecodeAbi

func (a *ApproveFunction) DecodeAbi(buf []byte) error

func (*ApproveFunction) EncodeAbi

func (a *ApproveFunction) EncodeAbi() ([]byte, error)

type Checkpoint

type Checkpoint struct {
	Epoch       *big.Int   `abi:"epoch"`
	BlockNumber *big.Int   `abi:"blockNumber"`
	EventRoot   types.Hash `abi:"eventRoot"`
}

func (*Checkpoint) DecodeAbi

func (c *Checkpoint) DecodeAbi(buf []byte) error

func (*Checkpoint) EncodeAbi

func (c *Checkpoint) EncodeAbi() ([]byte, error)

type CheckpointMetadata

type CheckpointMetadata struct {
	BlockHash               types.Hash `abi:"blockHash"`
	BlockRound              *big.Int   `abi:"blockRound"`
	CurrentValidatorSetHash types.Hash `abi:"currentValidatorSetHash"`
}

func (*CheckpointMetadata) DecodeAbi

func (c *CheckpointMetadata) DecodeAbi(buf []byte) error

func (*CheckpointMetadata) EncodeAbi

func (c *CheckpointMetadata) EncodeAbi() ([]byte, error)

type CommitEpochFunction

type CommitEpochFunction struct {
	ID     *big.Int `abi:"id"`
	Epoch  *Epoch   `abi:"epoch"`
	Uptime *Uptime  `abi:"uptime"`
}

func (*CommitEpochFunction) DecodeAbi

func (c *CommitEpochFunction) DecodeAbi(buf []byte) error

func (*CommitEpochFunction) EncodeAbi

func (c *CommitEpochFunction) EncodeAbi() ([]byte, error)

type CommitFunction

type CommitFunction struct {
	Commitment *StateSyncCommitment `abi:"commitment"`
	Signature  []byte               `abi:"signature"`
	Bitmap     []byte               `abi:"bitmap"`
}

func (*CommitFunction) DecodeAbi

func (c *CommitFunction) DecodeAbi(buf []byte) error

func (*CommitFunction) EncodeAbi

func (c *CommitFunction) EncodeAbi() ([]byte, error)

type DepositToFunction

type DepositToFunction struct {
	RootToken types.Address `abi:"rootToken"`
	Receiver  types.Address `abi:"receiver"`
	Amount    *big.Int      `abi:"amount"`
}

func (*DepositToFunction) DecodeAbi

func (d *DepositToFunction) DecodeAbi(buf []byte) error

func (*DepositToFunction) EncodeAbi

func (d *DepositToFunction) EncodeAbi() ([]byte, error)

type Epoch

type Epoch struct {
	StartBlock *big.Int   `abi:"startBlock"`
	EndBlock   *big.Int   `abi:"endBlock"`
	EpochRoot  types.Hash `abi:"epochRoot"`
}

func (*Epoch) DecodeAbi

func (e *Epoch) DecodeAbi(buf []byte) error

func (*Epoch) EncodeAbi

func (e *Epoch) EncodeAbi() ([]byte, error)

type ExecuteFunction

type ExecuteFunction struct {
	Proof []types.Hash `abi:"proof"`
	Obj   *StateSync   `abi:"obj"`
}

func (*ExecuteFunction) DecodeAbi

func (e *ExecuteFunction) DecodeAbi(buf []byte) error

func (*ExecuteFunction) EncodeAbi

func (e *ExecuteFunction) EncodeAbi() ([]byte, error)

type ExitFunction

type ExitFunction struct {
	BlockNumber  *big.Int     `abi:"blockNumber"`
	LeafIndex    *big.Int     `abi:"leafIndex"`
	UnhashedLeaf []byte       `abi:"unhashedLeaf"`
	Proof        []types.Hash `abi:"proof"`
}

func (*ExitFunction) DecodeAbi

func (e *ExitFunction) DecodeAbi(buf []byte) error

func (*ExitFunction) EncodeAbi

func (e *ExitFunction) EncodeAbi() ([]byte, error)

type GetCheckpointBlockFunction

type GetCheckpointBlockFunction struct {
	BlockNumber *big.Int `abi:"blockNumber"`
}

func (*GetCheckpointBlockFunction) DecodeAbi

func (g *GetCheckpointBlockFunction) DecodeAbi(buf []byte) error

func (*GetCheckpointBlockFunction) EncodeAbi

func (g *GetCheckpointBlockFunction) EncodeAbi() ([]byte, error)

type InitStruct

type InitStruct struct {
	EpochReward   *big.Int `abi:"epochReward"`
	MinStake      *big.Int `abi:"minStake"`
	MinDelegation *big.Int `abi:"minDelegation"`
	EpochSize     *big.Int `abi:"epochSize"`
}

func (*InitStruct) DecodeAbi

func (i *InitStruct) DecodeAbi(buf []byte) error

func (*InitStruct) EncodeAbi

func (i *InitStruct) EncodeAbi() ([]byte, error)

type InitializeCheckpointManagerFunction

type InitializeCheckpointManagerFunction struct {
	NewBls          types.Address `abi:"newBls"`
	NewBn256G2      types.Address `abi:"newBn256G2"`
	ChainID_        *big.Int      `abi:"chainId_"`
	NewValidatorSet []*Validator  `abi:"newValidatorSet"`
}

func (*InitializeCheckpointManagerFunction) DecodeAbi

func (i *InitializeCheckpointManagerFunction) DecodeAbi(buf []byte) error

func (*InitializeCheckpointManagerFunction) EncodeAbi

func (i *InitializeCheckpointManagerFunction) EncodeAbi() ([]byte, error)

type InitializeChildERC20PredicateFunction

type InitializeChildERC20PredicateFunction struct {
	NewL2StateSender          types.Address `abi:"newL2StateSender"`
	NewStateReceiver          types.Address `abi:"newStateReceiver"`
	NewRootERC20Predicate     types.Address `abi:"newRootERC20Predicate"`
	NewChildTokenTemplate     types.Address `abi:"newChildTokenTemplate"`
	NewNativeTokenRootAddress types.Address `abi:"newNativeTokenRootAddress"`
}

func (*InitializeChildERC20PredicateFunction) DecodeAbi

func (i *InitializeChildERC20PredicateFunction) DecodeAbi(buf []byte) error

func (*InitializeChildERC20PredicateFunction) EncodeAbi

func (i *InitializeChildERC20PredicateFunction) EncodeAbi() ([]byte, error)

type InitializeChildValidatorSetFunction

type InitializeChildValidatorSetFunction struct {
	Init       *InitStruct      `abi:"init"`
	Validators []*ValidatorInit `abi:"validators"`
	NewBls     types.Address    `abi:"newBls"`
	Governance types.Address    `abi:"governance"`
}

func (*InitializeChildValidatorSetFunction) DecodeAbi

func (i *InitializeChildValidatorSetFunction) DecodeAbi(buf []byte) error

func (*InitializeChildValidatorSetFunction) EncodeAbi

func (i *InitializeChildValidatorSetFunction) EncodeAbi() ([]byte, error)

type InitializeNativeERC20Function

type InitializeNativeERC20Function struct {
	Predicate_ types.Address `abi:"predicate_"`
	RootToken_ types.Address `abi:"rootToken_"`
	Name_      string        `abi:"name_"`
	Symbol_    string        `abi:"symbol_"`
	Decimals_  uint8         `abi:"decimals_"`
}

func (*InitializeNativeERC20Function) DecodeAbi

func (i *InitializeNativeERC20Function) DecodeAbi(buf []byte) error

func (*InitializeNativeERC20Function) EncodeAbi

func (i *InitializeNativeERC20Function) EncodeAbi() ([]byte, error)

type InitializeRootERC20PredicateFunction

type InitializeRootERC20PredicateFunction struct {
	NewStateSender         types.Address `abi:"newStateSender"`
	NewExitHelper          types.Address `abi:"newExitHelper"`
	NewChildERC20Predicate types.Address `abi:"newChildERC20Predicate"`
	NewChildTokenTemplate  types.Address `abi:"newChildTokenTemplate"`
	NativeTokenRootAddress types.Address `abi:"nativeTokenRootAddress"`
}

func (*InitializeRootERC20PredicateFunction) DecodeAbi

func (i *InitializeRootERC20PredicateFunction) DecodeAbi(buf []byte) error

func (*InitializeRootERC20PredicateFunction) EncodeAbi

func (i *InitializeRootERC20PredicateFunction) EncodeAbi() ([]byte, error)

type L2StateSyncedEvent

type L2StateSyncedEvent struct {
	ID       *big.Int      `abi:"id"`
	Sender   types.Address `abi:"sender"`
	Receiver types.Address `abi:"receiver"`
	Data     []byte        `abi:"data"`
}

func (*L2StateSyncedEvent) ParseLog

func (l *L2StateSyncedEvent) ParseLog(log *ethgo.Log) error

type MintFunction

type MintFunction struct {
	To     types.Address `abi:"to"`
	Amount *big.Int      `abi:"amount"`
}

func (*MintFunction) DecodeAbi

func (m *MintFunction) DecodeAbi(buf []byte) error

func (*MintFunction) EncodeAbi

func (m *MintFunction) EncodeAbi() ([]byte, error)

type NewCommitmentEvent

type NewCommitmentEvent struct {
	StartID *big.Int   `abi:"startId"`
	EndID   *big.Int   `abi:"endId"`
	Root    types.Hash `abi:"root"`
}

func (*NewCommitmentEvent) ParseLog

func (n *NewCommitmentEvent) ParseLog(log *ethgo.Log) error

type RegisterFunction

type RegisterFunction struct {
	Signature [2]*big.Int `abi:"signature"`
	Pubkey    [4]*big.Int `abi:"pubkey"`
}

func (*RegisterFunction) DecodeAbi

func (r *RegisterFunction) DecodeAbi(buf []byte) error

func (*RegisterFunction) EncodeAbi

func (r *RegisterFunction) EncodeAbi() ([]byte, error)

type StateSync

type StateSync struct {
	ID       *big.Int      `abi:"id"`
	Sender   types.Address `abi:"sender"`
	Receiver types.Address `abi:"receiver"`
	Data     []byte        `abi:"data"`
}

func (*StateSync) DecodeAbi

func (s *StateSync) DecodeAbi(buf []byte) error

func (*StateSync) EncodeAbi

func (s *StateSync) EncodeAbi() ([]byte, error)

type StateSyncCommitment

type StateSyncCommitment struct {
	StartID *big.Int   `abi:"startId"`
	EndID   *big.Int   `abi:"endId"`
	Root    types.Hash `abi:"root"`
}

func (*StateSyncCommitment) DecodeAbi

func (s *StateSyncCommitment) DecodeAbi(buf []byte) error

func (*StateSyncCommitment) EncodeAbi

func (s *StateSyncCommitment) EncodeAbi() ([]byte, error)

type StateSyncResultEvent

type StateSyncResultEvent struct {
	Counter *big.Int `abi:"counter"`
	Status  bool     `abi:"status"`
	Message []byte   `abi:"message"`
}

func (*StateSyncResultEvent) ParseLog

func (s *StateSyncResultEvent) ParseLog(log *ethgo.Log) error

type StateSyncedEvent

type StateSyncedEvent struct {
	ID       *big.Int      `abi:"id"`
	Sender   types.Address `abi:"sender"`
	Receiver types.Address `abi:"receiver"`
	Data     []byte        `abi:"data"`
}

func (*StateSyncedEvent) EncodeAbi

func (sse *StateSyncedEvent) EncodeAbi() ([]byte, error)

ToABI converts StateSyncEvent to ABI

func (*StateSyncedEvent) ParseLog

func (s *StateSyncedEvent) ParseLog(log *ethgo.Log) error

type StateTransactionInput

type StateTransactionInput interface {
	// EncodeAbi contains logic for encoding arbitrary data into ABI format
	EncodeAbi() ([]byte, error)
	// DecodeAbi contains logic for decoding given ABI data
	DecodeAbi(b []byte) error
}

StateTransactionInput is an abstraction for different state transaction inputs

type SubmitFunction

type SubmitFunction struct {
	CheckpointMetadata *CheckpointMetadata `abi:"checkpointMetadata"`
	Checkpoint         *Checkpoint         `abi:"checkpoint"`
	Signature          [2]*big.Int         `abi:"signature"`
	NewValidatorSet    []*Validator        `abi:"newValidatorSet"`
	Bitmap             []byte              `abi:"bitmap"`
}

func (*SubmitFunction) DecodeAbi

func (s *SubmitFunction) DecodeAbi(buf []byte) error

func (*SubmitFunction) EncodeAbi

func (s *SubmitFunction) EncodeAbi() ([]byte, error)

type SyncStateFunction

type SyncStateFunction struct {
	Receiver types.Address `abi:"receiver"`
	Data     []byte        `abi:"data"`
}

func (*SyncStateFunction) DecodeAbi

func (s *SyncStateFunction) DecodeAbi(buf []byte) error

func (*SyncStateFunction) EncodeAbi

func (s *SyncStateFunction) EncodeAbi() ([]byte, error)

type Uptime

type Uptime struct {
	EpochID     *big.Int      `abi:"epochId"`
	UptimeData  []*UptimeData `abi:"uptimeData"`
	TotalBlocks *big.Int      `abi:"totalBlocks"`
}

func (*Uptime) AddValidatorUptime

func (u *Uptime) AddValidatorUptime(address types.Address, count int64)

AddValidatorUptime is an extension (helper) function on a generated Uptime type that adds uptime data for given validator to Uptime struct

func (*Uptime) DecodeAbi

func (u *Uptime) DecodeAbi(buf []byte) error

func (*Uptime) EncodeAbi

func (u *Uptime) EncodeAbi() ([]byte, error)

type UptimeData

type UptimeData struct {
	Validator    types.Address `abi:"validator"`
	SignedBlocks *big.Int      `abi:"signedBlocks"`
}

func (*UptimeData) DecodeAbi

func (u *UptimeData) DecodeAbi(buf []byte) error

func (*UptimeData) EncodeAbi

func (u *UptimeData) EncodeAbi() ([]byte, error)

type Validator

type Validator struct {
	Address     types.Address `abi:"_address"`
	BlsKey      [4]*big.Int   `abi:"blsKey"`
	VotingPower *big.Int      `abi:"votingPower"`
}

func (*Validator) DecodeAbi

func (v *Validator) DecodeAbi(buf []byte) error

func (*Validator) EncodeAbi

func (v *Validator) EncodeAbi() ([]byte, error)

type ValidatorInit

type ValidatorInit struct {
	Addr      types.Address `abi:"addr"`
	Pubkey    [4]*big.Int   `abi:"pubkey"`
	Signature [2]*big.Int   `abi:"signature"`
	Stake     *big.Int      `abi:"stake"`
}

func (*ValidatorInit) DecodeAbi

func (v *ValidatorInit) DecodeAbi(buf []byte) error

func (*ValidatorInit) EncodeAbi

func (v *ValidatorInit) EncodeAbi() ([]byte, error)

type WithdrawToFunction

type WithdrawToFunction struct {
	ChildToken types.Address `abi:"childToken"`
	Receiver   types.Address `abi:"receiver"`
	Amount     *big.Int      `abi:"amount"`
}

func (*WithdrawToFunction) DecodeAbi

func (w *WithdrawToFunction) DecodeAbi(buf []byte) error

func (*WithdrawToFunction) EncodeAbi

func (w *WithdrawToFunction) EncodeAbi() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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