Documentation ¶
Index ¶
- type AverageTaxRateSubmission
- type AverageTaxSubmissions
- type BridgeEvent
- type BridgeTransaction
- type Checkpoint
- type Epoch
- type EpochItem
- type EpochItems
- type EpochTrigger
- type Epochs
- type Node
- type NodeEvent
- type NodeEvents
- type NodeInvalidResponse
- type NodeMinTokensToStakeSnapshot
- type NodeMinTokensToStakeSnapshots
- type NodeSnapshot
- type Nodes
- type OperatorProfitSnapshot
- type OperatorProfitSnapshots
- type StakeChip
- type StakeEvent
- 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"` }
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"` }
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"` // FIXME: update column name TotalRewardedNodes int `gorm:"column:total_reward_items"` TotalRequestCounts decimal.Decimal `gorm:"column:total_request_counts"` CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` }
type EpochItem ¶
type EpochItem 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"` // FIXME: correct the column names TaxCollected decimal.Decimal `gorm:"column:tax_amounts"` // FIXME: correct the column names RequestCount decimal.Decimal `gorm:"column:request_counts"` }
EpochItem stores information for a Node in an Epoch TODO: we should probably rename this to NodeRewardRecord?
type EpochItems ¶
type EpochItems []*EpochItem
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 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"` // TODO: rename column to Location in database once atlas is merged Location json.RawMessage `gorm:"column:local;type:jsonb"` Avatar json.RawMessage `gorm:"column:avatar;type:jsonb"` MinTokensToStake decimal.Decimal `gorm:"column:min_tokens_to_stake"` APY decimal.Decimal `gorm:"column:apy"` Score decimal.Decimal `gorm:"column:score"` CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` }
type NodeEvent ¶
type NodeEvent struct { TransactionHash string `gorm:"transaction_hash"` TransactionIndex uint `gorm:"transaction_index"` NodeID uint64 `gorm:"node_id"` AddressFrom common.Address `gorm:"address_from"` AddressTo common.Address `gorm:"address_to"` Type schema.NodeEventType `gorm:"type"` LogIndex uint `gorm:"log_index"` ChainID uint64 `gorm:"chain_id"` BlockHash string `gorm:"block_hash"` BlockNumber uint64 `gorm:"block_number"` BlockTimestamp time.Time `gorm:"block_timestamp"` Metadata json.RawMessage `gorm:"metadata"` }
type NodeEvents ¶
type NodeEvents []*NodeEvent
type NodeInvalidResponse ¶ added in v0.4.11
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"` ValidatorNodes []common.Address `gorm:"column:validator_nodes"` ValidatorResponse json.RawMessage `gorm:"column:validator_response"` Node common.Address `gorm:"column:node"` Response json.RawMessage `gorm:"column:response"` CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` }
func (*NodeInvalidResponse) Export ¶ added in v0.4.11
func (n *NodeInvalidResponse) Export() *schema.NodeInvalidResponse
func (*NodeInvalidResponse) Import ¶ added in v0.4.11
func (n *NodeInvalidResponse) Import(nodeResponseFailure *schema.NodeInvalidResponse)
func (*NodeInvalidResponse) TableName ¶ added in v0.4.11
func (*NodeInvalidResponse) TableName() string
type NodeMinTokensToStakeSnapshot ¶
type NodeMinTokensToStakeSnapshot 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"` MinTokensToStake decimal.Decimal `gorm:"column:min_tokens_to_stake"` CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` }
func (*NodeMinTokensToStakeSnapshot) Export ¶
func (s *NodeMinTokensToStakeSnapshot) Export() (*schema.NodeMinTokensToStakeSnapshot, error)
func (*NodeMinTokensToStakeSnapshot) Import ¶
func (s *NodeMinTokensToStakeSnapshot) Import(snapshot schema.NodeMinTokensToStakeSnapshot) error
func (*NodeMinTokensToStakeSnapshot) TableName ¶
func (s *NodeMinTokensToStakeSnapshot) TableName() string
type NodeMinTokensToStakeSnapshots ¶
type NodeMinTokensToStakeSnapshots []NodeMinTokensToStakeSnapshot
func (*NodeMinTokensToStakeSnapshots) Export ¶
func (s *NodeMinTokensToStakeSnapshots) Export() ([]*schema.NodeMinTokensToStakeSnapshot, error)
func (*NodeMinTokensToStakeSnapshots) Import ¶
func (s *NodeMinTokensToStakeSnapshots) Import(snapshots []*schema.NodeMinTokensToStakeSnapshot) error
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"` }
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"` }
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"` BlockHash string `gorm:"column:block_hash;primaryKey"` BlockNumber uint64 `gorm:"column:block_number"` BlockTimestamp time.Time `gorm:"column:block_timestamp"` }
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 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"` Chips 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"` }
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"` TotalChipAmounts decimal.Decimal `gorm:"column:total_chip_amounts"` TotalChipValues decimal.Decimal `gorm:"column:total_chip_values"` 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"` 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_item.go
- epoch_trigger.go
- node.go
- node_event.go
- node_invalid_response.go
- node_min_tokens_to_stake_snapshot.go
- node_snapshot.go
- node_stat.go
- node_worker.go
- operator_profit_snapshot.go
- stake_chip.go
- stake_event.go
- stake_transaction.go
- staker_count_snapshot.go
- staker_profit_snapshot.go
Click to show internal directories.
Click to hide internal directories.