metertracker

package
v0.0.0-...-71e40f4 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MeterGovTotalAddSub

type MeterGovTotalAddSub struct {
	TotalAdd *big.Int
	TotalSub *big.Int
}

meter gov

type MeterTotalAddSub

type MeterTotalAddSub struct {
	TotalAdd *big.Int
	TotalSub *big.Int
}

meter

type MeterTracker

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

MeterTracker implementations

func New

func New(addr meter.Address, state *state.State) *MeterTracker

New creates a new energy instance.

func (*MeterTracker) AddMeter

func (e *MeterTracker) AddMeter(addr meter.Address, amount *big.Int)

Add add amount of energy to given address.

func (*MeterTracker) AddMeterGov

func (e *MeterTracker) AddMeterGov(addr meter.Address, amount *big.Int)

func (*MeterTracker) AddMeterGovLocked

func (e *MeterTracker) AddMeterGovLocked(addr meter.Address, amount *big.Int)

func (*MeterTracker) AddMeterLocked

func (e *MeterTracker) AddMeterLocked(addr meter.Address, amount *big.Int)

Add add amount of energy to given address.

func (*MeterTracker) BurnMeter

func (e *MeterTracker) BurnMeter(addr meter.Address, amount *big.Int) bool

func (*MeterTracker) BurnMeterGov

func (e *MeterTracker) BurnMeterGov(addr meter.Address, amount *big.Int)

func (*MeterTracker) GetInitialSupply

func (e *MeterTracker) GetInitialSupply() (init initialSupply)

GetInitialSupply

func (*MeterTracker) GetMeter

func (e *MeterTracker) GetMeter(addr meter.Address) *big.Int

///////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////// Meter Gov

func (*MeterTracker) GetMeterGov

func (e *MeterTracker) GetMeterGov(addr meter.Address) *big.Int

///// Meter Gov /////////////////

func (*MeterTracker) GetMeterGovInitialSupply

func (e *MeterTracker) GetMeterGovInitialSupply() *big.Int

MeterGov: Initial supply of Meter Gov.

func (*MeterTracker) GetMeterGovLocked

func (e *MeterTracker) GetMeterGovLocked(addr meter.Address) *big.Int

func (*MeterTracker) GetMeterGovTotalAddSub

func (e *MeterTracker) GetMeterGovTotalAddSub() (total MeterGovTotalAddSub)

MTR Gov totalAddSub

func (*MeterTracker) GetMeterGovTotalBurned

func (e *MeterTracker) GetMeterGovTotalBurned() *big.Int

Meter Gov: TotalBurned returns Meter Gov totally burned.

func (*MeterTracker) GetMeterGovTotalSupply

func (e *MeterTracker) GetMeterGovTotalSupply() *big.Int

Meter Gov: GetMeterGovTotalSupply returns total supply of Meter Gov.

func (*MeterTracker) GetMeterInitialSupply

func (e *MeterTracker) GetMeterInitialSupply() *big.Int

Meter: Initial supply of Meter.

func (*MeterTracker) GetMeterLocked

func (e *MeterTracker) GetMeterLocked(addr meter.Address) *big.Int

func (*MeterTracker) GetMeterTotalAddSub

func (e *MeterTracker) GetMeterTotalAddSub() (total MeterTotalAddSub)

MTR totalAddSub

func (*MeterTracker) GetMeterTotalBurned

func (e *MeterTracker) GetMeterTotalBurned() *big.Int

Meter: TotalBurned returns Meter totally burned.

func (*MeterTracker) GetMeterTotalSupply

func (e *MeterTracker) GetMeterTotalSupply() *big.Int

Meter: GetMeterTotalSupply returns total supply of Meter.

func (*MeterTracker) MintMeter

func (e *MeterTracker) MintMeter(addr meter.Address, amount *big.Int)

func (*MeterTracker) MintMeterGov

func (e *MeterTracker) MintMeterGov(addr meter.Address, amount *big.Int)

func (*MeterTracker) SetInitialSupply

func (e *MeterTracker) SetInitialSupply(meterGov *big.Int, meter *big.Int)

SetInitialSupply: set initial meter and meter gov supply.

func (*MeterTracker) SetMeterGovTotalAddSub

func (e *MeterTracker) SetMeterGovTotalAddSub(total MeterGovTotalAddSub)

func (*MeterTracker) SetMeterTotalAddSub

func (e *MeterTracker) SetMeterTotalAddSub(total MeterTotalAddSub)

func (*MeterTracker) SubMeter

func (e *MeterTracker) SubMeter(addr meter.Address, amount *big.Int) bool

Sub sub amount of energy from given address. False is returned if no enough energy.

func (*MeterTracker) SubMeterGov

func (e *MeterTracker) SubMeterGov(addr meter.Address, amount *big.Int) bool

Sub sub amount of energy from given address. False is returned if no enough energy. should consider account lock file here

func (*MeterTracker) SubMeterGovLocked

func (e *MeterTracker) SubMeterGovLocked(addr meter.Address, amount *big.Int) bool

Sub sub amount of energy from given address. False is returned if no enough energy.

func (*MeterTracker) SubMeterLocked

func (e *MeterTracker) SubMeterLocked(addr meter.Address, amount *big.Int) bool

Sub sub amount of energy from given address. False is returned if no enough energy.

func (*MeterTracker) Tesla1_0_SubMeterGov

func (e *MeterTracker) Tesla1_0_SubMeterGov(addr meter.Address, amount *big.Int) bool

Sub sub amount of energy from given address. False is returned if no enough energy.

Jump to

Keyboard shortcuts

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