mgmtcontractlib

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: AGPL-3.0 Imports: 17 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

func Decompress

func Decompress(in []byte) ([]byte, error)

Decompress the byte array using gzip

Types

type MgmtContractLib

type MgmtContractLib interface {
	CreateRollup(t *ethadapter.L1RollupTx, nonce uint64) types.TxData
	CreateRequestSecret(tx *ethadapter.L1RequestSecretTx, nonce uint64) types.TxData
	CreateRespondSecret(tx *ethadapter.L1RespondSecretTx, nonce uint64, verifyAttester bool) types.TxData
	CreateInitializeSecret(tx *ethadapter.L1InitializeSecretTx, nonce uint64) 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