subnetworks

package
v0.12.17 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: ISC Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SubnetworkIDNative is the default subnetwork ID which is used for transactions without related payload data
	SubnetworkIDNative = externalapi.DomainSubnetworkID{}

	// SubnetworkIDCoinbase is the subnetwork ID which is used for the coinbase transaction
	SubnetworkIDCoinbase = externalapi.DomainSubnetworkID{1}

	// SubnetworkIDRegistry is the subnetwork ID which is used for adding new sub networks to the registry
	SubnetworkIDRegistry = externalapi.DomainSubnetworkID{2}
)

Functions

func FromBytes

func FromBytes(subnetworkIDBytes []byte) (*externalapi.DomainSubnetworkID, error)

FromBytes creates a DomainSubnetworkID from the given byte slice

func FromString

func FromString(str string) (*externalapi.DomainSubnetworkID, error)

FromString creates a DomainSubnetworkID from the given byte slice

func IsBuiltIn

func IsBuiltIn(id externalapi.DomainSubnetworkID) bool

IsBuiltIn returns true if the subnetwork is a built in subnetwork, which means all nodes, including partial nodes, must validate it, and its transactions always use 0 gas.

func IsBuiltInOrNative

func IsBuiltInOrNative(id externalapi.DomainSubnetworkID) bool

IsBuiltInOrNative returns true if the subnetwork is the native or a built in subnetwork, see IsBuiltIn for further details

func Less

Less returns true iff id a is less than id b

Types

This section is empty.

Jump to

Keyboard shortcuts

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