feemanager

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: GPL-3.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetFeeManagerName

func SetFeeManagerName(name common.Name)

SetFeeManagerName set fee manager name

Types

type AssetFee

type AssetFee struct {
	AssetID   uint64   `json:"assetID"`
	TotalFee  *big.Int `json:"totalFee"`
	RemainFee *big.Int `json:"remainFee"`
}

AssetFee asset fee

type FeeManager

type FeeManager struct {
	// contains filtered or unexported fields
}

FeeManager account fee manager

func NewFeeManager

func NewFeeManager(state *state.StateDB, accountDB *am.AccountManager) *FeeManager

NewFeeManager new fee manager

func (*FeeManager) GetFeeCounter

func (fm *FeeManager) GetFeeCounter() (uint64, error)

GetFeeCounter get cur fee counter

func (*FeeManager) GetObjectFeeByID

func (fm *FeeManager) GetObjectFeeByID(objectFeeID uint64) (*ObjectFee, error)

GetObjectFeeByID get object fee by id

func (*FeeManager) GetObjectFeeByName

func (fm *FeeManager) GetObjectFeeByName(objectName string, objectType uint64) (*ObjectFee, error)

GetObjectFeeByName get object fee by name

func (*FeeManager) RecordFeeInSystem

func (fm *FeeManager) RecordFeeInSystem(objectName string, objectType uint64, assetID uint64, value *big.Int) error

RecordFeeInSystem record object fee in system

func (*FeeManager) WithdrawFeeFromSystem

func (fm *FeeManager) WithdrawFeeFromSystem(objectName string, objectType uint64) (*WithdrawInfo, error)

WithdrawFeeFromSystem withdraw object fee in system, return withdraw info

type ObjectFee

type ObjectFee struct {
	ObjectFeeID uint64      `json:"objectFeeID"`
	ObjectType  uint64      `json:"objectType"`
	ObjectName  string      `json:"objectName"`
	AssetFees   []*AssetFee `json:"assetFees"`
}

ObjectFee object's fee

type ObjectFeeResult

type ObjectFeeResult struct {
	Continue   bool         `json:"continue"`
	ObjectFees []*ObjectFee `json:"objectFees"`
}

ObjectFeeResult multi object fee result

type WithdrawAsset

type WithdrawAsset struct {
	AssetID uint64
	Amount  *big.Int
}

WithdrawAsset withdraw asset info

type WithdrawInfo

type WithdrawInfo struct {
	ObjectName string
	ObjectType uint64
	Founder    common.Name
	AssetInfo  []*WithdrawAsset
}

WithdrawInfo record withdraw info

Jump to

Keyboard shortcuts

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