testutils

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestContext

func CreateTestContext(t *testing.T) sdk.Context

func GenerateProposer

func GenerateProposer(t *testing.T) (pubKey ed25519.PublicKey, privKey ed25519.PrivateKey, consAddr sdk.ConsAddress, accAddr sdk.AccAddress)

func GenerateSignatures

func GenerateSignatures(t *testing.T) (sigA, sigB []byte, evmAddr common.Address)

func SignCVE

func SignCVE(veBz []byte, height, round int64, privKey ed25519.PrivateKey) (cmtproto.CanonicalVoteExtension, []byte, []byte, error)

Types

type OperatorAndEVM

type OperatorAndEVM struct {
	OperatorAddresses []string `json:"operator_addresses"`
	EVMAddresses      []string `json:"evm_addresses"`
}

type OracleAttestations

type OracleAttestations struct {
	OperatorAddresses []string `json:"operator_addresses"`
	Attestations      [][]byte `json:"attestations"`
	Snapshots         [][]byte `json:"snapshots"`
}

type TestAccount

type TestAccount struct {
	Name    string
	Address sdk.AccAddress
}

type ValsetSignatures

type ValsetSignatures struct {
	OperatorAddresses []string `json:"operator_addresses"`
	Timestamps        []uint64 `json:"timestamps"`
	Signatures        []string `json:"signatures"`
}

type VoteExtTx

type VoteExtTx struct {
	BlockHeight        int64                    `json:"block_height"`
	OpAndEVMAddrs      OperatorAndEVM           `json:"op_and_evm_addrs"`
	ValsetSigs         ValsetSignatures         `json:"valset_sigs"`
	OracleAttestations OracleAttestations       `json:"oracle_attestations"`
	ExtendedCommitInfo *abci.ExtendedCommitInfo `json:"extended_commit_info"`
}

Jump to

Keyboard shortcuts

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