Documentation ¶
Index ¶
- type GovCtx
- type GovManager
- type KernMethod
- func (t *KernMethod) InitGovernTokens(ctx base.KContext) (*base.Response, error)
- func (t *KernMethod) LockGovernTokens(ctx base.KContext) (*base.Response, error)
- func (t *KernMethod) QueryAccountGovernTokens(ctx base.KContext) (*base.Response, error)
- func (t *KernMethod) TotalSupply(ctx base.KContext) (*base.Response, error)
- func (t *KernMethod) TransferGovernTokens(ctx base.KContext) (*base.Response, error)
- func (t *KernMethod) UnLockGovernTokens(ctx base.KContext) (*base.Response, error)
- type LedgerRely
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GovManager ¶
type GovManager interface { GetGovTokenBalance(accountName string) (*protos.GovernTokenBalance, error) DetermineGovTokenIfInitialized() (bool, error) }
func NewGovManager ¶
func NewGovManager(ctx *GovCtx) (GovManager, error)
NewGovManager create instance of GovManager
type KernMethod ¶
type KernMethod struct { BcName string NewGovResourceAmount int64 Predistribution []ledger.Predistribution }
func NewKernContractMethod ¶
func NewKernContractMethod(bcName string, NewGovResourceAmount int64, Predistribution []ledger.Predistribution) *KernMethod
func (*KernMethod) InitGovernTokens ¶
func (*KernMethod) LockGovernTokens ¶
func (*KernMethod) QueryAccountGovernTokens ¶
func (*KernMethod) TotalSupply ¶
func (*KernMethod) TransferGovernTokens ¶
func (*KernMethod) UnLockGovernTokens ¶
type LedgerRely ¶
type LedgerRely interface { // 从创世块获取创建合约账户消耗gas GetNewGovGas() (int64, error) // 从创世块获取创建合约账户消耗gas GetGenesisPreDistribution() ([]ledger.Predistribution, error) // 获取状态机最新确认快照 GetTipXMSnapshotReader() (ledger.SnapshotReader, error) }
type Manager ¶
type Manager struct {
Ctx *GovCtx
}
Manager manages all gov releated data, providing read/write interface
func (*Manager) DetermineGovTokenIfInitialized ¶
DetermineGovTokenIfInitialized
func (*Manager) GetGovTokenBalance ¶
func (mgr *Manager) GetGovTokenBalance(accountName string) (*protos.GovernTokenBalance, error)
GetGovTokenBalance get govern token balance of an account
Click to show internal directories.
Click to hide internal directories.