models

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCandidateList added in v1.4.0

func GetCandidateList(epochNum uint64) (*iotextypes.CandidateListV2, error)

func GetProbationListByEpoch added in v1.4.0

func GetProbationListByEpoch(epochNum uint64) (*iotextypes.ProbationCandidateList, error)

GetProbationListByEpoch returns the probation list of an epoch.

func LoadAccountContractFlags added in v1.18.1

func LoadAccountContractFlags(addrs []string) (map[string]bool, error)

Types

type AccountActionCountType added in v1.4.2

type AccountActionCountType int
const (
	AccountActionCountErc20 AccountActionCountType = iota
	AccountActionCountErc721
	AccountActionCountAction
	AccountActionCountInner
)

func (AccountActionCountType) String added in v1.4.2

func (self AccountActionCountType) String() string

type AccountMeta added in v1.4.0

type AccountMeta struct {
	ID               uint64 `gorm:"primary_key;" sql:"type:bigint"`
	BlockHeight      uint64 `gorm:"not null;unsigned;index" sql:"type:bigint"`
	Address          string `gorm:"size:42;not null;default:'';uniqueIndex"`
	IsContract       bool   `gorm:"type:bool;not null;default:false"`
	ContractByteCode []byte
}

func (*AccountMeta) ByAddress added in v1.4.0

func (m *AccountMeta) ByAddress(addr string) error

func (AccountMeta) TableName added in v1.4.0

func (AccountMeta) TableName() string

type AccountReward added in v1.4.0

type AccountReward struct {
	ID              uint64          `gorm:"primary_key;" sql:"type:bigint"`
	BlockHeight     uint64          `gorm:"not null;unsigned;index" sql:"type:bigint"`
	EpochNumber     uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	CandidateName   string          `gorm:"size:42;index;not null"`
	BlockReward     decimal.Decimal `gorm:"type:decimal(60,0);not null"`
	EpochReward     decimal.Decimal `gorm:"type:decimal(60,0);not null"`
	FoundationBonus decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}

func (AccountReward) TableName added in v1.4.0

func (AccountReward) TableName() string

type ActionType added in v1.15.1

type ActionType struct {
	BlockHeight uint64 `gorm:"unsigned;index" sql:"type:bigint"`
	Hash        string `gorm:"primary_key;size:64;not null;index:,type:hash"`
	Type        uint   `gorm:"type:int4;unsigned;not null;default:0"`
	// accesslist tx
	AccessList datatypes.JSON `gorm:"type:jsonb"`
	// dynamic fee tx
	GasTipCap decimal.Decimal `gorm:"type:decimal(42,0)"`
	GasFeeCap decimal.Decimal `gorm:"type:decimal(42,0)"`
	// blob tx
	BlobGas      uint64          `gorm:"type:int8;unsigned"`
	BlobFeeCap   decimal.Decimal `gorm:"type:decimal(42,0)"`
	BlobHashes   pq.StringArray  `gorm:"type:text[]"`
	BlobGasPrice decimal.Decimal `gorm:"type:decimal(42,0)"`
}

func (ActionType) TableName added in v1.15.1

func (ActionType) TableName() string

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       time.Time `gorm:"type:timestamp;index:,expression:(timestamp::date)"`
	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"`
}

func (Block) TableName added in v1.3.1

func (Block) TableName() string

type BlockAction

type BlockAction struct {
	ID                 uint64          `gorm:"primary_key;index:idx_r_at_id,priority:3;" sql:"type:bigint"`
	ActionHash         string          `gorm:"size:64;not null;index:,type:hash"`
	ActionType         string          `` /* 149-byte string literal not displayed */
	BlockHeight        uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	Sender             string          `gorm:"size:42;not null;default:'';index:,type:hash;index:idx_s_at,priority:1;"`
	Recipient          string          `gorm:"size:42;not null;default:'';index:,type:hash;index:idx_r_at,priority:1;index:idx_r_at_id,priority:1;"`
	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"`
	ChainID            uint32          `gorm:"type:int4;unsigned;not null;default:0"`
	Encoding           uint32          `gorm:"type:int4;unsigned;not null;default:0"`
	Version            uint32          `gorm:"type:int4;unsigned;not null;default:0"`
	ContractAddress    string          `gorm:"size:42;not null;default:'';index:,type:hash;index:idx_ca_at,priority:1;"`
	Status             uint64          `gorm:"type:int2;unsigned;not null;default:0"`
	ExecutionRevertMsg string          `gorm:"size:255;not null;default:''"`
	Payload            []byte
	Timestamp          time.Time `gorm:"type:timestamp;index:,expression:(timestamp::date)"`
}

func (BlockAction) TableName

func (BlockAction) TableName() string

type BlockActionPartition added in v1.17.42

type BlockActionPartition struct {
	ID                 uint64          `gorm:"column:id" sql:"type:bigint"`
	ActionHash         string          `gorm:"size:64;not null"`
	ActionType         string          `gorm:"size:32;not null"`
	BlockHeight        uint64          `gorm:"unsigned" sql:"type:bigint"`
	Sender             string          `gorm:"size:42;not null;default:''"`
	Recipient          string          `gorm:"size:42;not null;default:''"`
	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"`
	ChainID            uint32          `gorm:"type:int4;unsigned;not null;default:0"`
	Encoding           uint32          `gorm:"type:int4;unsigned;not null;default:0"`
	Version            uint32          `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:''"`
	Payload            []byte
	Timestamp          time.Time `gorm:"type:timestamp"`
}

BlockActionPartition is a standalone model for the partitioned table. It intentionally avoids index tags that are unsuitable for partitioned parents.

func (BlockActionPartition) TableName added in v1.17.42

func (BlockActionPartition) TableName() string

type BlockFooter added in v1.6.10

type BlockFooter struct {
	BlockHeight uint64 `gorm:"primary_key;" sql:"type:bigint;"`
	Endorser    string `gorm:"primary_key;size:42;not null;default:'';index"`
}

func (BlockFooter) TableName added in v1.6.10

func (BlockFooter) 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:'';"`
	ExpectedProducerName    string          `gorm:"size:42;not null;default:'';"`
	ExpectedProducerAddress string          `gorm:"size:42;not null;default:'';"`
	BlockReward             decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	EpochReward             decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	FoundationBonus         decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	PriorityBonus           decimal.Decimal `gorm:"type:decimal(42,0);"`
	EpochNum                uint64          `gorm:"unsigned;index"`
	EpochHeight             uint64          `gorm:"unsigned;index"`
	BlockSize               uint64          `gorm:"unsigned;not null;default:0;"`
	BaseFee                 decimal.Decimal `gorm:"type:decimal(42,0);"`
	BlobGasUsed             uint64          `gorm:"type:int8;unsigned;"`
	ExcessBlobGas           uint64          `gorm:"type:int8;unsigned;"`
}

func (BlockMeta) TableName added in v1.3.1

func (BlockMeta) TableName() string

type BlockMetaV2 added in v1.8.59

type BlockMetaV2 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:'';"` //store owner_address, because operator_address may be changed
	ExpectedProducerName    string          `gorm:"size:42;not null;default:'';"`
	ExpectedProducerAddress string          `gorm:"size:42;not null;default:'';"`
	BlockReward             decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	EpochReward             decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	FoundationBonus         decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	EpochNum                uint64          `gorm:"unsigned;index"`
	EpochHeight             uint64          `gorm:"unsigned;index"`
	BlockSize               uint64          `gorm:"unsigned;not null;default:0;"`
}

func (BlockMetaV2) TableName added in v1.8.59

func (BlockMetaV2) TableName() string

type BlockReceipt added in v1.4.0

type BlockReceipt 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"`
	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:''"`
}

func (BlockReceipt) TableName added in v1.4.0

func (BlockReceipt) TableName() string

type BlockReceiptLog added in v1.4.0

type BlockReceiptLog 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"`
	Address            string `gorm:"size:64;not null;default:'';index:,length:9"`
	Topic0             string `gorm:"size:64;not null;default:'';index:,length:9"`
	Topic1             string `gorm:"size:64;not null;default:'';index:,length:9"`
	Topic2             string `gorm:"size:64;not null;default:'';index:,length:9"`
	Topic3             string `gorm:"size:64;not null;default:'';index:,length:9"`
	Data               []byte `gorm:"not null;"`
	Index              uint   `gorm:"type:int2;unsigned;not null;default:0"`
	TxIndex            uint   `gorm:"type:int2;unsigned;not null;default:0"`
	NotFixTopicCopyBug bool   `gorm:"type:bool;not null;default:false"`
}

func (BlockReceiptLog) TableName added in v1.4.0

func (BlockReceiptLog) TableName() string

type BlockReceiptTransaction added in v1.4.0

type BlockReceiptTransaction 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"`
	Type        string          `gorm:"size:32;not null;default:'';"`
	Amount      decimal.Decimal `gorm:"type:decimal(42,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"`
}

func (BlockReceiptTransaction) TableName added in v1.4.0

func (BlockReceiptTransaction) TableName() string

type BlockReward added in v1.4.0

type BlockReward struct {
	ID              uint64          `gorm:"primary_key;" sql:"type:bigint"`
	BlockHeight     uint64          `gorm:"not null;unsigned;index" sql:"type:bigint"`
	EpochNumber     uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	RewardAddress   string          `gorm:"size:42;index;not null"`
	ActionHash      string          `gorm:"size:64;not null;index:,length:9"`
	CandidateName   string          `gorm:"size:42;index;not null"`
	BlockReward     decimal.Decimal `gorm:"type:decimal(60,0);not null"`
	EpochReward     decimal.Decimal `gorm:"type:decimal(60,0);not null"`
	FoundationBonus decimal.Decimal `gorm:"type:decimal(60,0);not null"`
	PriorityBonus   decimal.Decimal `gorm:"type:decimal(60,0)"`
}

func (BlockReward) TableName added in v1.4.0

func (BlockReward) TableName() string

type BlockSupply added in v1.6.0

type BlockSupply struct {
	BlockHeight            uint64 `gorm:"primary_key;" sql:"type:bigint;"`
	TotalSupply            string
	TotalCirculatingSupply string
}

func (BlockSupply) TableName added in v1.6.0

func (BlockSupply) 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:'';"`
	CandidateID     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) FetchByCandidateIDWithHeight added in v1.14.24

func (m *Candidate) FetchByCandidateIDWithHeight(candidateID string, height uint64) error

func (*Candidate) FetchByName

func (m *Candidate) FetchByName(name string) (*Candidate, error)

func (*Candidate) FetchByNameWithHeight

func (m *Candidate) FetchByNameWithHeight(name string, height uint64) error

func (*Candidate) FetchByOperatorAddressWithHeight added in v1.17.28

func (m *Candidate) FetchByOperatorAddressWithHeight(operator string, height uint64, tx *gorm.DB) error

func (*Candidate) FetchByOwnerAddressWithHeight added in v1.14.24

func (m *Candidate) FetchByOwnerAddressWithHeight(owner string, height uint64) error

func (Candidate) TableName

func (Candidate) TableName() string

type CandidateList added in v1.4.0

type CandidateList struct {
	EpochNumber   uint64 `gorm:"primary_key;" sql:"type:bigint"`
	CandidateList []byte
}

func (CandidateList) TableName added in v1.4.0

func (CandidateList) TableName() string

type CandidateSelfStake added in v1.17.27

type CandidateSelfStake struct {
	BlockHeight uint64 `gorm:"not null;unsigned;index" sql:"type:bigint"`
	ActionHash  string `gorm:"size:64;not null;index:,length:9;uniqueIndex:idx_candidate_action"`
	TxIndex     int    `gorm:"not null;unsigned"`
	CandidateID string `gorm:"size:42;not null;index;uniqueIndex:idx_candidate_action"`
	BucketID    uint64 `gorm:"unsigned;index;type:numeric(20,0)"`
}

func (*CandidateSelfStake) FetchByCandidateIDWithHeight added in v1.17.28

func (m *CandidateSelfStake) FetchByCandidateIDWithHeight(candidateID string, height uint64, tx *gorm.DB) error

func (CandidateSelfStake) TableName added in v1.17.27

func (CandidateSelfStake) TableName() string

type Candidates

type Candidates []Candidate

func GetAllCandidates

func GetAllCandidates() (Candidates, error)

func (Candidates) ByCandidateID added in v1.14.31

func (m Candidates) ByCandidateID(addr string) (Candidate, 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:'';uniqueIndex"`
	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:'';"`
	Productivity    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
}

func (Delegate) TableName

func (Delegate) TableName() string

type DelegateRecord added in v1.14.35

type DelegateRecord 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:'';"`
	Productivity    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
	Timestamp       time.Time `gorm:"type:timestamp;index:,expression:(timestamp::date);default:timezone('UTC', now())"`
}

func (DelegateRecord) TableName added in v1.14.35

func (DelegateRecord) TableName() string

type Erc20Approval added in v1.4.0

type Erc20Approval 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;"`
	Owner           string          `gorm:"size:42;not null;default:'';index:,length:9"`
	Spender         string          `gorm:"size:42;not null;default:'';index:,length:9"`
	Timestamp       time.Time       `gorm:"type:timestamp;"`
}

func (Erc20Approval) TableName added in v1.4.0

func (Erc20Approval) TableName() string

type Erc20Holder added in v1.4.0

type Erc20Holder struct {
	ID              uint64 `gorm:"primary_key;" sql:"type:bigint"`
	ContractAddress string `gorm:"size:42;not null;default:'';index:,length:9"`
	Holder          string `gorm:"size:42;not null;default:'';index:,length:9"`
}

func (Erc20Holder) TableName added in v1.4.0

func (Erc20Holder) TableName() string

type Erc20Meta added in v1.13.12

type Erc20Meta struct {
	ID              uint64 `gorm:"primary_key;" sql:"type:bigint"`
	ContractAddress string `gorm:"size:42;not null;default:'';index:,length:9"`
	Name            string `gorm:"size:255;not null;default:'';"`
	Symbol          string `gorm:"size:255;not null;default:'';"`
	Decimals        int    `gorm:"not null;default:0;"`
}

func (Erc20Meta) TableName added in v1.13.12

func (Erc20Meta) TableName() string

type Erc20Transfer added in v1.4.0

type Erc20Transfer struct {
	ID              uint64          `` /* 140-byte string literal not displayed */
	BlockHeight     uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	ActionHash      string          `gorm:"size:64;not null;index:,length:9"`
	ContractAddress string          `` /* 154-byte string literal not displayed */
	Amount          decimal.Decimal `gorm:"type:decimal(128,0);not null;default:0;"`
	Sender          string          `gorm:"size:42;not null;default:'';index:,length:9;uniqueIndex:idx_ca_s_id,priority:4;"`
	Recipient       string          `gorm:"size:42;not null;default:'';index:,length:9;uniqueIndex:idx_ca_r_id,priority:4;"`
	Timestamp       time.Time       `gorm:"type:timestamp;"`
}

func (Erc20Transfer) TableName added in v1.4.0

func (Erc20Transfer) TableName() string

type Erc721Approval added in v1.4.3

type Erc721Approval 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"`
	Owner           string          `gorm:"size:42;not null;default:'';index:,length:9"`
	Approved        string          `gorm:"size:42;not null;default:'';index:,length:9"`
	TokenId         decimal.Decimal `gorm:"type:decimal(128,0);not null;default:0;"`
	Timestamp       time.Time       `gorm:"type:timestamp;"`
}

func (Erc721Approval) TableName added in v1.4.3

func (Erc721Approval) TableName() string

type Erc721ApprovalForAll added in v1.4.3

type Erc721ApprovalForAll 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"`
	Owner           string    `gorm:"size:42;not null;default:'';index:,length:9"`
	Operator        string    `gorm:"size:42;not null;default:'';index:,length:9"`
	Approved        bool      `gorm:"type:bool;not null;default:false"`
	Timestamp       time.Time `gorm:"type:timestamp;"`
}

func (Erc721ApprovalForAll) TableName added in v1.4.3

func (Erc721ApprovalForAll) TableName() string

type Erc721Holder added in v1.4.3

type Erc721Holder struct {
	ID              uint64 `gorm:"primary_key;" sql:"type:bigint"`
	ContractAddress string `gorm:"size:42;not null;default:'';index:,length:9"`
	Holder          string `gorm:"size:42;not null;default:'';index:,length:9"`
}

func (Erc721Holder) TableName added in v1.4.3

func (Erc721Holder) TableName() string

type Erc721Transfer added in v1.4.3

type Erc721Transfer 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"`
	TokenId         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;"`
}

func (Erc721Transfer) TableName added in v1.4.3

func (Erc721Transfer) TableName() string

type Erc1155ApprovalForAll added in v1.7.1

type Erc1155ApprovalForAll 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"`
	Account         string    `gorm:"size:42;not null;default:'';index:,length:9"`
	Operator        string    `gorm:"size:42;not null;default:'';index:,length:9"`
	Approved        bool      `gorm:"type:bool;not null;default:false"`
	Timestamp       time.Time `gorm:"type:timestamp;"`
}

func (Erc1155ApprovalForAll) TableName added in v1.7.1

func (Erc1155ApprovalForAll) TableName() string

type Erc1155TransferBatch added in v1.7.1

type Erc1155TransferBatch 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"`
	Operator        string `gorm:"size:42;not null;default:'';index:,length:9"`
	Sender          string `gorm:"size:42;not null;default:'';index:,length:9"`
	Recipient       string `gorm:"size:42;not null;default:'';index:,length:9"`
	IDs             []byte
	Values          []byte
	Timestamp       time.Time `gorm:"type:timestamp;"`
}

func (Erc1155TransferBatch) TableName added in v1.7.1

func (Erc1155TransferBatch) TableName() string

type Erc1155TransferSingle added in v1.7.1

type Erc1155TransferSingle 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"`
	Operator        string          `gorm:"size:42;not null;default:'';index:,length:9"`
	Sender          string          `gorm:"size:42;not null;default:'';index:,length:9"`
	Recipient       string          `gorm:"size:42;not null;default:'';index:,length:9"`
	SID             decimal.Decimal `gorm:"column:_id;type:decimal(128,0);not null;default:'0';"`
	Value           decimal.Decimal `gorm:"type:decimal(128,0);not null;default:'0';"`
	Timestamp       time.Time       `gorm:"type:timestamp;"`
}

func (Erc1155TransferSingle) TableName added in v1.7.1

func (Erc1155TransferSingle) TableName() string

type Erc1155URI added in v1.7.1

type Erc1155URI 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"`
	Value           string          `gorm:"size:128;not null;default:'';"`
	SID             decimal.Decimal `gorm:"column:_id;type:decimal(128,0);not null;default:'0';"`
	Timestamp       time.Time       `gorm:"type:timestamp;"`
}

func (Erc1155URI) TableName added in v1.7.1

func (Erc1155URI) TableName() string

type Erc1967Proxy added in v1.4.0

type Erc1967Proxy struct {
	ID            uint64 `gorm:"primary_key;" sql:"type:bigint"`
	BlockHeight   uint64 `gorm:"not null;unsigned;index" sql:"type:bigint"`
	ActionHash    string `gorm:"size:64;not null;index:,length:9"`
	ProxyAddress  string `gorm:"size:42;index;not null"`
	OriginAddress string `gorm:"size:42;index;not null"`
}

func (Erc1967Proxy) TableName added in v1.4.0

func (Erc1967Proxy) TableName() string

type Erc1155721Holder added in v1.8.2

type Erc1155721Holder struct {
	ID              uint64          `gorm:"primary_key;" sql:"type:bigint"`
	ContractAddress string          `gorm:"size:42;not null;default:'';index:,length:9;uniqueIndex:idx_contract_address_holder_token_id"`
	Holder          string          `gorm:"size:42;not null;default:'';index:,length:9;uniqueIndex:idx_contract_address_holder_token_id"`
	ErcType         uint16          `gorm:"index;default:0;"` // 1155 or 721
	TokenID         decimal.Decimal `gorm:"type:decimal(128,0);not null;default:0;uniqueIndex:idx_contract_address_holder_token_id"`
	TokenValue      decimal.Decimal `gorm:"type:decimal(128,0);not null;default:0;"`
}

func (Erc1155721Holder) TableName added in v1.8.2

func (Erc1155721Holder) TableName() string

type Erc1155721Meta added in v1.8.4

type Erc1155721Meta struct {
	ID              uint64 `gorm:"primary_key;" sql:"type:bigint"`
	ContractAddress string `gorm:"size:42;not null;default:'';uniqueIndex:,"`
	ErcType         uint16 `gorm:"index;default:0;"`
	IsSBT           bool   `gorm:"type:bool;not null;default:false"`
}

func (Erc1155721Meta) TableName added in v1.8.4

func (Erc1155721Meta) TableName() string

type HermesAccountReward added in v1.4.0

type HermesAccountReward struct {
	ID              uint64          `gorm:"primary_key;" sql:"type:bigint"`
	EpochNumber     uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	CandidateName   string          `gorm:"size:42;index;not null"`
	BlockReward     decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	EpochReward     decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	FoundationBonus decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
}

func (HermesAccountReward) TableName added in v1.4.0

func (HermesAccountReward) TableName() string

type HermesAggregateVoting added in v1.4.0

type HermesAggregateVoting struct {
	ID             uint64          `gorm:"primary_key;" sql:"type:bigint"`
	EpochNumber    uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	CandidateName  string          `gorm:"size:42;index;not null"`
	VoterAddress   string          `gorm:"size:42;index;not null"`
	NativeFlag     bool            `gorm:"type:bool;not null;default:false"`
	AggregateVotes decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}

func (HermesAggregateVoting) TableName added in v1.4.0

func (HermesAggregateVoting) TableName() string

type HermesBucketVoting added in v1.14.30

type HermesBucketVoting struct {
	ID            uint64          `gorm:"primary_key;" sql:"type:bigint"`
	EpochNumber   uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	CandidateName string          `gorm:"size:42;index;not null"`
	VoterAddress  string          `gorm:"size:42;index;not null"`
	NativeFlag    bool            `gorm:"type:bool;not null;default:false"`
	BucketID      uint64          `gorm:"unsigned;index"`
	Votes         decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}

func (HermesBucketVoting) TableName added in v1.14.30

func (HermesBucketVoting) TableName() string

type HermesDistribute added in v1.4.0

type HermesDistribute struct {
	ID              uint64          `gorm:"primary_key;" sql:"type:bigint"`
	BlockHeight     uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	EpochNumber     uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	ActionHash      string          `gorm:"size:64;not null;index:,length:9"`
	StartEpoch      uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	EndEpoch        uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	DelegateName    string          `gorm:"size:42;index;not null"`
	NumOfRecipients uint64          `gorm:"unsigned"`
	TotalAmount     decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}

func (HermesDistribute) TableName added in v1.4.0

func (HermesDistribute) TableName() string

type HermesVotingMeta added in v1.5.4

type HermesVotingMeta struct {
	EpochNumber        uint64          `gorm:"unsigned;uniqueIndex" sql:"type:bigint"`
	VotedToken         decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	DelegateCount      int             `gorm:"type:int;not null;default:0;"`
	TotalWeightedVotes decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}

func (HermesVotingMeta) TableName added in v1.5.4

func (HermesVotingMeta) TableName() string

type HermesVotingResult added in v1.4.0

type HermesVotingResult struct {
	ID                        uint64          `gorm:"primary_key;" sql:"type:bigint"`
	EpochNumber               uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	DelegateName              string          `gorm:"size:42;index;not null"`
	OperatorAddress           string          `gorm:"size:42;index;not null"`
	RewardAddress             string          `gorm:"size:42;index;not null"`
	StakingAddress            string          `gorm:"size:42;index;not null"`
	TotalWeightedVotes        decimal.Decimal `gorm:"type:decimal(60,0);not null"`
	SelfStaking               decimal.Decimal `gorm:"type:decimal(60,0);not null"`
	BlockRewardPercentage     decimal.Decimal `gorm:"type:decimal(5,2);not null"`
	EpochRewardPercentage     decimal.Decimal `gorm:"type:decimal(5,2);not null"`
	FoundationBonusPercentage decimal.Decimal `gorm:"type:decimal(5,2);not null"`
}

func (HermesVotingResult) TableName added in v1.4.0

func (HermesVotingResult) TableName() string

type IllegalAction added in v1.4.0

type IllegalAction 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"`
	Sender      string
	Recipient   string
}

func (IllegalAction) TableName added in v1.4.0

func (IllegalAction) TableName() string

type Inscription added in v1.8.59

type Inscription 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"`
	TransactionIndex uint64 `gorm:"unsigned" sql:"type:bigint"`
	MIMEType         string `gorm:"type:text;not null;default:'';"`
	Parameters       string `gorm:"type:text;not null;default:'';"`
	Extension        string `gorm:"type:text;not null;default:'';"`
	Data             string `gorm:"type:text;not null;default:'';"`
}

Inscription inscription protocol

func (Inscription) TableName added in v1.8.60

func (Inscription) TableName() string

type InscriptionHolder added in v1.8.60

type InscriptionHolder struct {
	ID              uint64    `gorm:"primary_key" sql:"type:bigint"`
	Owner           string    `gorm:"size:42;not null;index:,default:'';"`
	InscriptionHash string    `gorm:"size:64;not null;index:,length:9"`
	Timestamp       time.Time `gorm:"type:timestamp;"`
}

InscriptionHolder inscription holder

func (InscriptionHolder) TableName added in v1.8.60

func (InscriptionHolder) TableName() string

type InscriptionRaw added in v1.8.52

type InscriptionRaw 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"`
	TransactionIndex uint64    `gorm:"unsigned" sql:"type:bigint"`
	Sender           string    `gorm:"size:42;not null;default:'';index"`
	Recipient        string    `gorm:"size:42;not null;default:'';index:,length:9"`
	Timestamp        time.Time `gorm:"type:timestamp;"`

	RawData string `gorm:"type:text;not null;default:'';"`
}

InscriptionRaw all actions that can convert 'input_data' into UTF-8

func (InscriptionRaw) TableName added in v1.8.60

func (InscriptionRaw) TableName() string

type InscriptionToken added in v1.8.60

type InscriptionToken struct {
	ID          uint64    `gorm:"primary_key" sql:"type:bigint"`
	BlockHeight uint64    `gorm:"unsigned;index" sql:"type:bigint"`
	ActionHash  string    `gorm:"size:64;index;not null;,length:9"`
	Owner       string    `gorm:"size:42;index;not null;default:'';"`
	Protocol    string    `gorm:"size:255;index;not null;default:'';"`
	Tick        string    `gorm:"size:255;index;not null;default:'';"`
	Op          string    `gorm:"size:255;not null;default:'';"`
	Max         uint64    `gorm:"unsigned" sql:"type:bigint"`
	Limit       uint64    `gorm:"unsigned" sql:"type:bigint"`
	Mint        uint64    `gorm:"unsigned" sql:"type:bigint"`
	Description string    `gorm:"size:255;not null;default:'';"`
	Verified    bool      `gorm:"type:bool;not null;default:true"`
	Timestamp   time.Time `gorm:"type:timestamp;"`
}

InscriptionToken token deploy

func (InscriptionToken) TableName added in v1.8.60

func (InscriptionToken) TableName() string

type InscriptionTokenHolder added in v1.8.60

type InscriptionTokenHolder struct {
	ID        uint64    `gorm:"primary_key" sql:"type:bigint"`
	Owner     string    `gorm:"size:42;index;not null;default:'';"`
	Protocol  string    `gorm:"size:255;index;not null;default:'';"`
	Tick      string    `gorm:"size:255;index;not null;default:'';"`
	Amount    uint64    `gorm:"unsigned" sql:"type:bigint"`
	Timestamp time.Time `gorm:"type:timestamp;"`
}

func (InscriptionTokenHolder) TableName added in v1.8.60

func (InscriptionTokenHolder) TableName() string

type InscriptionTokenTransaction added in v1.8.60

type InscriptionTokenTransaction 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"`
	TransactionIndex uint64    `gorm:"unsigned" 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"`
	Timestamp        time.Time `gorm:"type:timestamp;"`
	Method           string    `gorm:"size:42;not null;default:'';"`
}

InscriptionTokenTransaction filter io-20 protocol from Inscription

func (InscriptionTokenTransaction) TableName added in v1.8.60

func (InscriptionTokenTransaction) TableName() string

type InscriptionTransfer added in v1.8.59

type InscriptionTransfer 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"`
	TransactionIndex uint64    `gorm:"unsigned" sql:"type:bigint"`
	Sender           string    `gorm:"size:42;not null;default:'';index"`
	Recipient        string    `gorm:"size:42;not null;default:'';index:,length:9"`
	Timestamp        time.Time `gorm:"type:timestamp;"`
	InscriptionHash  string    `gorm:"size:64;not null;index:,length:9"`
}

InscriptionTransfer EOA transfer & Contract transfer

func (InscriptionTransfer) TableName added in v1.8.60

func (InscriptionTransfer) TableName() string

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

func (m Probation) GetCountByEpochNum(epochNum uint64) (uint64, error)

GetCountByEpochNum returns the count of a probation candidate.

func (Probation) TableName

func (Probation) TableName() string

type RewardHistory added in v1.4.0

type RewardHistory struct {
	ID              uint64          `gorm:"primary_key;" sql:"type:bigint"`
	BlockHeight     uint64          `gorm:"not null;unsigned;index" sql:"type:bigint"`
	EpochNumber     uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	RewardAddress   string          `gorm:"size:42;index;not null"`
	ActionHash      string          `gorm:"size:64;not null;index:,length:9"`
	CandidateName   string          `gorm:"size:42;index;not null"`
	BlockReward     decimal.Decimal `gorm:"type:decimal(60,0);not null"`
	EpochReward     decimal.Decimal `gorm:"type:decimal(60,0);not null"`
	FoundationBonus decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}

func (RewardHistory) TableName added in v1.4.0

func (RewardHistory) TableName() string

type Slash added in v1.17.25

type Slash struct {
	BlockHeight     uint64          `gorm:"not null;unsigned;index;uniqueIndex:idx_block_operator" sql:"type:bigint"`
	ActionHash      string          `gorm:"size:64;not null;index:,length:9"`
	OperatorAddress string          `gorm:"size:42;index;not null;uniqueIndex:idx_block_operator"`
	CandidateID     string          `gorm:"size:42;not null;index"`
	BucketID        uint64          `gorm:"unsigned;index;type:numeric(20,0)"`
	Amount          decimal.Decimal `gorm:"type:decimal(60,0);not null"`
}

func FetchSlashByActionHash added in v1.17.32

func FetchSlashByActionHash(hash string, tx *gorm.DB) ([]Slash, error)

func (Slash) TableName added in v1.17.25

func (Slash) 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 StakingActionsShadow added in v1.17.32

type StakingActionsShadow struct {
	*StakingActions
}

func (StakingActionsShadow) TableName added in v1.17.32

func (StakingActionsShadow) TableName() string

type StakingBucket added in v1.4.0

type StakingBucket struct {
	ID                      uint64          `gorm:"primary_key;" sql:"type:bigint"`
	BucketID                uint64          `gorm:"unsigned;index"`
	BlockHeight             uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	CreateTime              int64           `gorm:"type:int4;unsigned;not null;default:0"`
	StakeStartTime          int64           `gorm:"type:int4;unsigned;not null;default:0"`
	UnstakeStartTime        int64           `gorm:"type:int4;unsigned;not null;default:0"`
	StakedAmount            decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	VotingPower             decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	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"`
	ActionHash              string          `gorm:"size:64;not null;index:,length:9"`
	EndorsementExpireHeight uint64          `gorm:"type:numeric;not null;default:0"`
	Timestamp               int64           `gorm:"type:int4;unsigned;not null;default:0"`
	AutoStake               bool
	Duration                uint32
}

func (StakingBucket) TableName added in v1.4.0

func (StakingBucket) TableName() string

type StakingBucketShadow added in v1.17.32

type StakingBucketShadow struct {
	*StakingBucket
}

func (StakingBucketShadow) TableName added in v1.17.32

func (StakingBucketShadow) TableName() string

type SystemStakingBucketRecord added in v1.14.35

type SystemStakingBucketRecord struct {
	SystemStakingBucketRecordBase
}

func (SystemStakingBucketRecord) TableName added in v1.14.35

func (SystemStakingBucketRecord) TableName() string

type SystemStakingBucketRecordBase added in v1.17.8

type SystemStakingBucketRecordBase struct {
	ID                   uint64          `gorm:"primary_key;" sql:"type:bigint"`
	BlockHeight          uint64          `gorm:"unsigned;index" sql:"type:bigint"`
	BucketID             uint64          `gorm:"unsigned;index"`
	CreateTime           int64           `gorm:"type:int4;unsigned;not null;default:0"`
	StakeStartTime       int64           `gorm:"type:int4;unsigned;not null;default:0"`
	UnstakeStartTime     int64           `gorm:"type:int4;unsigned;not null;default:0"`
	StakedAmount         decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	VotingPower          decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	OwnerAddress         string          `gorm:"size:42;not null;default:'';index:,length:9"`
	DelegateOwnerAddress string          `gorm:"size:42;not null;default:'';index:,length:9"`
	Amount               decimal.Decimal `gorm:"type:decimal(42,0);not null;default:0;"`
	EventType            string          `gorm:"size:42;not null;default:'';index"`
	Sender               string          `gorm:"size:42;not null;default:'';index:,length:9"`
	Recipient            string          `gorm:"size:42;not null;default:'';index:,length:9"`
	Timestamp            int64           `gorm:"type:int4;unsigned;not null;default:0"`
	ActHash              string
	AutoStake            bool
	Duration             uint32 // days or seconds depending on DurationType
	Final                bool   `gorm:"type:bool;not null;default:false"`
	Muted                bool   `gorm:"type:bool;not null;default:false"`
	DurationType         uint8  // 0: 5s per block in days; 1: 2.5s per block in seconds; 2: seconds in seconds
}

type SystemStakingBucketV2Record added in v1.14.35

type SystemStakingBucketV2Record struct {
	SystemStakingBucketRecordBase
}

func (SystemStakingBucketV2Record) TableName added in v1.14.35

func (SystemStakingBucketV2Record) TableName() string

type SystemStakingBucketV3Record added in v1.17.8

type SystemStakingBucketV3Record struct {
	SystemStakingBucketRecordBase
}

func (SystemStakingBucketV3Record) TableName added in v1.17.8

func (SystemStakingBucketV3Record) TableName() string

Jump to

Keyboard shortcuts

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