Documentation
¶
Index ¶
- type AverageTaxRateSubmission
- type AverageTaxSubmissions
- type BridgeEvent
- type BridgeTransaction
- type Checkpoint
- type Epoch
- type EpochAPYSnapshot
- type EpochAPYSnapshots
- type EpochItems
- type EpochTrigger
- type EpochTriggers
- type Epochs
- type Node
- type NodeAPYSnapshot
- type NodeAPYSnapshots
- type NodeEvent
- type NodeEvents
- type NodeInvalidResponse
- type NodeInvalidResponses
- type NodeRewardRecord
- type NodeSnapshot
- type Nodes
- type OperatorProfitSnapshot
- type OperatorProfitSnapshots
- type StakeChip
- type StakeEvent
- type StakeStaking
- type StakeTransaction
- type StakerCountSnapshot
- type StakerProfitSnapshot
- type StakerProfitSnapshots
- type Stat
- type Stats
- type Worker
- type Workers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AverageTaxRateSubmission ¶
type AverageTaxRateSubmission struct {
ID uint64 `gorm:"id"`
EpochID uint64 `gorm:"epoch_id"`
AverageTaxRate decimal.Decimal `gorm:"average_tax_rate"`
TransactionHash string `gorm:"transaction_hash"`
CreatedAt time.Time `gorm:"created_at"`
UpdatedAt time.Time `gorm:"updated_at"`
}
func (*AverageTaxRateSubmission) Export ¶
func (a *AverageTaxRateSubmission) Export() (*schema.AverageTaxRateSubmission, error)
func (*AverageTaxRateSubmission) Import ¶
func (a *AverageTaxRateSubmission) Import(submission *schema.AverageTaxRateSubmission) error
func (*AverageTaxRateSubmission) TableName ¶
func (a *AverageTaxRateSubmission) TableName() string
type AverageTaxSubmissions ¶
type AverageTaxSubmissions []AverageTaxRateSubmission
func (*AverageTaxSubmissions) Export ¶
func (a *AverageTaxSubmissions) Export() ([]*schema.AverageTaxRateSubmission, error)
func (*AverageTaxSubmissions) Import ¶
func (a *AverageTaxSubmissions) Import(submissions []*schema.AverageTaxRateSubmission) error
type BridgeEvent ¶
type BridgeEvent struct {
ID string `gorm:"column:id"`
Type string `gorm:"column:type"`
TransactionHash string `gorm:"column:transaction_hash;primaryKey"`
TransactionIndex uint `gorm:"column:transaction_index"`
TransactionStatus uint64 `gorm:"column:transaction_status"`
ChainID uint64 `gorm:"column:chain_id"`
BlockHash string `gorm:"column:block_hash;primaryKey"`
BlockNumber uint64 `gorm:"column:block_number"`
BlockTimestamp time.Time `gorm:"column:block_timestamp"`
Finalized bool `gorm:"column:finalized"`
}
func (*BridgeEvent) Export ¶
func (b *BridgeEvent) Export() (*schema.BridgeEvent, error)
func (*BridgeEvent) Import ¶
func (b *BridgeEvent) Import(bridgeEvent schema.BridgeEvent) error
func (*BridgeEvent) TableName ¶
func (b *BridgeEvent) TableName() string
type BridgeTransaction ¶
type BridgeTransaction struct {
ID string `gorm:"column:id;primaryKey"`
Type string `gorm:"column:type;primaryKey"`
Sender string `gorm:"column:sender"`
Receiver string `gorm:"column:receiver"`
TokenAddressL1 *string `gorm:"column:token_address_l1"`
TokenAddressL2 *string `gorm:"column:token_address_l2"`
TokenValue decimal.Decimal `gorm:"column:token_value"`
Data string `gorm:"column:data"`
ChainID uint64 `gorm:"column:chain_id"`
BlockTimestamp time.Time `gorm:"column:block_timestamp"`
BlockNumber uint64 `gorm:"column:block_number"`
TransactionIndex uint `gorm:"column:transaction_index"`
Finalized bool `gorm:"column:finalized"`
}
func (*BridgeTransaction) Export ¶
func (b *BridgeTransaction) Export() (*schema.BridgeTransaction, error)
func (*BridgeTransaction) Import ¶
func (b *BridgeTransaction) Import(bridgeTransaction schema.BridgeTransaction) error
func (*BridgeTransaction) TableName ¶
func (b *BridgeTransaction) TableName() string
type Checkpoint ¶
type Checkpoint struct {
ChainID uint64 `gorm:"column:chain_id"`
BlockNumber uint64 `gorm:"column:block_number"`
BlockHash string `gorm:"column:block_hash"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
func (*Checkpoint) Export ¶
func (c *Checkpoint) Export() (*schema.Checkpoint, error)
func (*Checkpoint) Import ¶
func (c *Checkpoint) Import(checkpoint schema.Checkpoint) error
func (*Checkpoint) TableName ¶
func (c *Checkpoint) TableName() string
type Epoch ¶
type Epoch struct {
ID uint64 `gorm:"column:id;primaryKey"`
StartTimestamp time.Time `gorm:"column:start_timestamp"`
EndTimestamp time.Time `gorm:"column:end_timestamp"`
TransactionHash string `gorm:"column:transaction_hash"`
TransactionIndex uint `gorm:"column:transaction_index"`
BlockHash string `gorm:"column:block_hash"`
BlockNumber uint64 `gorm:"column:block_number"`
BlockTimestamp time.Time `gorm:"column:block_timestamp"`
TotalOperationRewards decimal.Decimal `gorm:"column:total_operation_rewards"`
TotalStakingRewards decimal.Decimal `gorm:"column:total_staking_rewards"`
TotalRewardedNodes int `gorm:"column:total_rewarded_nodes"`
TotalRequestCounts decimal.Decimal `gorm:"column:total_request_counts"`
Finalized bool `gorm:"column:finalized"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
type EpochAPYSnapshot ¶
type EpochAPYSnapshot struct {
EpochID uint64 `gorm:"column:epoch_id"`
Date time.Time `gorm:"column:date"`
APY decimal.Decimal `gorm:"column:apy"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
func (*EpochAPYSnapshot) Export ¶
func (e *EpochAPYSnapshot) Export() (*schema.EpochAPYSnapshot, error)
func (*EpochAPYSnapshot) Import ¶
func (e *EpochAPYSnapshot) Import(epochAPYSnapshot *schema.EpochAPYSnapshot) error
func (*EpochAPYSnapshot) TableName ¶
func (e *EpochAPYSnapshot) TableName() string
type EpochAPYSnapshots ¶
type EpochAPYSnapshots []EpochAPYSnapshot
func (*EpochAPYSnapshots) Export ¶
func (e *EpochAPYSnapshots) Export() ([]*schema.EpochAPYSnapshot, error)
func (*EpochAPYSnapshots) Import ¶
func (e *EpochAPYSnapshots) Import(snapshots []*schema.EpochAPYSnapshot) error
type EpochItems ¶
type EpochItems []*NodeRewardRecord
func (*EpochItems) Export ¶
func (e *EpochItems) Export() ([]*schema.RewardedNode, error)
func (*EpochItems) Import ¶
func (e *EpochItems) Import(nodesToReward []*schema.RewardedNode) error
type EpochTrigger ¶
type EpochTrigger struct {
TransactionHash string `gorm:"column:transaction_hash"`
EpochID uint64 `gorm:"column:epoch_id"`
Data json.RawMessage `gorm:"column:data"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
func (*EpochTrigger) Export ¶
func (e *EpochTrigger) Export() (*schema.EpochTrigger, error)
func (*EpochTrigger) Import ¶
func (e *EpochTrigger) Import(epochTrigger *schema.EpochTrigger) (err error)
func (*EpochTrigger) TableName ¶
func (e *EpochTrigger) TableName() string
type EpochTriggers ¶
type EpochTriggers []*EpochTrigger
func (EpochTriggers) Export ¶
func (e EpochTriggers) Export() ([]*schema.EpochTrigger, error)
type Node ¶
type Node struct {
Address common.Address `gorm:"column:address;primaryKey"`
NodeID uint64 `gorm:"column:id"`
Endpoint string `gorm:"column:endpoint"`
HideTaxRate bool `gorm:"column:hide_tax_rate"`
IsPublicGood bool `gorm:"column:is_public_good"`
Stream json.RawMessage `gorm:"column:stream"`
Config json.RawMessage `gorm:"column:config;type:jsonb"`
Status schema.NodeStatus `gorm:"column:status"`
LastHeartbeatTimestamp time.Time `gorm:"column:last_heartbeat_timestamp"`
Location json.RawMessage `gorm:"column:location;type:jsonb"`
Avatar json.RawMessage `gorm:"column:avatar;type:jsonb"`
APY decimal.Decimal `gorm:"column:apy"`
Version string `gorm:"column:version"`
Type string `gorm:"column:type"`
AccessToken string `gorm:"column:access_token"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
type NodeAPYSnapshot ¶
type NodeAPYSnapshot struct {
ID uint64 `gorm:"column:id"`
Date time.Time `gorm:"column:date"`
EpochID uint64 `gorm:"column:epoch_id"`
NodeAddress common.Address `gorm:"column:node_address"`
APY decimal.Decimal `gorm:"column:apy"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
func (*NodeAPYSnapshot) Export ¶
func (s *NodeAPYSnapshot) Export() (*schema.NodeAPYSnapshot, error)
func (*NodeAPYSnapshot) Import ¶
func (s *NodeAPYSnapshot) Import(nodeAPYSnapshot *schema.NodeAPYSnapshot) error
func (*NodeAPYSnapshot) TableName ¶
func (s *NodeAPYSnapshot) TableName() string
type NodeAPYSnapshots ¶
type NodeAPYSnapshots []NodeAPYSnapshot
func (*NodeAPYSnapshots) Import ¶
func (s *NodeAPYSnapshots) Import(snapshots []*schema.NodeAPYSnapshot) error
type NodeEvent ¶
type NodeEvent struct {
TransactionHash string `gorm:"column:transaction_hash"`
TransactionIndex uint `gorm:"column:transaction_index"`
NodeID uint64 `gorm:"column:node_id"`
AddressFrom common.Address `gorm:"column:address_from"`
AddressTo common.Address `gorm:"column:address_to"`
Type schema.NodeEventType `gorm:"column:type"`
LogIndex uint `gorm:"column:log_index"`
ChainID uint64 `gorm:"column:chain_id"`
BlockHash string `gorm:"column:block_hash"`
BlockNumber uint64 `gorm:"column:block_number"`
BlockTimestamp time.Time `gorm:"column:block_timestamp"`
Metadata json.RawMessage `gorm:"column:metadata"`
Finalized bool `gorm:"column:finalized"`
}
type NodeEvents ¶
type NodeEvents []*NodeEvent
type NodeInvalidResponse ¶
type NodeInvalidResponse struct {
ID uint64 `gorm:"id;primaryKey"`
EpochID uint64 `gorm:"column:epoch_id"`
Type schema.NodeInvalidResponseType `gorm:"column:type"`
Request string `gorm:"column:request"`
VerifierNodes pq.ByteaArray `gorm:"column:verifier_nodes;type:bytea[]"`
VerifierResponse json.RawMessage `gorm:"column:verifier_response;type:jsonb"`
Node common.Address `gorm:"column:node"`
Response json.RawMessage `gorm:"column:response;type:jsonb"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
func (*NodeInvalidResponse) Export ¶
func (n *NodeInvalidResponse) Export() *schema.NodeInvalidResponse
func (*NodeInvalidResponse) Import ¶
func (n *NodeInvalidResponse) Import(nodeInvalidResponse *schema.NodeInvalidResponse)
func (*NodeInvalidResponse) TableName ¶
func (*NodeInvalidResponse) TableName() string
type NodeInvalidResponses ¶
type NodeInvalidResponses []NodeInvalidResponse
func (*NodeInvalidResponses) Import ¶
func (ns *NodeInvalidResponses) Import(nodeInvalidResponses []*schema.NodeInvalidResponse)
type NodeRewardRecord ¶
type NodeRewardRecord struct {
EpochID uint64 `gorm:"column:epoch_id;"`
Index int `gorm:"column:index;primaryKey"`
TransactionHash string `gorm:"column:transaction_hash;primaryKey"`
NodeAddress string `gorm:"column:node_address"`
OperationRewards decimal.Decimal `gorm:"column:operation_rewards"`
StakingRewards decimal.Decimal `gorm:"column:staking_rewards"`
TaxCollected decimal.Decimal `gorm:"column:tax_collected"`
RequestCount decimal.Decimal `gorm:"column:request_count"`
}
NodeRewardRecord stores rewards information for a Node in an Epoch
func (*NodeRewardRecord) Export ¶
func (e *NodeRewardRecord) Export() (*schema.RewardedNode, error)
func (*NodeRewardRecord) Import ¶
func (e *NodeRewardRecord) Import(nodeToReward *schema.RewardedNode) error
func (*NodeRewardRecord) TableName ¶
func (e *NodeRewardRecord) TableName() string
type NodeSnapshot ¶
func (*NodeSnapshot) Export ¶
func (s *NodeSnapshot) Export() (*schema.NodeSnapshot, error)
func (*NodeSnapshot) Import ¶
func (s *NodeSnapshot) Import(stakeSnapshot schema.NodeSnapshot) error
func (*NodeSnapshot) TableName ¶
func (s *NodeSnapshot) TableName() string
type OperatorProfitSnapshot ¶
type OperatorProfitSnapshot struct {
ID uint64 `gorm:"column:id"`
Date time.Time `gorm:"column:date"`
EpochID uint64 `gorm:"column:epoch_id"`
Operator common.Address `gorm:"column:operator"`
OperationPool decimal.Decimal `gorm:"column:operation_pool"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
FIXME: OperatorProfit -> NodeOperationProfit
func (*OperatorProfitSnapshot) Export ¶
func (s *OperatorProfitSnapshot) Export() (*schema.OperatorProfitSnapshot, error)
func (*OperatorProfitSnapshot) Import ¶
func (s *OperatorProfitSnapshot) Import(snapshot schema.OperatorProfitSnapshot) error
func (*OperatorProfitSnapshot) TableName ¶
func (s *OperatorProfitSnapshot) TableName() string
type OperatorProfitSnapshots ¶
type OperatorProfitSnapshots []OperatorProfitSnapshot
func (*OperatorProfitSnapshots) Export ¶
func (s *OperatorProfitSnapshots) Export() ([]*schema.OperatorProfitSnapshot, error)
func (*OperatorProfitSnapshots) Import ¶
func (s *OperatorProfitSnapshots) Import(snapshots []*schema.OperatorProfitSnapshot) error
type StakeChip ¶
type StakeChip struct {
ID decimal.Decimal `gorm:"column:id"`
Owner string `gorm:"column:owner"`
Node string `gorm:"column:node"`
Value decimal.Decimal `gorm:"column:value"`
Metadata json.RawMessage `gorm:"column:metadata"`
BlockNumber decimal.Decimal `gorm:"column:block_number"`
BlockTimestamp time.Time `gorm:"column:block_timestamp"`
Finalized bool `gorm:"column:finalized"`
}
type StakeEvent ¶
type StakeEvent struct {
ID string `gorm:"column:id"`
Type string `gorm:"column:type"`
TransactionHash string `gorm:"column:transaction_hash;primaryKey"`
TransactionIndex uint `gorm:"column:transaction_index"`
TransactionStatus uint64 `gorm:"column:transaction_status"`
LogIndex uint `gorm:"column:log_index"`
Metadata json.RawMessage `gorm:"column:metadata"`
BlockHash string `gorm:"column:block_hash;primaryKey"`
BlockNumber uint64 `gorm:"column:block_number"`
BlockTimestamp time.Time `gorm:"column:block_timestamp"`
Finalized bool `gorm:"column:finalized"`
}
func (*StakeEvent) Export ¶
func (b *StakeEvent) Export() (*schema.StakeEvent, error)
func (*StakeEvent) Import ¶
func (b *StakeEvent) Import(stakeEvent schema.StakeEvent) error
func (*StakeEvent) TableName ¶
func (b *StakeEvent) TableName() string
type StakeStaking ¶
type StakeStaking struct {
Staker string `gorm:"column:staker"`
Node string `gorm:"column:node"`
Count uint32 `gorm:"column:count"`
Value decimal.Decimal `gorm:"column:value"`
}
func (*StakeStaking) Export ¶
func (s *StakeStaking) Export() (*schema.StakeStaking, error)
func (*StakeStaking) Import ¶
func (s *StakeStaking) Import(stakeStaking schema.StakeStaking) error
func (*StakeStaking) TableName ¶
func (s *StakeStaking) TableName() string
type StakeTransaction ¶
type StakeTransaction struct {
ID string `gorm:"column:id;primaryKey"`
Type string `gorm:"column:type;primaryKey"`
User string `gorm:"column:user"`
Node string `gorm:"column:node"`
Value decimal.Decimal `gorm:"column:value"`
ChipIDs pq.Int64Array `gorm:"column:chips;type:bigint[]"`
BlockTimestamp time.Time `gorm:"column:block_timestamp"`
BlockNumber uint64 `gorm:"column:block_number"`
TransactionIndex uint `gorm:"column:transaction_index"`
Finalized bool `gorm:"column:finalized"`
}
func (*StakeTransaction) Export ¶
func (s *StakeTransaction) Export() (*schema.StakeTransaction, error)
func (*StakeTransaction) Import ¶
func (s *StakeTransaction) Import(stakeTransaction schema.StakeTransaction) error
func (*StakeTransaction) TableName ¶
func (s *StakeTransaction) TableName() string
type StakerCountSnapshot ¶
type StakerCountSnapshot struct {
Date time.Time `gorm:"column:date"`
Count uint64 `gorm:"column:count"`
}
func (*StakerCountSnapshot) Export ¶
func (s *StakerCountSnapshot) Export() (*schema.StakerCountSnapshot, error)
func (*StakerCountSnapshot) Import ¶
func (s *StakerCountSnapshot) Import(stakeSnapshot schema.StakerCountSnapshot) error
func (*StakerCountSnapshot) TableName ¶
func (s *StakerCountSnapshot) TableName() string
type StakerProfitSnapshot ¶
type StakerProfitSnapshot struct {
ID uint64 `gorm:"column:id"`
Date time.Time `gorm:"column:date"`
EpochID uint64 `gorm:"column:epoch_id"`
OwnerAddress common.Address `gorm:"column:owner_address"`
TotalChipAmount decimal.Decimal `gorm:"column:total_chip_amounts"` // Fixme: total_chip_amounts-> total_chip_amount
TotalChipValue decimal.Decimal `gorm:"column:total_chip_values"` // Fixme: total_chip_values-> total_chip_value
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
func (*StakerProfitSnapshot) Export ¶
func (s *StakerProfitSnapshot) Export() (*schema.StakerProfitSnapshot, error)
func (*StakerProfitSnapshot) Import ¶
func (s *StakerProfitSnapshot) Import(snapshot schema.StakerProfitSnapshot) error
func (*StakerProfitSnapshot) TableName ¶
func (s *StakerProfitSnapshot) TableName() string
type StakerProfitSnapshots ¶
type StakerProfitSnapshots []StakerProfitSnapshot
func (*StakerProfitSnapshots) Export ¶
func (s *StakerProfitSnapshots) Export() ([]*schema.StakerProfitSnapshot, error)
func (*StakerProfitSnapshots) Import ¶
func (s *StakerProfitSnapshots) Import(snapshots []*schema.StakerProfitSnapshot) error
type Stat ¶
type Stat struct {
Address common.Address `gorm:"column:address;primaryKey"`
Endpoint string `gorm:"column:endpoint"`
AccessToken string `gorm:"column:access_token"`
Points float64 `gorm:"column:points"`
IsPublicGood bool `gorm:"column:is_public_good"`
IsFullNode bool `gorm:"column:is_full_node"`
IsRssNode bool `gorm:"column:is_rss_node"`
Staking float64 `gorm:"column:staking"`
Epoch int64 `gorm:"column:epoch"`
TotalRequest int64 `gorm:"column:total_request_count"`
EpochRequest int64 `gorm:"column:epoch_request_count"`
EpochInvalidRequest int64 `gorm:"column:epoch_invalid_request_count"`
DecentralizedNetwork int `gorm:"column:decentralized_network_count"`
FederatedNetwork int `gorm:"column:federated_network_count"`
Indexer int `gorm:"column:indexer_count"`
ResetAt time.Time `gorm:"column:reset_at"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
}
Source Files
¶
- average_tax_rate_submission.go
- bridge_event.go
- bridge_transaction.go
- checkpoint.go
- epoch.go
- epoch_apy_snapshot.go
- epoch_trigger.go
- node.go
- node_apy_snapshot.go
- node_event.go
- node_invalid_response.go
- node_reward_record.go
- node_snapshot.go
- node_stat.go
- node_worker.go
- operator_profit_snapshot.go
- stake_chip.go
- stake_event.go
- stake_stacking.go
- stake_transaction.go
- staker_count_snapshot.go
- staker_profit_snapshot.go
Click to show internal directories.
Click to hide internal directories.