name

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateName

func CreateName(scs *statedb.ContractState, tx *types.TxBody, sender, receiver *state.AccountState, name string) error

func ExecuteNameTx

func ExecuteNameTx(bs *state.BlockState, scs *statedb.ContractState, txBody *types.TxBody,
	sender, receiver *state.AccountState, blockInfo *types.BlockHeaderInfo) ([]*types.Event, error)

func GetAddress

func GetAddress(scs *statedb.ContractState, name []byte) []byte

GetAddress is resolve name for mempool

func GetAddressLegacy

func GetAddressLegacy(scs *statedb.ContractState, name []byte) []byte

GetAddressLegacy is resolve name for mempool by buggy logic, leaved for backward compatibility

func GetNameInfo

func GetNameInfo(ncs *statedb.ContractState, name string) (*types.NameInfo, error)

func GetOwner

func GetOwner(scs *statedb.ContractState, name []byte) []byte

func Resolve

func Resolve(bs *state.BlockState, name []byte, legacy bool) ([]byte, error)

Resolve is resolve name for chain

func SetContractOwner

func SetContractOwner(bs *state.BlockState, scs *statedb.ContractState,
	address string, nameState *state.AccountState) (*state.AccountState, error)

func UpdateName

func UpdateName(bs *state.BlockState, scs *statedb.ContractState, tx *types.TxBody,
	sender, receiver *state.AccountState, name, to string) error

UpdateName is avaliable after bid implement

func ValidateNameTx

func ValidateNameTx(tx *types.TxBody, sender *state.AccountState, scs *statedb.ContractState) (*types.CallInfo, error)

Types

type NameMap

type NameMap struct {
	Version     byte
	Owner       []byte
	Destination []byte
}

Jump to

Keyboard shortcuts

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