txtool

package
v1.0.3-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDelayNumber

func GetDelayNumber(current uint64, delay uint64) (num uint64)

Types

type Block

type Block struct {
	Num  hexutil.Uint64
	Hash c_type.Uint256
	Outs []Out
	Nils []c_type.Uint256
	Pkgs []localdb.ZPkg
}

type BlockChain

type BlockChain interface {
	IsValid() bool
	GetCurrenHeader() *types.Header
	GetHeader(hash *common.Hash) *types.Header
	CurrentState(hash *common.Hash) *zstate.ZState
	IsContract(address common.Address) (ret bool, e error)
	GetAxisGasLimit(to *common.Address, tfee *assets.Token, gasPrice *big.Int) (gaslimit uint64, e error)
	GetTks() []c_type.Tk
	GetTkAt(tk *c_type.Tk) uint64
	GetBlockByNumber(num uint64) *types.Block
	GetHeaderByNumber(num uint64) *types.Header
	GetDB() axisdb.Database
}

type Cmds

type Cmds struct {
	//Share
	BuyShare *stx.BuyShareCmd
	//Pool
	RegistPool *stx.RegistPoolCmd
	ClosePool  *stx.ClosePoolCmd
	//Contract
	Contract *stx.ContractCmd
	//Package
	PkgCreate   *GPkgCreateCmd
	PkgTransfer *GPkgTransferCmd
	PkgClose    *GPkgCloseCmd
}

type DOut

type DOut struct {
	Asset assets.Asset
	Memo  c_type.Uint512
	Nil   c_type.Uint256
}

type GIn

type GIn struct {
	SKr     c_type.PKr
	Out     Out
	Witness Witness
	A       *c_type.Uint256
	Ar      *c_type.Uint256
	ArOld   *c_type.Uint256
	Vskr    *c_type.Uint256
	CC      *c_type.Uint256
}

type GOut

type GOut struct {
	PKr   c_type.PKr
	Asset assets.Asset
	Memo  c_type.Uint512
	Ar    *c_type.Uint256
}

type GPkgCloseCmd

type GPkgCloseCmd struct {
	Id      c_type.Uint256
	Owner   c_type.PKr
	AssetCM c_type.Uint256
	Ar      c_type.Uint256
}

type GPkgCreateCmd

type GPkgCreateCmd struct {
	Id    c_type.Uint256
	PKr   c_type.PKr
	Asset assets.Asset
	Memo  c_type.Uint512
	Ar    c_type.Uint256
}

type GPkgTransferCmd

type GPkgTransferCmd struct {
	Id    c_type.Uint256
	Owner c_type.PKr
	PKr   c_type.PKr
}

type GTx

type GTx struct {
	Gas      hexutil.Uint64
	GasPrice hexutil.Big
	Tx       stx.T
	Hash     c_type.Uint256
	Roots    []c_type.Uint256
	Keys     []c_type.Uint256
	Bases    []c_type.Uint256
}

type GTxParam

type GTxParam struct {
	Gas      uint64
	GasPrice *big.Int
	Fee      assets.Token
	From     Kr
	Ins      []GIn
	Outs     []GOut
	Cmds     Cmds
	Z        *bool
	Num      *uint64
	IsExt    *bool
}

func (*GTxParam) GenZ

func (self *GTxParam) GenZ() (e error)

func (*GTxParam) IsSzk

func (self *GTxParam) IsSzk() (ret bool)

type Kr

type Kr struct {
	SKr c_type.PKr
	PKr c_type.PKr
}

type Out

type Out struct {
	Root  c_type.Uint256
	State localdb.RootState
}

type Ref

type Ref struct {
	Bc BlockChain
}
var Ref_inst Ref

func (*Ref) CurrentState

func (self *Ref) CurrentState() (ret *zstate.ZState)

func (*Ref) GetDelayedNum

func (self *Ref) GetDelayedNum(delay uint64) (ret uint64)

func (*Ref) SetBC

func (self *Ref) SetBC(bc BlockChain)

type TDOut

type TDOut struct {
	Asset assets.Asset
	Memo  c_type.Uint512
	Nils  []c_type.Uint256
}

type Tx

type Tx struct {
	Hash c_type.Uint256
	Tx   stx.T
}

type Witness

type Witness struct {
	Pos    hexutil.Uint64
	Paths  [c_type.DEPTH]c_type.Uint256
	Anchor c_type.Uint256
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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