mgmtcontractlib

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 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"
	GetImportantContractKeysMethod = "GetImportantContractKeys"
	SetImportantContractsMethod    = "SetImportantContractAddress"
	GetImportantAddressMethod      = "importantContractAddresses"
)

Variables

Functions

func Base64DecodeFromString

func Base64DecodeFromString(in string) []byte

Base64DecodeFromString decodes a string to a byte array

Types

type MgmtContractLib

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

	// DecodeTx receives a *types.Transaction and converts it to a common.L1Transaction
	DecodeTx(tx *types.Transaction) ethadapter.L1Transaction
	GetContractAddr() *gethcommon.Address

	GetHostAddressesMsg() (ethereum.CallMsg, error)
	DecodeHostAddressesResponse(callResponse []byte) ([]string, error)

	SetImportantContractMsg(key string, address gethcommon.Address) (ethereum.CallMsg, error)

	GetImportantContractKeysMsg() (ethereum.CallMsg, error)
	DecodeImportantContractKeysResponse(callResponse []byte) ([]string, error)

	GetImportantAddressCallMsg(key string) (ethereum.CallMsg, error)
	DecodeImportantAddressResponse(callResponse []byte) (gethcommon.Address, error)
}

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