utils

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: LGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BYTE_FALSE = []byte{0}
	BYTE_TRUE  = []byte{1}

	HeaderSyncContractAddress, _        = common.AddressParseFromBytes([]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02})
	CrossChainManagerContractAddress, _ = common.AddressParseFromBytes([]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03})
	SideChainManagerContractAddress, _  = common.AddressParseFromBytes([]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04})
	NodeManagerContractAddress, _       = common.AddressParseFromBytes([]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05})
	RelayerManagerContractAddress, _    = common.AddressParseFromBytes([]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06})
	Neo3StateManagerContractAddress, _  = common.AddressParseFromBytes([]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07})
	ReplenishContractAddress, _         = common.AddressParseFromBytes([]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09})

	VOTE_ROUTER             = uint64(0)
	BTC_ROUTER              = uint64(1)
	ETH_ROUTER              = uint64(2)
	ONT_ROUTER              = uint64(3)
	NEO_ROUTER              = uint64(4)
	COSMOS_ROUTER           = uint64(5)
	BSC_ROUTER              = uint64(6)
	HECO_ROUTER             = uint64(7)
	QUORUM_ROUTER           = uint64(8)
	ZILLIQA_LEGACY_ROUTER   = uint64(9)
	MSC_ROUTER              = uint64(10)
	NEO3_LEGACY_ROUTER      = uint64(11)
	OKEX_ROUTER             = uint64(12)
	NEO3_ROUTER             = uint64(14)
	POLYGON_HEIMDALL_ROUTER = uint64(15)
	POLYGON_BOR_ROUTER      = uint64(16)
	ZILLIQA_ROUTER          = uint64(17)
	STARCOIN_ROUTER         = uint64(18)
	PIXIECHAIN_ROUTER       = uint64(19)
)

Functions

func ConcatKey

func ConcatKey(contract common.Address, args ...[]byte) []byte

func GenUInt32StorageItem

func GenUInt32StorageItem(value uint32) *cstates.StorageItem

func GenUInt64StorageItem

func GenUInt64StorageItem(value uint64) *cstates.StorageItem

func GenVarBytesStorageItem

func GenVarBytesStorageItem(value []byte) *cstates.StorageItem

func GetBytesUint32

func GetBytesUint32(b []byte) uint32

func GetBytesUint64

func GetBytesUint64(b []byte) uint64

func GetStorageItem

func GetStorageItem(native *native.NativeService, key []byte) (*cstates.StorageItem, error)

func GetStorageUInt32

func GetStorageUInt32(native *native.NativeService, key []byte) (uint32, error)

func GetStorageUInt64

func GetStorageUInt64(native *native.NativeService, key []byte) (uint64, error)

func GetStorageVarBytes

func GetStorageVarBytes(native *native.NativeService, key []byte) ([]byte, error)

func GetUint32Bytes

func GetUint32Bytes(num uint32) []byte

func GetUint64Bytes

func GetUint64Bytes(num uint64) []byte

func PutBytes

func PutBytes(native *native.NativeService, key []byte, value []byte)

func ValidateOwner

func ValidateOwner(native *native.NativeService, address common.Address) error

func ValidatePeerPubKeyFormat

func ValidatePeerPubKeyFormat(pubkey string) error

Types

type BtcNetType

type BtcNetType int
const (
	TyTestnet3 BtcNetType = iota
	TyRegtest
	TySimnet
	TyMainnet
)

Jump to

Keyboard shortcuts

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