Documentation ¶
Index ¶
- type MeterGovTotalAddSub
- type MeterTotalAddSub
- type MeterTracker
- func (e *MeterTracker) AddMeter(addr meter.Address, amount *big.Int)
- func (e *MeterTracker) AddMeterGov(addr meter.Address, amount *big.Int)
- func (e *MeterTracker) AddMeterGovLocked(addr meter.Address, amount *big.Int)
- func (e *MeterTracker) AddMeterLocked(addr meter.Address, amount *big.Int)
- func (e *MeterTracker) BurnMeter(addr meter.Address, amount *big.Int) bool
- func (e *MeterTracker) BurnMeterGov(addr meter.Address, amount *big.Int)
- func (e *MeterTracker) GetInitialSupply() (init initialSupply)
- func (e *MeterTracker) GetMeter(addr meter.Address) *big.Int
- func (e *MeterTracker) GetMeterGov(addr meter.Address) *big.Int
- func (e *MeterTracker) GetMeterGovInitialSupply() *big.Int
- func (e *MeterTracker) GetMeterGovLocked(addr meter.Address) *big.Int
- func (e *MeterTracker) GetMeterGovTotalAddSub() (total MeterGovTotalAddSub)
- func (e *MeterTracker) GetMeterGovTotalBurned() *big.Int
- func (e *MeterTracker) GetMeterGovTotalSupply() *big.Int
- func (e *MeterTracker) GetMeterInitialSupply() *big.Int
- func (e *MeterTracker) GetMeterLocked(addr meter.Address) *big.Int
- func (e *MeterTracker) GetMeterTotalAddSub() (total MeterTotalAddSub)
- func (e *MeterTracker) GetMeterTotalBurned() *big.Int
- func (e *MeterTracker) GetMeterTotalSupply() *big.Int
- func (e *MeterTracker) MintMeter(addr meter.Address, amount *big.Int)
- func (e *MeterTracker) MintMeterGov(addr meter.Address, amount *big.Int)
- func (e *MeterTracker) SetInitialSupply(meterGov *big.Int, meter *big.Int)
- func (e *MeterTracker) SetMeterGovTotalAddSub(total MeterGovTotalAddSub)
- func (e *MeterTracker) SetMeterTotalAddSub(total MeterTotalAddSub)
- func (e *MeterTracker) SubMeter(addr meter.Address, amount *big.Int) bool
- func (e *MeterTracker) SubMeterGov(addr meter.Address, amount *big.Int) bool
- func (e *MeterTracker) SubMeterGovLocked(addr meter.Address, amount *big.Int) bool
- func (e *MeterTracker) SubMeterLocked(addr meter.Address, amount *big.Int) bool
- func (e *MeterTracker) Tesla1_0_SubMeterGov(addr meter.Address, amount *big.Int) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MeterGovTotalAddSub ¶
meter gov
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) 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 ¶
Sub sub amount of energy from given address. False is returned if no enough energy.
func (*MeterTracker) SubMeterGov ¶
Sub sub amount of energy from given address. False is returned if no enough energy. should consider account lock file here
func (*MeterTracker) SubMeterGovLocked ¶
Sub sub amount of energy from given address. False is returned if no enough energy.
func (*MeterTracker) SubMeterLocked ¶
Sub sub amount of energy from given address. False is returned if no enough energy.
func (*MeterTracker) Tesla1_0_SubMeterGov ¶
Sub sub amount of energy from given address. False is returned if no enough energy.