Documentation
¶
Index ¶
- type Action
- type AirdripAddAsset
- type AirdripClaim
- type AirdripDrip
- type AirdripExchange
- type AirdripRedemption
- type AirdripRegistration
- type AirdripTerm
- type Block
- type BlockAction
- type BlockMeta
- type Candidate
- type Candidates
- type Delegate
- type Probation
- type StakingAction
- type StakingActions
- type TokenErc20
- type TokenErc20Holder
- type TokenErc721
- type TokenErc721Holder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶ added in v1.3.1
type Action 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"`
Sender string `gorm:"size:42;not null;default:'';index:,length:9"`
Recipient 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;"`
GasConsumed uint64 `gorm:"type:int4;unsigned;not null;default:0"`
ContractAddress string `gorm:"size:42;not null;default:'';"`
Status uint64 `gorm:"type:int2;unsigned;not null;default:0"`
ExecutionRevertMsg string `gorm:"size:255;not null;default:''"`
Timestamp time.Time `gorm:"type:timestamp;index:,expression:(timestamp::date)"`
}
type AirdripAddAsset ¶ added in v1.3.1
type AirdripAddAsset struct {
ID uint64 `gorm:"primary_key" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
Provider string `gorm:"size:42;index"`
Asset string `gorm:"size:42;index"`
Amount decimal.Decimal `gorm:"type:decimal(60,0);not null"`
EndBlock uint64 `gorm:"unsigned;index"`
Konstante uint64 `gorm:"unsigned"`
}
func (AirdripAddAsset) TableName ¶ added in v1.3.1
func (AirdripAddAsset) TableName() string
type AirdripClaim ¶ added in v1.3.1
type AirdripClaim struct {
ID uint64 `gorm:"primary_key" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
User string `gorm:"size:42;not null"`
Amount decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}
func (AirdripClaim) TableName ¶ added in v1.3.1
func (AirdripClaim) TableName() string
type AirdripDrip ¶ added in v1.3.1
type AirdripDrip struct {
ID uint64 `gorm:"primary_key" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
Asset string `gorm:"size:42;index"`
Volume decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}
func (AirdripDrip) TableName ¶ added in v1.3.1
func (AirdripDrip) TableName() string
type AirdripExchange ¶ added in v1.3.1
type AirdripExchange struct {
ID uint64 `gorm:"primary_key;" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
User string `gorm:"size:42;index;not null"`
Amount decimal.Decimal `gorm:"type:decimal(60,0);not null"`
Rate uint64 `gorm:"unsigned"`
}
func (AirdripExchange) TableName ¶ added in v1.3.1
func (AirdripExchange) TableName() string
type AirdripRedemption ¶ added in v1.3.1
type AirdripRedemption struct {
ID uint64 `gorm:"primary_key" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
User string `gorm:"size:42;index"`
Asset string `gorm:"size:42;index"`
Amount decimal.Decimal `gorm:"type:decimal(60,0);not null"`
Points decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}
func (AirdripRedemption) TableName ¶ added in v1.3.1
func (AirdripRedemption) TableName() string
type AirdripRegistration ¶ added in v1.3.1
type AirdripRegistration struct {
ID uint64 `gorm:"primary_key;" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
User string `gorm:"size:42;not null"`
ExpireAt uint64 `gorm:"unsigned;index" sql:"type:bigint"`
}
func (AirdripRegistration) TableName ¶ added in v1.3.1
func (AirdripRegistration) TableName() string
type AirdripTerm ¶ added in v1.3.1
type AirdripTerm struct {
ID uint64 `gorm:"primary_key"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
Number uint64 `gorm:"unsigned;index" sql:"type:bigint"`
Height uint64 `gorm:"unsigned;index" sql:"type:bigint"`
}
func (AirdripTerm) TableName ¶ added in v1.3.1
func (AirdripTerm) TableName() string
type Block ¶ added in v1.3.1
type Block struct {
BlockHeight uint64 `gorm:"primary_key;" sql:"type:bigint"`
BlockHash string `gorm:"size:64;not null;uniqueIndex"`
ProducerAddress string `gorm:"size:42;not null;index:,length:9"`
NumActions int `gorm:"type:int2;unsigned;not null;default:0"`
Timestamp int64 `gorm:"type:int4;unsigned;not null;default:0"`
Year int `gorm:"type:int2; unsigned;not null;default:0;index:idx_ymd"`
Month int `gorm:"type:int2; unsigned;not null;default:0;index:idx_ymd"`
Day int `gorm:"type:int2; unsigned;not null;default:0;index:idx_ymd"`
}
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 BlockMeta ¶ added in v1.3.1
type BlockMeta struct {
BlockHeight uint64 `gorm:"primary_key;" sql:"type:bigint;"`
GasConsumed uint64 `gorm:"type:int4;unsigned;not null;default:0"`
ProducerName string `gorm:"size:42;not null;default:'';"`
ProducerAddress string `gorm:"size:42;not null;default:'';"`
BlockReward decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
EpochNum uint64 `gorm:"unsigned;index"`
EpochHeight uint64 `gorm:"unsigned;index"`
}
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
type StakingActions ¶ added in v1.3.1
type StakingActions 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"`
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 (StakingActions) TableName ¶ added in v1.3.1
func (StakingActions) TableName() string
type TokenErc20 ¶ added in v1.3.1
type TokenErc20 struct {
ID uint64 `gorm:"primary_key;" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
ActionHash string `gorm:"size:64;not null;index:,length:9"`
ContractAddress string `gorm:"size:42;not null;default:'';index:,length:9"`
Amount decimal.Decimal `gorm:"type:decimal(128,0);not null;default:0;"`
Sender string `gorm:"size:42;not null;default:'';index:,length:9"`
Recipient string `gorm:"size:42;not null;default:'';index:,length:9"`
Timestamp time.Time `gorm:"type:timestamp;"`
}
type TokenErc20Holder ¶ added in v1.3.1
type TokenErc721 ¶ added in v1.3.1
type TokenErc721 struct {
ID uint64 `gorm:"primary_key;" sql:"type:bigint"`
BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
ActionHash string `gorm:"size:64;not null;index:,length:9"`
ContractAddress string `gorm:"size:42;not null;default:'';index:,length:9"`
Amount decimal.Decimal `gorm:"type:decimal(128,0);not null;default:0;"`
Sender string `gorm:"size:42;not null;default:'';index:,length:9"`
Recipient string `gorm:"size:42;not null;default:'';index:,length:9"`
Timestamp time.Time `gorm:"type:timestamp;"`
}
type TokenErc721Holder ¶ added in v1.3.1
Click to show internal directories.
Click to hide internal directories.