hvm

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopyTx

func DeepCopyTx(src, dst *schema.Transaction) error

func FindProposal

func FindProposal(proposals []*schema.Proposal, proposalID string) *schema.Proposal

func InSlice

func InSlice(slice []string, item string) bool

func NewExecutor

func NewExecutor(source string) (executor *schema.Executor, err error)

func NewProposal

func NewProposal(name string, start, end, runTimes int64, source, initData string, onlyAcceptedTxActions []string, executor *schema.Executor) *schema.Proposal

func ProposalExecute

func ProposalExecute(proposal *schema.Proposal, tx *schema.Transaction, state *schema.StateForProposal, oracle *schema.Oracle) (*schema.StateForProposal, error)

func RemoveFromSlice

func RemoveFromSlice(slice []string, item string) []string

func TxCallParamsVerify

func TxCallParamsVerify(txParams string) (proposalID, function, callParams string, err error)

func TxJoinParamsVerify

func TxJoinParamsVerify(txParams string) (routerState *schema.RouterState, err error)

func TxProposeParamsVerify

func TxProposeParamsVerify(params schema.TxProposeParams) (
	start, end, runTimes int64, source, initData string,
	onlyAcceptedTxActions []string, err error)

func TxStakeParamsVerify

func TxStakeParamsVerify(txParams string) (stakePool string, amount *big.Int, err error)

func TxTransferParamsVerify

func TxTransferParamsVerify(txParams string) (to string, amount *big.Int, err error)

func TxUnstakeParamsVerify

func TxUnstakeParamsVerify(txParams string) (stakePool string, amount *big.Int, err error)

Types

type HVM

type HVM struct {
	schema.State
}

func New

func New(initState schema.State) (h *HVM)

func (*HVM) ExecuteTx

func (h *HVM) ExecuteTx(tx schema.Transaction, oracle *schema.Oracle) (err error)

func (*HVM) ProposalVerify

func (h *HVM) ProposalVerify(tx schema.Transaction, nonce int64) (*schema.Proposal, error)

func (*HVM) TxVerify

func (h *HVM) TxVerify(tx schema.Transaction, dryRun bool) (acc *account.Account, nonce int64, fee *big.Int, err error)

func (*HVM) VerifyTx

func (h *HVM) VerifyTx(tx schema.Transaction, oracle *schema.Oracle) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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