utils

package
v0.0.0-...-1a342eb Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeMessageHash

func ComputeMessageHash(
	sender common.Address,
	target common.Address,
	value *big.Int,
	messageNonce *big.Int,
	message []byte,
) common.Hash

ComputeMessageHash compute the message hash

func ConvertBigIntArrayToString

func ConvertBigIntArrayToString(array []*big.Int) string

func GetBatchRangeFromCalldataV2

func GetBatchRangeFromCalldataV2(calldata []byte) (uint64, uint64, uint64, error)

GetBatchRangeFromCalldataV2 find the block range from calldata, both inclusive.

func GetSafeBlockNumber

func GetSafeBlockNumber(ctx context.Context, client *ethclient.Client, confirmations uint64) (uint64, error)

GetSafeBlockNumber get the safe block number, which is the current block number minus the confirmations

func Keccak2

func Keccak2(a common.Hash, b common.Hash) common.Hash

Keccak2 compute the keccack256 of two concatenations of bytes32

func UnpackLog

func UnpackLog(c *abi.ABI, out interface{}, event string, log types.Log) error

UnpackLog unpacks a retrieved log into the provided output structure. @todo: add unit test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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