shared

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressToEncodedPath

func AddressToEncodedPath(address common.Address) []byte

AddressToEncodedPath hashes an address and appends the even-number leaf flag to it

func AddressToLeafKey

func AddressToLeafKey(address common.Address) []byte

AddressToLeafKey hashes an returns an address

func CompactToHex

func CompactToHex(compact []byte) []byte

CompactToHex converts a compact encoded path to hex format

func GetTxType

func GetTxType(node ipld.Node) (uint8, error)

GetTxType returns the eth tx type

func HexToCompact

func HexToCompact(hex []byte) []byte

HexToCompact converts a hex path to the compact encoded format

func Keccak256ToCid

func Keccak256ToCid(codec uint64, h []byte) cid.Cid

Keccak256ToCid takes a keccak256 hash and returns its cid based on the codec given.

func RandomAddr

func RandomAddr() common.Address

RandomAddr returns a random address

func RandomBytes

func RandomBytes(len int) []byte

RandomBytes returns a random byte slice of the provided length

func RandomHash

func RandomHash() common.Hash

RandomHash returns a random hash

func RawToCid

func RawToCid(codec uint64, rawdata []byte) (cid.Cid, error)

RawToCid takes the desired codec and a slice of bytes and returns the proper cid of the object.

func TestAccessListReceiptNodeContents

func TestAccessListReceiptNodeContents(t *testing.T, rctNode ipld.Node, rct *types.Receipt)

TestAccessListReceiptNodeContents checks the contents of a access list rct IPLD node agaisnt a provided receipt

func TestAccessListTransactionNodeContent

func TestAccessListTransactionNodeContent(t *testing.T, txNode ipld.Node, tx *types.Transaction)

TestAccessListTransactionNodeContent checks the content of a access list tx IPLD node against a provided tx

func TestDynamicFeeReceiptNodeContents

func TestDynamicFeeReceiptNodeContents(t *testing.T, rctNode ipld.Node, rct *types.Receipt)

TestDynamicFeeReceiptNodeContents checks the contents of a dynamic fee rct IPLD node against a provided receipt

func TestDynamicFeeTransactionNodeContent

func TestDynamicFeeTransactionNodeContent(t *testing.T, txNode ipld.Node, tx *types.Transaction)

TestDynamicFeeTransactionNodeContent checks the contents a dynamic fee tx IPLD node against a provided tx

func TestLegacyReceiptNodeContents

func TestLegacyReceiptNodeContents(t *testing.T, rctNode ipld.Node, rct *types.Receipt)

TestLegacyReceiptNodeContents checks the contents of a legacy rct IPLD node against a provided receipt

func TestLegacyTransactionNodeContent

func TestLegacyTransactionNodeContent(t *testing.T, txNode ipld.Node, tx *types.Transaction)

TestLegacyTransactionNodeContent checks the contents of a legacy tx IPLD node against a provided tx

Types

type WriteableByteSlice

type WriteableByteSlice struct {
	// contains filtered or unexported fields
}

func NewWriteableByteSlice

func NewWriteableByteSlice(enc *[]byte) WriteableByteSlice

func (WriteableByteSlice) Write

func (w WriteableByteSlice) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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