Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockAction ¶
type BlockAction struct {
ID uint64 `gorm:"primary_key;" sql:"type:bigint"`
ActionHash string `gorm:"size:64;not null;index:,length:9"`
ActionType string `gorm:"size:32;not null;index"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
From string `gorm:"size:42;not null;default:'';index:,length:9"`
To string `gorm:"size:42;not null;default:'';index:,length:9"`
GasPrice decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
GasLimit uint64 `gorm:"type:int4;unsigned;not null;default:0"`
Nonce uint64 `gorm:"type:int8;unsigned;not null;default:0"`
Amount decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
}
func (BlockAction) TableName ¶
func (BlockAction) TableName() string
type Candidate ¶
type Candidate struct {
ID uint64 `gorm:"primary_key;" sql:"type:bigint"`
BlockHeight uint64 `gorm:"not null;unsigned;index" sql:"type:bigint"`
Name string `gorm:"size:42;not null;default:'';index"`
OperatorAddress string `gorm:"size:42;not null;default:'';"`
RewardAddress string `gorm:"size:42;not null;default:'';"`
OwnerAddress string `gorm:"size:42;not null;default:'';"`
Amount decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
Duration uint32 `gorm:"not null;" sql:"type:bigint"`
ActType string
AutoStake bool
Payload []byte
}
func (*Candidate) FetchByNameWithHeight ¶
type Candidates ¶
type Candidates []Candidate
func GetAllCandidates ¶
func GetAllCandidates() (Candidates, error)
func (Candidates) ByOwnerAddress ¶
func (m Candidates) ByOwnerAddress(addr string) (Candidate, error)
type Delegate ¶
type Delegate struct {
ID uint64 `gorm:"primary_key;" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
OperatorAddress string `gorm:"size:42;not null;default:'';"`
RewardAddress string `gorm:"size:42;not null;default:'';"`
OwnerAddress string `gorm:"size:42;not null;default:'';"`
Candidate string `gorm:"size:42;not null;default:'';"`
Active bool `gorm:"type:bool;not null;default:false"`
Name string `gorm:"size:42;not null;default:'';"`
// Rank int `gorm:"type:int2;unsigned;not null;default:0"`
StakeAmount decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
VoteWeight decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
Probated bool `gorm:"type:bool;not null;default:false"`
SelfStake bool
}
type Probation ¶
type Probation struct {
ID uint64 `gorm:"primary_key;" sql:"type:bigint"`
BlockHeight uint64 `gorm:"not null;unsigned;index" sql:"type:bigint"`
EpochNumber uint64 `gorm:"not null;unsigned;index" sql:"type:bigint"`
Address string `gorm:"size:42;not null;default:'';"`
IntensityRate uint32 `gorm:"type:int;not null;default:0;"`
Count uint64 `gorm:"not null;" sql:"type:bigint"`
}
func (Probation) GetCountByEpochNum ¶
type StakingAction ¶
type StakingAction struct {
ID uint64 `gorm:"primary_key;" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
BucketID uint64 `gorm:"unsigned;index"`
OwnerAddress string `gorm:"size:42;not null;default:'';index:,length:9"`
Candidate string `gorm:"size:42;not null;default:'';index:,length:9"`
ForwardTo string `gorm:"size:42;not null;default:'';"` //store Governace Forward To Address
Amount decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
ActType string `gorm:"size:42;not null;default:'';index"`
Sender string `gorm:"size:42;not null;default:'';index:,length:9"`
ActHash string
AutoStake bool
Duration uint32
}
func (StakingAction) TableName ¶
func (StakingAction) TableName() string
Click to show internal directories.
Click to hide internal directories.