mgmtcontractlib

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddRollupMethod        = "AddRollup"
	RespondSecretMethod    = "RespondNetworkSecret"
	RequestSecretMethod    = "RequestNetworkSecret"
	InitializeSecretMethod = "InitializeNetworkSecret" //#nosec
	GetHostAddressesMethod = "GetHostAddresses"
)

Variables

Functions

func Base64DecodeFromString

func Base64DecodeFromString(in string) []byte

Base64DecodeFromString decodes a string to a byte array

Types

type MgmtContractLib

type MgmtContractLib interface {
	CreateRollup(t *ethadapter.L1RollupTx) types.TxData
	CreateRequestSecret(tx *ethadapter.L1RequestSecretTx) types.TxData
	CreateRespondSecret(tx *ethadapter.L1RespondSecretTx, verifyAttester bool) types.TxData
	CreateInitializeSecret(tx *ethadapter.L1InitializeSecretTx) types.TxData
	GetHostAddresses() (ethereum.CallMsg, error)

	// DecodeTx receives a *types.Transaction and converts it to an common.L1Transaction
	DecodeTx(tx *types.Transaction) ethadapter.L1Transaction
	// DecodeCallResponse unpacks a call response into a slice of strings.
	DecodeCallResponse(callResponse []byte) ([][]string, error)
	GetContractAddr() *gethcommon.Address
}

MgmtContractLib provides methods for creating ethereum transactions by providing an L1Transaction, creating call messages for call requests, and converting ethereum transactions into L1Transactions.

func NewMgmtContractLib

func NewMgmtContractLib(addr *gethcommon.Address, logger gethlog.Logger) MgmtContractLib

Jump to

Keyboard shortcuts

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